[netcdf] 01/08: Imported Upstream version 4.4.1~rc2

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Sat May 14 12:04:07 UTC 2016


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

sebastic pushed a commit to branch master
in repository netcdf.

commit 66c0aba10f197f17e12680cd5600373ac6babb09
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Sat May 14 01:07:41 2016 +0200

    Imported Upstream version 4.4.1~rc2
---
 .travis.yml                        |   12 +-
 CMakeLists.txt                     |   16 +-
 README.md                          |   27 +-
 RELEASE_NOTES.md                   |    9 +
 cf                                 |   12 +-
 cf.cmake                           |   19 +-
 config.h.cmake.in                  |    2 +
 config.h.in                        |    3 +
 configure                          |   68 +-
 configure.ac                       |   29 +-
 docs/Doxyfile.developer            |    2 +-
 docs/Doxyfile.in                   |    1 +
 docs/Makefile.am                   |    2 +-
 docs/Makefile.in                   |    2 +-
 docs/attribute_conventions.md      |   39 +
 docs/bestpractices.md              |  353 +++++++++
 docs/file_format_specifications.md |    5 +-
 docs/guide.dox                     |   22 +-
 docs/windows-binaries.md           |   30 +-
 examples/C/Makefile.in             |  520 +++----------
 examples/CDL/Makefile.in           |  443 +++--------
 h5_test/Makefile.in                |  631 +++-------------
 include/nc.h                       |    2 +
 include/nc3internal.h              |   59 +-
 include/nc4internal.h              |   85 ++-
 include/nc_hashmap.h               |   28 -
 libdap2/ncd2dispatch.c             |   68 +-
 libdap2/ncd2dispatch.h             |  188 ++---
 libdispatch/datt.c                 |    3 +-
 libdispatch/nclistmgr.c            |   10 +
 liblib/Makefile.am                 |    3 +-
 liblib/Makefile.in                 |    3 +-
 liblib/nc_initialize.c             |   24 +-
 libsrc/lookup3.c                   |    2 +-
 libsrc/nc_hashmap.c                |   17 -
 libsrc4/CMakeLists.txt             |    2 +-
 libsrc4/Makefile.am                |    3 +
 libsrc4/Makefile.in                |   24 +-
 libsrc4/nc4attr.c                  |   92 ++-
 libsrc4/nc4file.c                  |  164 ++--
 libsrc4/nc4hdf.c                   |  235 +++++-
 libsrc4/nc4info.c                  |  213 ++++++
 libsrc4/nc4internal.c              |   15 +-
 libsrc4/nc4var.c                   |    5 +-
 nc_test/Make0                      |   35 +-
 nc_test/Makefile.in                |  645 +++-------------
 nc_test4/Make0                     |   18 +-
 nc_test4/Makefile.in               | 1024 +++----------------------
 nc_test4/run_empty_vlen_test.sh    |   15 +-
 ncdap_test/Makefile.in             |  522 +++----------
 ncdump/CMakeLists.txt              |   34 +-
 ncdump/Make0                       |   37 +-
 ncdump/Makefile.am                 |   11 +-
 ncdump/Makefile.in                 |  800 ++++----------------
 ncdump/cdl.h                       |    1 +
 ncdump/ncdump.c                    |  104 ++-
 ncdump/ncdump.h                    |    3 +-
 ncdump/ref_tst_ncf213.cdl          |    3 +
 ncdump/ref_tst_special_atts.cdl    |    3 +
 ncdump/tst_fileinfo.c              |  157 ++++
 ncdump/tst_fileinfo.sh             |   59 ++
 ncdump/tst_lengths.sh              |   19 +-
 ncdump/tst_netcdf4.sh              |    7 +-
 ncdump/tst_netcdf4_4.sh            |    6 +-
 ncdump/utils.c                     |   17 +
 ncdump/utils.h                     |    1 +
 ncgen/CMakeLists.txt               |    3 +-
 ncgen/Makefile.am                  |    2 +-
 ncgen/Makefile.in                  |  420 +++--------
 ncgen/cvt.c                        |    2 +-
 ncgen/data.h                       |    3 -
 ncgen/genc.c                       |    2 +-
 ncgen/genlib.h                     |    4 +-
 ncgen/includes.h                   |    2 +
 ncgen/main.c                       |    7 +-
 ncgen/ncgen.h                      |   30 +-
 ncgen/ncgen.l                      |   32 +-
 ncgen/ncgen.y                      |   91 ++-
 ncgen/ncgenl.c                     | 1440 +++++++++++++++++++-----------------
 ncgen/ncgeny.c                     | 1125 ++++++++++++++--------------
 ncgen/ncgeny.h                     |   14 +-
 ncgen/run_tests.sh                 |    5 +-
 ncgen/semantics.c                  |    3 +-
 ncgen/util.c                       |   16 +
 ncgen/util.h                       |    1 +
 ncgen3/Makefile.in                 |  418 +++--------
 nctest/Makefile.am                 |    3 +-
 nctest/Makefile.in                 |  459 +++---------
 test-driver                        |  148 ----
 89 files changed, 4415 insertions(+), 6828 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 57dee76..43d6fbb 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -5,6 +5,16 @@ services:
 
 env:
     matrix:
+        - DOCKIMG=unidata/nctests:serial   USECMAKE=TRUE USEAC=TRUE DISTCHECK=TRUE USE_CC=gcc   COPTS='-DENABLE_NETCDF_4=OFF -DCMAKE_C_FLAGS=-fsigned-char' CURHOST=docker-gcc-x64-signed
+        - DOCKIMG=unidata/nctests:serial   USECMAKE=TRUE USEAC=TRUE DISTCHECK=TRUE USE_CC=clang COPTS='-DENABLE_NETCDF_4=OFF -DCMAKE_C_FLAGS=-fsigned-char' CURHOST=docker-clang-x64-signed
+        - DOCKIMG=unidata/nctests:serial32 USECMAKE=TRUE USEAC=TRUE DISTCHECK=TRUE USE_CC=gcc   COPTS='-DENABLE_NETCDF_4=OFF -DCMAKE_C_FLAGS=-fsigned-char' CURHOST=docker-gcc-x86-signed
+        - DOCKIMG=unidata/nctests:serial32 USECMAKE=TRUE USEAC=TRUE DISTCHECK=TRUE USE_CC=clang COPTS='-DENABLE_NETCDF_4=OFF -DCMAKE_C_FLAGS=-fsigned-char' CURHOST=docker-clang-x86-signed
+
+        - DOCKIMG=unidata/nctests:serial   USECMAKE=TRUE USEAC=TRUE DISTCHECK=TRUE USE_CC=gcc   COPTS='-DENABLE_NETCDF_4=OFF -DCMAKE_C_FLAGS=-funsigned-char' CURHOST=docker-gcc-x64-unsigned
+        - DOCKIMG=unidata/nctests:serial   USECMAKE=TRUE USEAC=TRUE DISTCHECK=TRUE USE_CC=clang COPTS='-DENABLE_NETCDF_4=OFF -DCMAKE_C_FLAGS=-funsigned-char' CURHOST=docker-clang-x64-unsigned
+        - DOCKIMG=unidata/nctests:serial32 USECMAKE=TRUE USEAC=TRUE DISTCHECK=TRUE USE_CC=gcc   COPTS='-DENABLE_NETCDF_4=OFF -DCMAKE_C_FLAGS=-funsigned-char' CURHOST=docker-gcc-x86-unsigned
+        - DOCKIMG=unidata/nctests:serial32 USECMAKE=TRUE USEAC=TRUE DISTCHECK=TRUE USE_CC=clang COPTS='-DENABLE_NETCDF_4=OFF -DCMAKE_C_FLAGS=-funsigned-char' CURHOST=docker-clang-x86-unsigned
+
         - DOCKIMG=unidata/nctests:serial   USECMAKE=TRUE USEAC=TRUE DISTCHECK=TRUE USE_CC=gcc   COPTS='-DCMAKE_C_FLAGS=-fsigned-char' CURHOST=docker-gcc-x64-signed
         - DOCKIMG=unidata/nctests:serial   USECMAKE=TRUE USEAC=TRUE DISTCHECK=TRUE USE_CC=clang COPTS='-DCMAKE_C_FLAGS=-fsigned-char' CURHOST=docker-clang-x64-signed
         - DOCKIMG=unidata/nctests:serial32 USECMAKE=TRUE USEAC=TRUE DISTCHECK=TRUE USE_CC=gcc   COPTS='-DCMAKE_C_FLAGS=-fsigned-char' CURHOST=docker-gcc-x86-signed
@@ -20,4 +30,4 @@ before_install:
 
 script:
 
-    - docker run --rm -it -h "$CURHOST" -e USEDASH=FALSE -e RUNF=OFF -e RUNCXX=OFF -e RUNP=OFF -e RUNNCO=OFF -e USECMAKE=$USECMAKE -e USEAC=$USEAC -e DISTCHECK=$DISTCHECK -e COPTS=$COPTS -e CTEST_OUTPUT_ON_FAILURE=1 -v $(pwd):/netcdf-c $DOCKIMG
+    - docker run --rm -it -h "$CURHOST" -e USEDASH=FALSE -e RUNF=OFF -e RUNCXX=OFF -e RUNP=OFF -e RUNNCO=OFF -e USECMAKE=$USECMAKE -e USEAC=$USEAC -e DISTCHECK=$DISTCHECK -e COPTS="$COPTS" -e CTEST_OUTPUT_ON_FAILURE=1 -v $(pwd):/netcdf-c $DOCKIMG
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1878861..65c9db8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -27,12 +27,12 @@ set(PACKAGE "netCDF" CACHE STRING "")
 SET(NC_VERSION_MAJOR 4)
 SET(NC_VERSION_MINOR 4)
 SET(NC_VERSION_PATCH 1)
-SET(NC_VERSION_NOTE "-rc1")
+SET(NC_VERSION_NOTE "-rc2")
 SET(netCDF_VERSION ${NC_VERSION_MAJOR}.${NC_VERSION_MINOR}.${NC_VERSION_PATCH}${NC_VERSION_NOTE})
 SET(VERSION ${netCDF_VERSION})
 SET(NC_VERSION ${netCDF_VERSION})
-SET(netCDF_LIB_VERSION 12.0.0)
-SET(netCDF_SO_VERSION 12)
+SET(netCDF_LIB_VERSION 11.2.0)
+SET(netCDF_SO_VERSION 11)
 SET(PACKAGE_VERSION ${VERSION})
 
 # Get system configuration, Use it to determine osname, os release, cpu. These
@@ -191,7 +191,6 @@ OPTION(NC_FIND_SHARED_LIBS "Find dynamically-built versions of dependent librari
 ##
 OPTION(ENABLE_SHARED_LIBRARY_VERSION "Encode the library SO version in the file name of the generated library file." ON)
 
-
 # Set some default linux gcc & apple compiler options for
 # debug builds.
 IF(CMAKE_COMPILER_IS_GNUCC OR APPLE)
@@ -1064,6 +1063,15 @@ MARK_AS_ADVANCED(ENABLE_INTERNAL_DOCS VALGRIND_TESTS ENABLE_COVERAGE_TESTS )
 MARK_AS_ADVANCED(ENABLE_DAP_REMOTE_TESTS ENABLE_DAP_LONG_TESTS USE_REMOTE_CDASH)
 MARK_AS_ADVANCED(ENABLE_DOXYGEN_BUILD_RELEASE_DOCS DOXYGEN_ENABLE_TASKS ENABLE_DOXYGEN_SERVER_SIDE_SEARCH)
 MARK_AS_ADVANCED(ENABLE_SHARED_LIBRARY_VERSION)
+
+# This option is temporary and should always be on except if netcdf-4 is off.
+IF(ENABLE_NETCDF_4)
+OPTION(ENABLE_FILEINFO "Enable FILEINFO." ON)
+ELSE()
+OPTION(ENABLE_FILEINFO "Enable FILEINFO." OFF)
+ENDIF()
+MARK_AS_ADVANCED(ENABLE_FILEINFO)
+
 ################################
 # Option checks
 ################################
diff --git a/README.md b/README.md
index e588976..0da4087 100644
--- a/README.md
+++ b/README.md
@@ -52,37 +52,25 @@ software for various languages:
 * [C++](http://github.com/Unidata/netcdf-cxx4)
 
 ### Copyright
-Copyright and licensing information can be found
-[here](http://www.unidata.ucar.edu/software/netcdf/copyright.html), as
-well as in the COPYRIGHT file accompanying the software
+Copyright and licensing information can be found [here](http://www.unidata.ucar.edu/software/netcdf/copyright.html), as well as in the COPYRIGHT file accompanying the software
 
 ### Installation
 To install the netCDF-C software, please see the file INSTALL in the
 netCDF-C distribution, or the (usually more up-to-date) document:
 
-* [Building NetCDF](http://www.unidata.ucar.edu/netcdf/docs/building.html)
+* [Building NetCDF](http://www.unidata.ucar.edu/software/netcdf/docs/getting_and_building_netcdf.html)
 
 ### Documentation
 A language-independent User's Guide for netCDF, and some other
 language-specific user-level documents are available from:
 
-* [Language-independent User's Guide](http://www.unidata.ucar.edu/netcdf/docs/user_guide.html)
+* [Language-independent User's Guide](http://www.unidata.ucar.edu/software/netcdf/docs/user_guide.html)
 * [NetCDF-C Tutorial](http://www.unidata.ucar.edu/software/netcdf/docs/tutorial_8dox.html)
-* [Fortran-90 User's Guide](http://www.unidata.ucar.edu/netcdf/docs/netcdf-f90.html)
-* [Fortran-77 User's Guide](http://www.unidata.ucar.edu/netcdf/docs/netcdf-f77.html)
+* [Fortran-90 User's Guide](http://www.unidata.ucar.edu/software/netcdf/documentation/historic/netcdf-f90/index.html#Top)
+* [Fortran-77 User's Guide](http://www.unidata.ucar.edu/software/netcdf/documentation/historic/netcdf-f77/index.html#Top)
 * [netCDF-Java/Common Data Model library](http://www.unidata.ucar.edu/software/thredds/current/netcdf-java/)
 * [netCDF4-python](http://unidata.github.io/netcdf4-python/)
 
-Reference documentation for various language interfaces are available from:
-
-* [NetCDF-C](http://www.unidata.ucar.edu/netcdf/docs/modules.html),
-  [C man page](http://www.unidata.ucar.edu/netcdf/docs/netcdf-man-3.html)
-* [Fortran-90](http://www.unidata.ucar.edu/netcdf/docs/netcdf-f90.html)
-* [Fortran-77 man page](http://www.unidata.ucar.edu/netcdf/docs/netcdf-man-3f.html)
-* [Java](http://www.unidata.ucar.edu/software/thredds/current/netcdf-java/reference/)
-* [C++](https://www.unidata.ucar.edu/netcdf/docs/cxx4/index.html)
-* [Python](http://unidata.github.io/netcdf4-python/#header-classes)
-
 A mailing list, netcdfgroup at unidata.ucar.edu, exists for discussion of
 the netCDF interface and announcements about netCDF bugs, fixes, and
 enhancements.  For information about how to subscribe, see the URL
@@ -90,7 +78,4 @@ enhancements.  For information about how to subscribe, see the URL
 * [Unidata netCDF Mailing-Lists](http://www.unidata.ucar.edu/netcdf/mailing-lists.html)
 
 ### Feedback
-We appreciate feedback from users of this package.  Please send
-comments, suggestions, and bug reports to
-<support-netcdf at unidata.ucar.edu>.  Please identify the version of the
-package (file VERSION).
+We appreciate feedback from users of this package.  Please send comments, suggestions, and bug reports to <support-netcdf at unidata.ucar.edu>.  
diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
index 4c07b7b..b357b9b 100755
--- a/RELEASE_NOTES.md
+++ b/RELEASE_NOTES.md
@@ -7,6 +7,15 @@ This file contains a high-level description of this package's evolution. Release
 
 ## 4.4.1 - TBD
 
+### 4.4.1-RC2 - May 13, 2016
+
+* [Enhancement] Added provenance information to files created.  This information consists of a persistent attribute named `_NCProperties` plus two computed attributes, `_IsNetcdf4` and `_SuperblockVersion`.  Associated documentation was added to the file `docs/attribute_conventions.md`.  See [GitHub pull request #260](https://github.com/Unidata/netcdf-c/pull/260) for more information.
+* [Bug Fix] Cleaned up some dead links in the doxygen-generated documentation.
+* [Bug Fix] Corrected several issues related to building under Visual Studio 2014.
+* [Bug Fix] Corrected several test failures related to HDF5 `1.10.0`
+* [Bug Fix] Reverted SOVersion *current* to 11 from 12; it was incorrectly incremented in netCDF-C release 4.4.1-RC1.
+* [Enhancement][Windows] Updated included libhdf5 version from 1.8.15 to 1.8.16 for pre-built Windows/Visual Studio installers.
+
 ### 4.4.1-RC1 - April 15, 2016
 
 * [Bug Fix][Enhancement] Fixed an issue with netCDF4 files generated using version `1.10.0` of the HDF5 library.  The 1.10 release potentially changed the underlying file format, introducing a backwards compatibility issue with the files generated.  HDF5 provided an API for retaining the 1.8.x file format, which is now on by default.  See [GitHub Issue #250](https://github.com/Unidata/netcdf-c/issues/250) for more information.
diff --git a/cf b/cf
index c200883..2bf3fe7 100644
--- a/cf
+++ b/cf
@@ -5,7 +5,7 @@ DB=1
 #FAST=1
 
 HDF5=1
-DAP=1
+#DAP=1
 #PNETCDF=1
 #PAR4=1
 
@@ -24,7 +24,7 @@ fi
 
 CFLAGS=""
 #CFLAGS="-Wall -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unused-parameter -Wconversion ${CFLAGS}"
-CFLAGS="-Wall -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unused-parameter ${CFLAGS}"
+CFLAGS="-Wall -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unused-parameter -Wno-char-subscripts -Wno-pointer-sign -Wno-format ${CFLAGS}"
 #CFLAGS="-Wall ${CFLAGS}"
 #CFLAGS="-Wconversion"
 
@@ -116,21 +116,23 @@ FLAGS="$FLAGS --disable-examples"
 #FLAGS="$FLAGS --disable-dap-remote-tests"
 FLAGS="$FLAGS --enable-dap-auth-tests"
 #FLAGS="$FLAGS --enable-doxygen"
-FLAGS="$FLAGS --enable-logging"
+#FLAGS="$FLAGS --enable-logging"
 #FLAGS="$FLAGS --disable-diskless"
 #FLAGS="$FLAGS --enable-mmap"
 #FLAGS="$FLAGS --with-udunits"
 #FLAGS="$FLAGS --with-libcf"
 #valgrind => not shared
 #FLAGS="$FLAGS --enable-valgrind-tests"
-FLAGS="$FLAGS --enable-jna"
+#FLAGS="$FLAGS --enable-jna"
+#FLAGS="$FLAGS --disable-properties-attribute"
+#FLAGS="$FLAGS --disable-silent-rules"
 
 if test "x$PAR4" != x1 ; then
 FLAGS="$FLAGS --disable-parallel4"
 fi
 
 if test "x${DB}" = x1 ; then
-FLAGS="$FLAGS --disable-shared"
+FLAGS="$FLAGS --disable-shared --enable-static"
 else
 FLAGS="$FLAGS --enable-shared"
 fi
diff --git a/cf.cmake b/cf.cmake
index ae300f3..b74021a 100644
--- a/cf.cmake
+++ b/cf.cmake
@@ -1,3 +1,7 @@
+# Is netcdf-4 and/or DAP enabled?
+#NC4=1
+#DAP=1
+
 # Is visual studio being used?
 #VS=yes
 CYGWIN=yes
@@ -39,13 +43,22 @@ fi
 #if test "x$VS" != x ; then USR=c:/cygwin/usr; else USR=/usr; fi
 
 ZLIB="-DZLIB_LIBRARY=${ZP}/$ZLIB -DZLIB_INCLUDE_DIR=${ZP}/include -DZLIB_INCLUDE_DIRS=${ZP}/include"
+if test "x$NC4" = x1 ; then
 HDF5="-DHDF5_LIB=${HP}/$H5LIB -DHDF5_HL_LIB=${HP}/$H5LIB_HL -DHDF5_INCLUDE_DIR=${HP}/include"
+fi
+if test "x$DAP" = x1 ; then
 CURL="-DCURL_LIBRARY=${CP}/$CURLLIB -DCURL_INCLUDE_DIR=${CP}/include -DCURL_INCLUDE_DIRS=${CP}/include"
+fi
 
-FLAGS="$FLAGS -DCMAKE_C_FLAGS='-Wall -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unused-parameter'"x2
+#FLAGS="$FLAGS -DCMAKE_C_FLAGS='-Wall -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unused-parameter'"x2
 
-#FLAGS="$FLAGS -DENABLE_DAP=false"
-#FLAGS="$FLAGS -DENABLE_NETCDF_4=false"
+if test "x$DAP" = x ; then
+FLAGS="$FLAGS -DENABLE_DAP=false"
+fi
+if test "x$NC4" = x ; then
+FLAGS="$FLAGS -DENABLE_NETCDF_4=false"
+fi
+FLAGS="$FLAGS -DENABLE_CONVERSION_WARNINGS=false"
 
 FLAGS="$FLAGS -DCMAKE_INSTALL_PREFIX=$USR/local"
 #FLAGS="-DCMAKE_PREFIX_PATH=$PPATH"
diff --git a/config.h.cmake.in b/config.h.cmake.in
index b07b6a5..82bd163 100644
--- a/config.h.cmake.in
+++ b/config.h.cmake.in
@@ -87,6 +87,7 @@ are set when opening a binary file on Windows. */
 #cmakedefine ENABLE_DAP 1
 #cmakedefine ENABLE_DAP_GROUPS 1
 #cmakedefine ENABLE_DAP_REMOTE_TESTS 1
+#cmakedefine ENABLE_FILEINFO 1
 #cmakedefine EXTRA_TESTS
 #cmakedefine USE_NETCDF4 1
 #cmakedefine USE_LIBDL 1
@@ -102,6 +103,7 @@ are set when opening a binary file on Windows. */
 #cmakedefine USE_PARALLEL4 1
 #cmakedefine USE_PNETCDF 1
 #cmakedefine USE_MMAP 1
+#cmakedefine ENABLE_FILEINFO 1
 #cmakedefine TEST_PARALLEL ${TEST_PARALLEL}
 #cmakedefine BUILD_RPC 1
 #cmakedefine USE_DISKLESS 1
diff --git a/config.h.in b/config.h.in
index 5b88c28..d4436d9 100644
--- a/config.h.in
+++ b/config.h.in
@@ -44,6 +44,9 @@
 /* if true, do remote tests */
 #undef ENABLE_DAP_REMOTE_TESTS
 
+/* file info */
+#undef ENABLE_FILEINFO
+
 /* if true, run extra tests which may not work yet */
 #undef EXTRA_TESTS
 
diff --git a/configure b/configure
index 69640c2..6031b1d 100755
--- a/configure
+++ b/configure
@@ -1,7 +1,7 @@
 #! /bin/sh
 # From configure.ac Id: configure.ac,v 1.450 2010/05/28 19:42:47 dmh Exp .
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for netCDF 4.4.1-rc1.
+# Generated by GNU Autoconf 2.69 for netCDF 4.4.1-rc2.
 #
 # Report bugs to <support-netcdf at unidata.ucar.edu>.
 #
@@ -591,8 +591,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='netCDF'
 PACKAGE_TARNAME='netcdf'
-PACKAGE_VERSION='4.4.1-rc1'
-PACKAGE_STRING='netCDF 4.4.1-rc1'
+PACKAGE_VERSION='4.4.1-rc2'
+PACKAGE_STRING='netCDF 4.4.1-rc2'
 PACKAGE_BUGREPORT='support-netcdf at unidata.ucar.edu'
 PACKAGE_URL=''
 
@@ -783,6 +783,8 @@ CPPFLAGS
 LDFLAGS
 CFLAGS
 CC
+ENABLE_FILEINFO_FALSE
+ENABLE_FILEINFO_TRUE
 BUILD_INTERNAL_DOCS
 NC_ENABLE_DOXYGEN_PDF_OUTPUT
 NC_ENABLE_DOXYGEN_PDF_OUTPUT_FALSE
@@ -1496,7 +1498,7 @@ 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 netCDF 4.4.1-rc1 to adapt to many kinds of systems.
+\`configure' configures netCDF 4.4.1-rc2 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1567,7 +1569,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of netCDF 4.4.1-rc1:";;
+     short | recursive ) echo "Configuration of netCDF 4.4.1-rc2:";;
    esac
   cat <<\_ACEOF
 
@@ -1784,7 +1786,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-netCDF configure 4.4.1-rc1
+netCDF configure 4.4.1-rc2
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2493,7 +2495,7 @@ 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 netCDF $as_me 4.4.1-rc1, which was
+It was created by netCDF $as_me 4.4.1-rc2, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2845,10 +2847,17 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
+##
+# Prefer an empty CFLAGS variable instead of the default -g -O2.
+# See:
+#   * http://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/C-Compiler.html#C-Compiler
+##
+: ${CFLAGS=""}
+
  NC_VERSION_MAJOR=4
  NC_VERSION_MINOR=4
  NC_VERSION_PATCH=1
- NC_VERSION_NOTE="-rc1"
+ NC_VERSION_NOTE="-rc2"
 
 #####
 # Set some variables used to generate a libnetcdf.settings file,
@@ -2857,11 +2866,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 # Create the VERSION file, which contains the package version from
 # AC_INIT.
-echo 4.4.1-rc1>VERSION
+echo 4.4.1-rc2>VERSION
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: netCDF 4.4.1-rc1" >&5
-$as_echo "$as_me: netCDF 4.4.1-rc1" >&6;}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: netCDF 4.4.1-rc2" >&5
+$as_echo "$as_me: netCDF 4.4.1-rc2" >&6;}
 
 # Keep libtool macros in an m4 directory.
 
@@ -3517,7 +3526,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='netcdf'
- VERSION='4.4.1-rc1'
+ VERSION='4.4.1-rc2'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -3861,6 +3870,32 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_netcdf_4" >&5
 $as_echo "$enable_netcdf_4" >&6; }
 
+####
+# Is Netcdf4 file info capture enabled; includes properties attribute
+# We do not actually provide a direct flag for disabling this
+if test "x$enable_netcdf_4" = xyes ; then
+enable_fileinfo=yes
+else
+enable_fileinfo=no
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking If file info capture is enabled" >&5
+$as_echo_n "checking If file info capture is enabled... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_fileinfo" >&5
+$as_echo "$enable_fileinfo" >&6; }
+if test "x$enable_fileinfo" = xyes ; then
+
+$as_echo "#define ENABLE_FILEINFO 1" >>confdefs.h
+
+fi
+ if test x$enable_fileinfo = xyes; then
+  ENABLE_FILEINFO_TRUE=
+  ENABLE_FILEINFO_FALSE='#'
+else
+  ENABLE_FILEINFO_TRUE='#'
+  ENABLE_FILEINFO_FALSE=
+fi
+
+
 # Does the user require dynamic loading?
 # This is only for those hdf5 installs that support it.
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking do we require hdf5 dynamic-loading support" >&5
@@ -5641,7 +5676,6 @@ if test -n "$cc_version_info"; then
 fi
 
 
-
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -19172,6 +19206,10 @@ if test -z "${NC_ENABLE_DOXYGEN_PDF_OUTPUT_TRUE}" && test -z "${NC_ENABLE_DOXYGE
   as_fn_error $? "conditional \"NC_ENABLE_DOXYGEN_PDF_OUTPUT\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${ENABLE_FILEINFO_TRUE}" && test -z "${ENABLE_FILEINFO_FALSE}"; then
+  as_fn_error $? "conditional \"ENABLE_FILEINFO\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
   as_fn_error $? "conditional \"AMDEP\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -19718,7 +19756,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by netCDF $as_me 4.4.1-rc1, which was
+This file was extended by netCDF $as_me 4.4.1-rc2, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -19788,7 +19826,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-netCDF config.status 4.4.1-rc1
+netCDF config.status 4.4.1-rc2
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff --git a/configure.ac b/configure.ac
index 9218a5a..283c9b4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -15,12 +15,19 @@ AC_REVISION([$Id: configure.ac,v 1.450 2010/05/28 19:42:47 dmh Exp $])
 AC_PREREQ([2.59])
 
 # Initialize with name, version, and support email address.
-AC_INIT([netCDF], [4.4.1-rc1], [support-netcdf at unidata.ucar.edu])
+AC_INIT([netCDF], [4.4.1-rc2], [support-netcdf at unidata.ucar.edu])
+
+##
+# Prefer an empty CFLAGS variable instead of the default -g -O2.
+# See:
+#   * http://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/C-Compiler.html#C-Compiler
+##
+: ${CFLAGS=""}
 
 AC_SUBST([NC_VERSION_MAJOR]) NC_VERSION_MAJOR=4
 AC_SUBST([NC_VERSION_MINOR]) NC_VERSION_MINOR=4
 AC_SUBST([NC_VERSION_PATCH]) NC_VERSION_PATCH=1
-AC_SUBST([NC_VERSION_NOTE]) NC_VERSION_NOTE="-rc1"
+AC_SUBST([NC_VERSION_NOTE]) NC_VERSION_NOTE="-rc2"
 
 #####
 # Set some variables used to generate a libnetcdf.settings file,
@@ -61,7 +68,7 @@ AC_CONFIG_LINKS([nc_test4/ref_hdf5_compat2.nc:nc_test4/ref_hdf5_compat2.nc])
 AC_CONFIG_LINKS([nc_test4/ref_hdf5_compat3.nc:nc_test4/ref_hdf5_compat3.nc])
 
 # This call is required by automake.
-AM_INIT_AUTOMAKE([foreign dist-zip subdir-objects])
+AM_INIT_AUTOMAKE([foreign dist-zip subdir-objects serial-tests])
 AM_MAINTAINER_MODE()
 
 # Check for the existence of this file before proceeding.
@@ -194,6 +201,21 @@ enable_netcdf_4=no
 fi
 AC_MSG_RESULT([$enable_netcdf_4])
 
+####
+# Is Netcdf4 file info capture enabled; includes properties attribute
+# We do not actually provide a direct flag for disabling this
+if test "x$enable_netcdf_4" = xyes ; then
+enable_fileinfo=yes
+else
+enable_fileinfo=no
+fi
+AC_MSG_CHECKING([If file info capture is enabled])
+AC_MSG_RESULT([$enable_fileinfo])
+if test "x$enable_fileinfo" = xyes ; then
+AC_DEFINE([ENABLE_FILEINFO], [1], [file info])
+fi
+AM_CONDITIONAL(ENABLE_FILEINFO, [test x$enable_fileinfo = xyes])
+
 # Does the user require dynamic loading?
 # This is only for those hdf5 installs that support it.
 AC_MSG_CHECKING([do we require hdf5 dynamic-loading support])
@@ -600,7 +622,6 @@ if test -n "$cc_version_info"; then
 fi
 
 
-
 AC_PROG_CC
 AM_PROG_CC_C_O
 AC_C_CONST
diff --git a/docs/Doxyfile.developer b/docs/Doxyfile.developer
index ae92838..459fc07 100755
--- a/docs/Doxyfile.developer
+++ b/docs/Doxyfile.developer
@@ -38,7 +38,7 @@ PROJECT_NAME           = netCDF-C
 # could be handy for archiving the generated documentation or if some version
 # control system is used.
 
-PROJECT_NUMBER         = 4.4.1-rc1
+PROJECT_NUMBER         = 4.4.1-rc2
 
 # Using the PROJECT_BRIEF tag one can provide an optional one line description
 # for a project that appears at the top of each page and should give viewer a
diff --git a/docs/Doxyfile.in b/docs/Doxyfile.in
index c7bf5ee..04ac3ed 100644
--- a/docs/Doxyfile.in
+++ b/docs/Doxyfile.in
@@ -765,6 +765,7 @@ INPUT = \
     @abs_top_srcdir@/docs/known_problems.md \
     @abs_top_srcdir@/docs/COPYRIGHT.dox \
     @abs_top_srcdir@/docs/credits.md \
+    @abs_top_srcdir@/docs/bestpractices.md \
     @abs_top_srcdir@/include/netcdf.h \
     @abs_top_srcdir@/include/netcdf_mem.h \
     @abs_top_srcdir@/include/netcdf_par.h \
diff --git a/docs/Makefile.am b/docs/Makefile.am
index c1dfc62..4d8f7e5 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -11,7 +11,7 @@ EXTRA_DIST = netcdf.m4 DoxygenLayout.xml Doxyfile.in footer.html \
     building-with-cmake.md CMakeLists.txt \
     groups.dox install.md notes.md install-fortran.md \
     all-error-codes.md cmake_faq.md credits.md software.md \
-    auth.html obsolete/fan_utils.html
+    auth.html obsolete/fan_utils.html bestpractices.md
 
 # Turn off parallel builds in this directory.
 .NOTPARALLEL:
diff --git a/docs/Makefile.in b/docs/Makefile.in
index 6a4ca4e..01a5209 100644
--- a/docs/Makefile.in
+++ b/docs/Makefile.in
@@ -367,7 +367,7 @@ EXTRA_DIST = netcdf.m4 DoxygenLayout.xml Doxyfile.in footer.html \
     building-with-cmake.md CMakeLists.txt \
     groups.dox install.md notes.md install-fortran.md \
     all-error-codes.md cmake_faq.md credits.md software.md \
-    auth.html obsolete/fan_utils.html
+    auth.html obsolete/fan_utils.html bestpractices.md
 
 
 # To build documentation you must have M4 in their path.
diff --git a/docs/attribute_conventions.md b/docs/attribute_conventions.md
index 5cee1bf..fab62bb 100644
--- a/docs/attribute_conventions.md
+++ b/docs/attribute_conventions.md
@@ -126,3 +126,42 @@ It is strongly recommended that applicable conventions be followed unless there
 <p>
 
 > Typical conventions web sites will include references to documents in some form agreed upon by the community that supports the conventions and examples of netCDF file structures that follow the conventions.
+
+# Provenance Attributes
+
+These attributes can occur in netCDF enhanced (netcdf-4) files beginning
+with version 4.4.1. They all are associated with the root group as
+global attributes. They are hidden in the sense that they can only be
+accessed thru the netcdf-C api calls via the name. They have no
+attribute number and will not be counted in the number of global
+attributes in the root group. The simplest way to view these attributes
+is to use the -s flag to the ncdump command.
+
+`_NCProperties`
+
+> This attribute is persistent in the file, but hidden. It is inserted in the file at creation time and is never modified after that point. It specifies the following.
+> - The version for the netcdf library used at creation time.
+> - The version for the HDF5 library used at creation time.
+
+> Its format is: `name=value|name=value ...`<br>
+> Occurrences of '|' in the name or value are disallowed.
+
+> The current set of known names is as follows.
+> - version=... The current format version for the _NCProperties file, currently 1.
+> - netcdflibversion=... The version of the netcdf library used to create the file. The value is, for example, 4.4.1-rc1-development or 4.4.1.
+> - hdf5libversion=... The version of the HDF5 library used to create the file. The value is, for example, 1.8.16 or 1.10.0.
+
+`_SuperblockVersion`
+
+> This attribute is ephemeral in that it is computed by looking at the file's HDF5 superblock.
+> It has this form: `_SuperBlockVersion = 0|1|2|3|...`
+
+`_IsNetcdf4`
+
+> This attribute is ephemeral in that it is computed by walking the metadata of the file looking for attributes specific to netCDF-4 files.
+
+> The _IsNetcdf4 attribute has the form: `_IsNetcdf4 = 0|1`
+> where 1 means the file has various tags indicating it was produced thru the netcdf-4 API.
+
+> This attribute is computed by using the HDF5 API to walk the file to look for attributes specific to netcdf-4.  False negatives are possible for a small subset of netcdf-4 files, especially those not containing dimensions. False positives are only possible by deliberate modifications to an existing HDF5 file thru the HDF5 API. For files with the _NCProperties attribute, this attribute is redundant. For files created prior to the introduction of the _NCProperties attribute, this may be  [...]
+
diff --git a/docs/bestpractices.md b/docs/bestpractices.md
new file mode 100644
index 0000000..09bb848
--- /dev/null
+++ b/docs/bestpractices.md
@@ -0,0 +1,353 @@
+Writing NetCDF Files: Best Practices {#BestPractices}
+====================================
+
+[TOC]
+
+Best Practices {#bp_Best_Practices}
+=====================================
+
+## Conventions {#bp_Conventions}
+
+While netCDF is intended for "self-documenting data", it is often
+necessary for data writers and readers to agree upon attribute
+conventions and representations for discipline-specific data structures.
+These agreements are written up as human readable documents called
+***netCDF conventions***.
+
+Use an existing Convention if possible. See the list of [registered
+conventions](/software/netcdf/conventions.html).
+
+The CF Conventions are recommended where applicable, especially for
+gridded (model) datasets.
+
+Document the convention you are using by adding the global attribute
+"Conventions" to each netCDF file, for example:
+
+This document refers to conventions for the netCDF *classic* data model.
+For recommendations about conventions for the netCDF-4 *enhanced* data
+model, see [Developing Conventions for
+NetCDF-4](/netcdf/papers/nc4_conventions.html).
+
+## Coordinate Systems {#bp_Coordinate-Systems}
+
+A ***coordinate variable*** is a one-dimensional variable with the same
+name as a dimension, which names the coordinate values of the dimension.
+It must not have any missing data (for example, no `_FillValue` or
+`missing_value` attributes) and must be strictly monotonic (values
+increasing or decreasing). A two-dimensional variable of type char is a
+***string-valued coordinate variable*** if it has the same name as its
+first dimension, e.g.: **char time( time, time\_len);** all of its
+strings must be unique. A variable's ***coordinate system*** is the set
+of coordinate variables used by the variable. Coordinates that refer to
+physical space are called ***spatial coordinates***, ones that refer to
+physical time are called ***time coordinates***, ones that refer to
+either physical space or time are called ***spatio-temporal
+coordinates.***
+
+-   Make coordinate variables for every dimension possible (except for
+    string length dimensions).
+-   Give each coordinate variable at least `unit` and `long_name`
+    attributes to document its meaning.
+-   Use an existing netCDF [Convention](#Conventions) for your
+    coordinate variables, especially to identify
+    spatio-temporal coordinates.
+-   Use shared dimensions to indicate that two variables use the same
+    coordinates along that dimension. If two variables' dimensions are
+    not related, create separate dimensions for them, even if they
+    happen to have the same length.
+
+## Variable Grouping {#bp_Variable-Grouping}
+
+You may structure the data in a netCDF file in different ways, for
+example putting related parameters into a single variable by adding an
+extra dimension. Standard visualization and analysis software may have
+trouble breaking that data out, however. On the other extreme, it is
+possible to create different variables e.g. for different vertical
+levels of the same parameter. However, standard visualization and
+analysis software may have trouble grouping that data back together.
+Here are some guidelines for deciding how to group your data into
+variables:
+
+-   All of the data in a variable must be of the same type and should
+    have the same units of measurement.
+-   A variable's attributes should be applicable to all its data.
+-   If possible, all of the coordinate variables should be
+    spatio-temporal, with no extra dimensions.
+-   Use 4D spatio-temporal coordinate systems in preference to 3D. Use
+    3D spatio-temporal coordinate systems in preference to 2D.
+-   Vector valued (e.g. wind) parameters are legitimate uses of extra
+    dimensions. There are trade-offs between putting vectors in the same
+    variables vs. putting each component of a vector in a
+    different variable. Check that any visualization software you plan
+    to use can deal with the structure you choose.
+-   Think in terms of complete coordinate systems (especially
+    spatio-temporal), and organize your data into variables accordingly.
+    Variables with the same coordinate system implicitly form a group.
+
+## Variable Attributes {#bp_Variable-Attributes}
+
+
+-   For each variable where it makes sense, add a **units** attribute,
+    using the [udunits](/software/udunits/index.html) conventions,
+    if possible.
+-   For each variable where it makes sense, add a **long\_name ****
+    attribute, which is a human-readable descriptive name for
+    the variable. This could be used for labeling plots, for example.
+
+## Strings and Variables of type char {#bp_Strings-and-Variables-of-type-char}
+
+NetCDF-3 does not have a primitive **String** type, but does have arrays
+of type **char**, which are 8 bits in size. The main difference is that
+Strings are variable length arrays of chars, while char arrays are fixed
+length. Software written in C usually depends on Strings being zero
+terminated, while software in Fortran and Java do not. Both C
+(*nc\_get\_vara\_text*) and Java (*ArrayChar.getString*) libraries have
+convenience routines that read char arrays and convert to Strings.
+
+-   Do not use char type variables for numeric data, use byte type
+    variables instead.
+-   Consider using a global Attribute instead of a Variable to store a
+    String applicable to the whole dataset.
+-   When you want to store arrays of Strings, use a multidimensional
+    char array. All of the Strings will be the same length.
+-   There are 3 strategies for writing variable length Strings and
+    zero-byte termination:
+    1.  *Fortran convention*: pad with blanks and never terminate with a
+        zero byte.
+    2.  *C convention*: pad with zeros and always terminate with a
+        zero byte.
+    3.  *Java convention*: You don't need to store a trailing zero byte,
+        but pad trailing unused characters with zero bytes.
+-   When reading, trim zeros and blanks from the end of the char array
+    and if in C, add a zero byte terminator.
+
+## Calendar Date/Time {#bp_Calendar-Date-Time}
+
+Time as a fundamental unit means a time interval, measured in seconds. A
+Calendar date/time is a specific instance in real, physical time. Dates
+are specified as an interval from some ***reference time*** e.g. "days
+elapsed since Greenwich mean noon on 1 January 4713 BCE". The reference
+time implies a system of counting time called a ***calendar*** (e.g.
+Gregorian calendar) and a textual representation (e.g. [ISO
+8601](http://www.cl.cam.ac.uk/%7Emgk25/iso-time.html)).
+
+There are two strategies for storing a date/time into a netCDF variable.
+One is to encode it as a numeric value and a unit that includes the
+reference time, e.g. "seconds since 2001-1-1 0:0:0" or"days since
+2001-1-1 0:0:0" . The other is to store it as a String using a standard
+encoding and Calendar. The former is more compact if you have more than
+one date, and makes it easier to compute intervals between two dates.
+
+Unidata's [udunits](/software/udunits/) package provides a convenient
+way to implement the first strategy. It uses the ISO 8601 encoding and a
+hybrid Gregorian/Julian calendar, but udunits does not support use of
+other Calendars or encodings for the reference time. However the ncdump
+"-T" option can display numeric times that use udunits (and optionally
+climate calendars) as ISO 8601 strings that are easy for humans to
+interpret.
+
+-   If your data uses real, physical time that is well represented using
+    the Gregorian/Julian calendar, encode it as an interval from a
+    reference time, and add a units attribute which uses a
+    udunits-compatible time unit. If the data assumes one of the
+    non-standard calendars mentioned in the CF Conventions, specify that
+    with a Calendar attribute. Readers can then use the udunits package
+    to manipulate or format the date values, and the ncdump utility can
+    display them with either numeric or string representation.
+-   If your data uses a calendar not supported by the CF Conventions,
+    make it compatible with existing date manipulation packages if
+    possible (for example, java.text.SimpleDateFormat).
+-   Add multiple sets of time encodings if necessary to allow different
+    readers to work as well as possible.\
+
+## Unsigned Data {#bp_Unsigned-Data}
+
+NetCDF-3 does not have unsigned integer primitive types.
+
+-   To be completely safe with unknown readers, widen the data type, or
+    use floating point.
+-   You can use the corresponding signed types to store unsigned data
+    only if all client programs know how to interpret this correctly.
+-   A new proposed convention is to create a variable attribute
+    `_Unsigned = "true"` to indicate that integer data should be treated
+    as unsigned.
+
+## Packed Data Values {#bp_Packed-Data-Values}
+
+Packed data is stored in a netCDF file by limiting precision and using a
+smaller data type than the original data, for example, packing
+double-precision (64-bit) values into short (16-bit) integers. The
+C-based netCDF libraries do not do the packing and unpacking. (The
+[netCDF Java library](/software/netcdf-java/) will do automatic
+unpacking when the
+[VariableEnhanced](/software/netcdf-java/v4.1/javadocAll/ucar/nc2/dataset/VariableEnhanced.html)
+Interface is used. For details see
+[EnhancedScaleMissing](/software/netcdf-java/v4.1/javadocAll/ucar/nc2/dataset/EnhanceScaleMissing.html)).
+
+-   Each variable with packed data has two attributes called
+    **scale\_factor** and **add\_offset**, so that the packed data may
+    be read and unpacked using the formula:
+
+    > ***unpacked\_data\_value = packed\_data\_value \* scale\_factor +
+    > add\_offset***
+
+-   The type of the stored variable is the packed data type, typically
+    byte, short or int.
+-   The type of the scale\_factor and add\_offset attributes should be
+    the type that you want the unpacked data to be, typically float
+    or double.
+-   To avoid introducing a bias into the unpacked values due to
+    truncation when packing, the data provider should round to the
+    nearest integer rather than just truncating towards zero before
+    writing the data:
+
+    > ***packed\_data\_value = nint((unpacked\_data\_value -
+    > add\_offset) / scale\_factor)***
+
+Depending on whether the packed data values are intended to be
+interpreted by the reader as signed or unsigned integers, there are
+alternative ways for the data provider to compute the *scale\_factor*
+and *add\_offset* attributes. In either case, the formulas above apply
+for unpacking and packing the data.
+
+A conventional way to indicate whether a byte, short, or int variable is
+meant to be interpreted as unsigned, even for the netCDF-3 classic model
+that has no external unsigned integer type, is by providing the special
+variable attribute `_Unsigned` with value `"true"`. However, most
+existing data for which packed values are intended to be interpreted as
+unsigned are stored without this attribute, so readers must be aware of
+packing assumptions in this case. In the enhanced netCDF-4 data model,
+packed integers may be declared to be of the appropriate unsigned type.
+
+Let *n* be the number of bits in the packed type, and assume *dataMin*
+and *dataMax* are the minimum and maximum values that will be used for a
+variable to be packed.
+
+-   If the packed values are intended to be interpreted as signed
+    integers (the default assumption for classic model data), you may
+    use:
+
+    > *scale\_factor =(dataMax - dataMin) / (2^n^ - 1)*
+
+    > *add\_offset = dataMin + 2^n\\ -\\ 1^ \* scale\_factor*
+
+-   If the packed values are intended to be interpreted as unsigned (for
+    example, when read in the C interface using the `nc_get_var_uchar()`
+    function), use:
+
+    > *scale\_factor =(dataMax - dataMin) / (2^n^ - 1)*
+
+    > *add\_offset = dataMin*
+
+-   In either the signed or unsigned case, an alternate formula may be
+    used for the add\_offset and scale\_factor packing parameters that
+    reserves a packed value for a special value, such as an indicator of
+    missing data. For example, to reserve the minimum packed value
+    (-2^n\\ -\\ 1^) for use as a special value in the case of signed
+    packed values:
+
+    > *scale\_factor =(dataMax - dataMin) / (2^n^ - 2)*
+
+    > *add\_offset = (dataMax + dataMin) / 2*
+
+-   If the packed values are unsigned, then the analogous formula that
+    reserves 0 as the packed form of a special value would be:
+
+    > *scale\_factor =(dataMax - dataMin) / (2^n^ - 2)*
+
+    > *add\_offset = dataMin - scale\_factor*
+
+-   Example, packing 32-bit floats into 16-bit shorts:
+
+            variables:
+              short data( z, y, x);
+                data:scale_offset = 34.02f;
+                data:add_offset = 1.54f;
+
+-   The `units` attribute applies to unpacked values.
+
+## Missing Data Values {#bp_Missing-Data-Values}
+
+***Missing data*** is a general name for data values that are invalid,
+never written, or missing. The netCDF library itself does not handle
+these values in any special way, except that the value of a `_FillValue`
+attribute, if any, is used in pre-filling unwritten data. (The
+Java-netCDF library will assist in recognizing these values when
+reading, see class **VariableStandardized**).
+
+-   Default fill values for each type are available in the C-based
+    interfaces, and are defined in the appropriate header files. For
+    example, in the C interface, NC\_FILL\_FLOAT and NC\_FILL\_DOUBLE
+    are numbers near 9.9692e+36 that are returned when you try to read
+    values that were never written. Writing, reading, and testing for
+    equality with these default fill values works portably on the
+    platforms on which netCDF has been tested.
+-   The `_FillValue` attribute should have the same data type as the
+    variable it describes. If the variable is packed using
+    `scale_factor` and `add_offset` attributes, the `_FillValue`
+    attribute should have the data type of the packed data.
+-   Another way of indicating missing values for real type data is to
+    store an IEEE **NaN** floating point value. The advantage of this is
+    that any computation using a NaN results in a NaN. Client software
+    must know to look for NaNs, however, and detection of NaNs is
+    tricky, since any comparison with a NaN is required to return
+    *false*.
+    -   In Java, you can use **Double.NaN** and **Float.NaN** constants.
+    -   In many C compilers, you can generate a NaN value using **double
+        nan = 0.0 / 0.0;**
+-   Alternatively or in addition, set the **valid\_range** attribute for
+    each variable that uses missing values, and make sure all valid data
+    is within that range, and all missing or invalid data is outside of
+    that range. Again, the client software must recognize and make use
+    of this information. Example:
+
+            variables:
+              float data( z, y, x);
+                data:valid_range = -999.0f, 999.0f;
+
+
+    If the variable is packed using `scale_factor` and `add_offset`
+    attributes, the `valid_range` attribute should have the data type of
+    the packed data.
+
+    If the variable is unsigned the `valid_range` values should be
+    widened if needed and stored as unsigned integers.
+
+## Miscellaneous tips {#bp_Miscellaneous-tips}
+
+-   To define a file whose structure is known in advance, write a CDL
+    file and create the netCDF file using
+    [ncgen](/cgi-bin/man-cgi?ncgen). Then write the data into the netCDF
+    file using your program. This is typically much easier than
+    programming all of the create calls yourself.
+-   For the netCDF classic or 64-bit-offset formats, it's possible to
+    reserve extra space in the file when it is created so that you can
+    later add additional attributes or non-record variables without
+    copying all the data. (This is not necessary for netCDF-4 files,
+    because metadata can be added efficiently to such files.) See the [C
+    man-page reference documentation](/cgi-bin/man-cgi?netcdf+-s3) (or
+    the [Fortran reference documentation](/cgi-bin/man-cgi?netcdf+-s3f))
+    for `nc__create` and `nc__enddef` (`nf__create` and `nf__enddef`
+    for Fortran) for more details on reserving extra space in
+    the header.
+
+## Spelling netCDF: Best Practices {#bp_Spelling-netCDF-Best-Practices}
+
+There are only 3 correct spellings of "netCDF":
+
+1.  **netCDF:** The original spelling of the name of the data model,
+    API, and format. The acronym stands for network Common Data Form
+    (not Format), and the "CDF" part was capitalized in part to pay
+    homage to the NASA "CDF" data model which the netCDF data
+    model extended.
+2.  **netcdf:** Used in certain file names, such as:
+
+             #include <netcdf.h>  
+
+3.  **NetCDF**: Used in titles and at the beginning of sentences, where
+    "netCDF" is awkward or violates style guidelines.
+
+All other forms, and most especially "Netcdf", are considered vulgar and
+a sign of ill-breeding or misspent youth, analogous to the egregious but
+common misspelling "JAVA" used by those who are new to the language or
+who mistakenly think it is an acronym.\
diff --git a/docs/file_format_specifications.md b/docs/file_format_specifications.md
index b00dd0c..ebbf338 100644
--- a/docs/file_format_specifications.md
+++ b/docs/file_format_specifications.md
@@ -653,7 +653,7 @@ stripped from the name for the netCDF API.
 Attributes in HDF5 and netCDF-4 correspond very closely. Each
 attribute in an HDF5 file is represented as an attribute in the
 netCDF-4 file, with the exception of the attributes below, which are
-ignored by the netCDF-4 API.
+hidden by the netCDF-4 API.
 - _Netcdf4Coordinates An integer array containing the dimension IDs of
   a variable which is a multi-dimensional coordinate variable.
 - _nc3_strict When this (scalar, H5T_NATIVE_INT) attribute exists in
@@ -670,6 +670,9 @@ ignored by the netCDF-4 API.
 - _Netcdf4Dimid Holds a scalar H5T_NATIVE_INT that is the (zero-based)
   dimension ID for this dimension, needed when dimensions and
   coordinate variables are defined in different orders.
+- _NCProperties Holds provenance information about a file at the time
+  it was created. It specifies the versions of the netCDF and HDF5
+  libraries used to create the file.
 
 \subsection user_defined_spec User-Defined Data Types
 
diff --git a/docs/guide.dox b/docs/guide.dox
index abbcec7..5d78d1b 100644
--- a/docs/guide.dox
+++ b/docs/guide.dox
@@ -9,6 +9,7 @@
 - \subpage netcdf_perf_chunking
 - \subpage netcdf_utilities_guide
 - \subpage dap_support
+- \subpage BestPractices
 - \subpage users_guide_appendices
 
 <H2>The Purpose of NetCDF</H2>
@@ -82,15 +83,7 @@ affecting existing programs. The physical representation of netCDF
 data is designed to be independent of the computer on which the data
 were written.
 
-Unidata supports the netCDF interfaces for C (see <a
-href="http://www.unidata.ucar.edu/netcdf/docs/netcdf-c.html#Top" >NetCDF C Interface
-Guide</a>), FORTRAN 77 (see <a
-href="http://www.unidata.ucar.edu/netcdf/docs/netcdf-f77.html#Top" >NetCDF Fortran 77
-Interface Guide</a>), FORTRAN 90 (see <a
-href="http://www.unidata.ucar.edu/netcdf/docs/netcdf-f90.html#Top" >NetCDF Fortran 90
-Interface Guide</a>), and C++ (see <a
-href="http://www.unidata.ucar.edu/netcdf/docs/netcdf-cxx.html#Top" >NetCDF C++ Interface
-Guide</a>).
+Unidata supports the netCDF interfaces for C (see <a href="http://www.unidata.ucar.edu/netcdf/docs/" >NetCDF-C User's Guide</a>), FORTRAN 77 (see <a href="http://www.unidata.ucar.edu/netcdf/documentation/historic/netcdf-f77/index.html#Top" >NetCDF Fortran 77 Interface Guide</a>), FORTRAN 90 (see <a href="http://www.unidata.ucar.edu/netcdf/documentation/historic/netcdf-f90/index.html" >NetCDF Fortran 90 Interface Guide</a>), and C++ (see <a href="http://www.unidata.ucar.edu/netcdf/documen [...]
 
 The netCDF library is supported for various UNIX operating systems. A
 MS Windows port is also available. The software is also ported and
@@ -2233,17 +2226,20 @@ one of 'classic'. '64-bit offset', 'netCDF-4', or 'netCDF-4 classic
 model'.
 
 @par -s
-Specifies that \e special virtual attributes should be output for the
-file format variant and for variable properties such as
+Specifies that \e special virtual and hidden attributes should be output
+for the file format variant and for variable properties such as
 compression, chunking, and other properties specific to the format
 implementation that are primarily related to performance rather
 than the logical schema of the data. All the special virtual
 attributes begin with '_' followed by an upper-case
-letter. Currently they include the global attribute '_Format' and
+letter. Currently they include the global attributes '_Format',
+'_NCProperties', '_IsNetcdf4', '_SuperblockVersion' and
 the variable attributes '_ChunkSizes', '_DeflateLevel',
 '_Endianness', '_Fletcher32', '_NoFill', '_Shuffle', and '_Storage'.
 The \b ncgen utility recognizes these attributes and
-supports them appropriately.
+supports them appropriately. For '_NCProperties',
+'_IsNetcdf4', and '_SuperblockVersion', the term 'appropriately'
+means that they are ignored.
 
 @par -t
 Controls display of time data, if stored in a variable that uses a
diff --git a/docs/windows-binaries.md b/docs/windows-binaries.md
index 77269c2..576d278 100644
--- a/docs/windows-binaries.md
+++ b/docs/windows-binaries.md
@@ -21,25 +21,25 @@ Users who prefer to build the netCDF-C libraries from source in a Windows enviro
 
 # Getting pre-built netCDF-C Libraries for Visual Studio {#msvc-prebuilt}
 
-These libraries have been built using Visual Studio 2013 Community Edition.  The downloads are installer packages which contain the netCDF-C libraries and utilities (ncgen, ncgen3, ncdump and nccopy), as well as the associated dependencies.
+These libraries have been built using Visual Studio 2012.  The downloads are installer packages which contain the netCDF-C libraries and utilities (ncgen, ncgen3, ncdump and nccopy), as well as the associated dependencies.
 
 
 ## Included Dependencies {#msvc-inc-deps}
 
 The included dependencies and versions are as follows:
 
-* `libhdf5`: 1.8.15
+* `libhdf5`: 1.8.16
 * `libcurl`: 7.35.0
 * `zlib`:    1.2.8
 
-## Latest Release (netCDF-C 4.4.1-rc1) {#msvc-latest-release}
+## Latest Release (netCDF-C 4.4.1-rc2) {#msvc-latest-release}
 
 Configuration		| 32-bit 						| 64-bit |
 :-------------------|:--------							|:-------|
-netCDF 3		| [netCDF4.4.1-rc1-NC3-32.exe][r1]		| [netCDF4.4.1-rc1-NC3-64.exe][r6]
-netCDF3+DAP		| [netCDF4.4.1-rc1-NC3-DAP-32.exe][r2]	| [netCDF4.4.1-rc1-NC3-DAP-64.exe][r6]
-netCDF4			| [netCDF4.4.1-rc1-NC4-32.exe][r3]		| [netCDF4.4.1-rc1-NC4-64.exe][r7]
-netCDF4+DAP		| [netCDF4.4.1-rc1-NC4-DAP-32.exe][r4]	| [netCDF4.4.1-rc1-NC4-DAP-64.exe][r8]
+netCDF 3		| [netCDF4.4.1-rc2-NC3-32.exe][r1]		| [netCDF4.4.1-rc2-NC3-64.exe][r6]
+netCDF3+DAP		| [netCDF4.4.1-rc2-NC3-DAP-32.exe][r2]	| [netCDF4.4.1-rc2-NC3-DAP-64.exe][r6]
+netCDF4			| [netCDF4.4.1-rc2-NC4-32.exe][r3]		| [netCDF4.4.1-rc2-NC4-64.exe][r7]
+netCDF4+DAP		| [netCDF4.4.1-rc2-NC4-DAP-32.exe][r4]	| [netCDF4.4.1-rc2-NC4-DAP-64.exe][r8]
 
 # Using the netCDF-C Libraries with Visual Studio {#msvc-using}
 
@@ -60,11 +60,11 @@ When installed, the netCDF libraries are placed in the specified locations, alon
 1. When building the netCDF-C libraries with netCDF4 support, using the `Debug` libraries may cause extraneous warnings. These warnings are related to cross-dll memory management, and appear to be harmless. You can safely ignore them by using the `Release` libraries. [NCF-220]
 
 
-[r1]: http://www.unidata.ucar.edu/downloads/netcdf/ftp/netCDF4.4.1-rc1-NC3-32.exe
-[r2]: http://www.unidata.ucar.edu/downloads/netcdf/ftp/netCDF4.4.1-rc1-NC3-DAP-32.exe
-[r3]: http://www.unidata.ucar.edu/downloads/netcdf/ftp/netCDF4.4.1-rc1-NC4-32.exe
-[r4]: http://www.unidata.ucar.edu/downloads/netcdf/ftp/netCDF4.4.1-rc1-NC4-DAP-32.exe
-[r6]: http://www.unidata.ucar.edu/downloads/netcdf/ftp/netCDF4.4.1-rc1-NC3-64.exe
-[r6]: http://www.unidata.ucar.edu/downloads/netcdf/ftp/netCDF4.4.1-rc1-NC3-DAP-64.exe
-[r7]: http://www.unidata.ucar.edu/downloads/netcdf/ftp/netCDF4.4.1-rc1-NC4-64.exe
-[r8]: http://www.unidata.ucar.edu/downloads/netcdf/ftp/netCDF4.4.1-rc1-NC4-DAP-64.exe
+[r1]: http://www.unidata.ucar.edu/downloads/netcdf/ftp/netCDF4.4.1-rc2-NC3-32.exe
+[r2]: http://www.unidata.ucar.edu/downloads/netcdf/ftp/netCDF4.4.1-rc2-NC3-DAP-32.exe
+[r3]: http://www.unidata.ucar.edu/downloads/netcdf/ftp/netCDF4.4.1-rc2-NC4-32.exe
+[r4]: http://www.unidata.ucar.edu/downloads/netcdf/ftp/netCDF4.4.1-rc2-NC4-DAP-32.exe
+[r6]: http://www.unidata.ucar.edu/downloads/netcdf/ftp/netCDF4.4.1-rc2-NC3-64.exe
+[r6]: http://www.unidata.ucar.edu/downloads/netcdf/ftp/netCDF4.4.1-rc2-NC3-DAP-64.exe
+[r7]: http://www.unidata.ucar.edu/downloads/netcdf/ftp/netCDF4.4.1-rc2-NC4-64.exe
+[r8]: http://www.unidata.ucar.edu/downloads/netcdf/ftp/netCDF4.4.1-rc2-NC4-DAP-64.exe
diff --git a/examples/C/Makefile.in b/examples/C/Makefile.in
index dcc5a72..f5dca74 100644
--- a/examples/C/Makefile.in
+++ b/examples/C/Makefile.in
@@ -269,190 +269,7 @@ am__tty_colors = { \
     std=''; \
   fi; \
 }
-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 = f=`echo $$p | sed -e 's|^.*/||'`;
-am__install_max = 40
-am__nobase_strip_setup = \
-  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
-am__nobase_strip = \
-  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
-am__nobase_list = $(am__nobase_strip_setup); \
-  for p in $$list; do echo "$$p $$p"; done | \
-  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
-  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
-    if (++n[$$2] == $(am__install_max)) \
-      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
-    END { for (dir in files) print dir, files[dir] }'
-am__base_list = \
-  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
-  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-am__uninstall_files_from_dir = { \
-  test -z "$$files" \
-    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
-    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
-         $(am__cd) "$$dir" && rm -f $$files; }; \
-  }
-am__recheck_rx = ^[ 	]*:recheck:[ 	]*
-am__global_test_result_rx = ^[ 	]*:global-test-result:[ 	]*
-am__copy_in_global_log_rx = ^[ 	]*:copy-in-global-log:[ 	]*
-# A command that, given a newline-separated list of test names on the
-# standard input, print the name of the tests that are to be re-run
-# upon "make recheck".
-am__list_recheck_tests = $(AWK) '{ \
-  recheck = 1; \
-  while ((rc = (getline line < ($$0 ".trs"))) != 0) \
-    { \
-      if (rc < 0) \
-        { \
-          if ((getline line2 < ($$0 ".log")) < 0) \
-	    recheck = 0; \
-          break; \
-        } \
-      else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
-        { \
-          recheck = 0; \
-          break; \
-        } \
-      else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
-        { \
-          break; \
-        } \
-    }; \
-  if (recheck) \
-    print $$0; \
-  close ($$0 ".trs"); \
-  close ($$0 ".log"); \
-}'
-# A command that, given a newline-separated list of test names on the
-# standard input, create the global log from their .trs and .log files.
-am__create_global_log = $(AWK) ' \
-function fatal(msg) \
-{ \
-  print "fatal: making $@: " msg | "cat >&2"; \
-  exit 1; \
-} \
-function rst_section(header) \
-{ \
-  print header; \
-  len = length(header); \
-  for (i = 1; i <= len; i = i + 1) \
-    printf "="; \
-  printf "\n\n"; \
-} \
-{ \
-  copy_in_global_log = 1; \
-  global_test_result = "RUN"; \
-  while ((rc = (getline line < ($$0 ".trs"))) != 0) \
-    { \
-      if (rc < 0) \
-         fatal("failed to read from " $$0 ".trs"); \
-      if (line ~ /$(am__global_test_result_rx)/) \
-        { \
-          sub("$(am__global_test_result_rx)", "", line); \
-          sub("[ 	]*$$", "", line); \
-          global_test_result = line; \
-        } \
-      else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
-        copy_in_global_log = 0; \
-    }; \
-  if (copy_in_global_log) \
-    { \
-      rst_section(global_test_result ": " $$0); \
-      while ((rc = (getline line < ($$0 ".log"))) != 0) \
-      { \
-        if (rc < 0) \
-          fatal("failed to read from " $$0 ".log"); \
-        print line; \
-      }; \
-      printf "\n"; \
-    }; \
-  close ($$0 ".trs"); \
-  close ($$0 ".log"); \
-}'
-# Restructured Text title.
-am__rst_title = { sed 's/.*/   &   /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
-# Solaris 10 'make', and several other traditional 'make' implementations,
-# pass "-e" to $(SHELL), and POSIX 2008 even requires this.  Work around it
-# by disabling -e (using the XSI extension "set +e") if it's set.
-am__sh_e_setup = case $$- in *e*) set +e;; esac
-# Default flags passed to test drivers.
-am__common_driver_flags = \
-  --color-tests "$$am__color_tests" \
-  --enable-hard-errors "$$am__enable_hard_errors" \
-  --expect-failure "$$am__expect_failure"
-# To be inserted before the command running the test.  Creates the
-# directory for the log if needed.  Stores in $dir the directory
-# containing $f, in $tst the test, in $log the log.  Executes the
-# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
-# passes TESTS_ENVIRONMENT.  Set up options for the wrapper that
-# will run the test scripts (or their associated LOG_COMPILER, if
-# thy have one).
-am__check_pre = \
-$(am__sh_e_setup);					\
-$(am__vpath_adj_setup) $(am__vpath_adj)			\
-$(am__tty_colors);					\
-srcdir=$(srcdir); export srcdir;			\
-case "$@" in						\
-  */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;;	\
-    *) am__odir=.;; 					\
-esac;							\
-test "x$$am__odir" = x"." || test -d "$$am__odir" 	\
-  || $(MKDIR_P) "$$am__odir" || exit $$?;		\
-if test -f "./$$f"; then dir=./;			\
-elif test -f "$$f"; then dir=;				\
-else dir="$(srcdir)/"; fi;				\
-tst=$$dir$$f; log='$@'; 				\
-if test -n '$(DISABLE_HARD_ERRORS)'; then		\
-  am__enable_hard_errors=no; 				\
-else							\
-  am__enable_hard_errors=yes; 				\
-fi; 							\
-case " $(XFAIL_TESTS) " in				\
-  *[\ \	]$$f[\ \	]* | *[\ \	]$$dir$$f[\ \	]*) \
-    am__expect_failure=yes;;				\
-  *)							\
-    am__expect_failure=no;;				\
-esac; 							\
-$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
-# A shell command to get the names of the tests scripts with any registered
-# extension removed (i.e., equivalently, the names of the test logs, with
-# the '.log' extension removed).  The result is saved in the shell variable
-# '$bases'.  This honors runtime overriding of TESTS and TEST_LOGS.  Sadly,
-# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
-# since that might cause problem with VPATH rewrites for suffix-less tests.
-# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
-am__set_TESTS_bases = \
-  bases='$(TEST_LOGS)'; \
-  bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
-  bases=`echo $$bases`
-RECHECK_LOGS = $(TEST_LOGS)
-AM_RECURSIVE_TARGETS = check recheck
-TEST_SUITE_LOG = test-suite.log
-TEST_EXTENSIONS = @EXEEXT@ .test
-LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
-LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS)
-am__set_b = \
-  case '$@' in \
-    */*) \
-      case '$*' in \
-        */*) b='$*';; \
-          *) b=`echo '$@' | sed 's/\.log$$//'`; \
-       esac;; \
-    *) \
-      b='$*';; \
-  esac
-am__test_logs1 = $(TESTS:=.log)
-am__test_logs2 = $(am__test_logs1:@EXEEXT at .log=.log)
-TEST_LOGS = $(am__test_logs2:.test.log=.log)
-TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
-TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
-	$(TEST_LOG_FLAGS)
-am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \
-	$(top_srcdir)/test-driver
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
@@ -641,7 +458,7 @@ EXTRA_DIST = run_valgrind_tests.sh run_nc4_valgrind_tests.sh CMakeLists.txt
 all: all-am
 
 .SUFFIXES:
-.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs
+.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 \
@@ -825,252 +642,98 @@ cscopelist-am: $(am__tagged_files)
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
-# Recover from deleted '.trs' file; this should ensure that
-# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
-# both 'foo.log' and 'foo.trs'.  Break the recipe in two subshells
-# to avoid problems with "make -n".
-.log.trs:
-	rm -f $< $@
-	$(MAKE) $(AM_MAKEFLAGS) $<
-
-# Leading 'am--fnord' is there to ensure the list of targets does not
-# expand to empty, as could happen e.g. with make check TESTS=''.
-am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
-am--force-recheck:
-	@:
-
-$(TEST_SUITE_LOG): $(TEST_LOGS)
-	@$(am__set_TESTS_bases); \
-	am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
-	redo_bases=`for i in $$bases; do \
-	              am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
-	            done`; \
-	if test -n "$$redo_bases"; then \
-	  redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
-	  redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
-	  if $(am__make_dryrun); then :; else \
-	    rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
-	  fi; \
-	fi; \
-	if test -n "$$am__remaking_logs"; then \
-	  echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
-	       "recursion detected" >&2; \
-	elif test -n "$$redo_logs"; then \
-	  am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
-	fi; \
-	if $(am__make_dryrun); then :; else \
-	  st=0;  \
-	  errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
-	  for i in $$redo_bases; do \
-	    test -f $$i.trs && test -r $$i.trs \
-	      || { echo "$$errmsg $$i.trs" >&2; st=1; }; \
-	    test -f $$i.log && test -r $$i.log \
-	      || { echo "$$errmsg $$i.log" >&2; st=1; }; \
+check-TESTS: $(TESTS)
+	@failed=0; all=0; xfail=0; xpass=0; skip=0; \
+	srcdir=$(srcdir); export srcdir; \
+	list=' $(TESTS) '; \
+	$(am__tty_colors); \
+	if test -n "$$list"; then \
+	  for tst in $$list; do \
+	    if test -f ./$$tst; then dir=./; \
+	    elif test -f $$tst; then dir=; \
+	    else dir="$(srcdir)/"; fi; \
+	    if $(TESTS_ENVIRONMENT) $${dir}$$tst $(AM_TESTS_FD_REDIRECT); then \
+	      all=`expr $$all + 1`; \
+	      case " $(XFAIL_TESTS) " in \
+	      *[\ \	]$$tst[\ \	]*) \
+		xpass=`expr $$xpass + 1`; \
+		failed=`expr $$failed + 1`; \
+		col=$$red; res=XPASS; \
+	      ;; \
+	      *) \
+		col=$$grn; res=PASS; \
+	      ;; \
+	      esac; \
+	    elif test $$? -ne 77; then \
+	      all=`expr $$all + 1`; \
+	      case " $(XFAIL_TESTS) " in \
+	      *[\ \	]$$tst[\ \	]*) \
+		xfail=`expr $$xfail + 1`; \
+		col=$$lgn; res=XFAIL; \
+	      ;; \
+	      *) \
+		failed=`expr $$failed + 1`; \
+		col=$$red; res=FAIL; \
+	      ;; \
+	      esac; \
+	    else \
+	      skip=`expr $$skip + 1`; \
+	      col=$$blu; res=SKIP; \
+	    fi; \
+	    echo "$${col}$$res$${std}: $$tst"; \
 	  done; \
-	  test $$st -eq 0 || exit 1; \
-	fi
-	@$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
-	ws='[ 	]'; \
-	results=`for b in $$bases; do echo $$b.trs; done`; \
-	test -n "$$results" || results=/dev/null; \
-	all=`  grep "^$$ws*:test-result:"           $$results | wc -l`; \
-	pass=` grep "^$$ws*:test-result:$$ws*PASS"  $$results | wc -l`; \
-	fail=` grep "^$$ws*:test-result:$$ws*FAIL"  $$results | wc -l`; \
-	skip=` grep "^$$ws*:test-result:$$ws*SKIP"  $$results | wc -l`; \
-	xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
-	xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
-	error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
-	if test `expr $$fail + $$xpass + $$error` -eq 0; then \
-	  success=true; \
-	else \
-	  success=false; \
-	fi; \
-	br='==================='; br=$$br$$br$$br$$br; \
-	result_count () \
-	{ \
-	    if test x"$$1" = x"--maybe-color"; then \
-	      maybe_colorize=yes; \
-	    elif test x"$$1" = x"--no-color"; then \
-	      maybe_colorize=no; \
+	  if test "$$all" -eq 1; then \
+	    tests="test"; \
+	    All=""; \
+	  else \
+	    tests="tests"; \
+	    All="All "; \
+	  fi; \
+	  if test "$$failed" -eq 0; then \
+	    if test "$$xfail" -eq 0; then \
+	      banner="$$All$$all $$tests passed"; \
 	    else \
-	      echo "$@: invalid 'result_count' usage" >&2; exit 4; \
+	      if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
+	      banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
 	    fi; \
-	    shift; \
-	    desc=$$1 count=$$2; \
-	    if test $$maybe_colorize = yes && test $$count -gt 0; then \
-	      color_start=$$3 color_end=$$std; \
+	  else \
+	    if test "$$xpass" -eq 0; then \
+	      banner="$$failed of $$all $$tests failed"; \
+	    else \
+	      if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
+	      banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
+	    fi; \
+	  fi; \
+	  dashes="$$banner"; \
+	  skipped=""; \
+	  if test "$$skip" -ne 0; then \
+	    if test "$$skip" -eq 1; then \
+	      skipped="($$skip test was not run)"; \
 	    else \
-	      color_start= color_end=; \
+	      skipped="($$skip tests were not run)"; \
 	    fi; \
-	    echo "$${color_start}# $$desc $$count$${color_end}"; \
-	}; \
-	create_testsuite_report () \
-	{ \
-	  result_count $$1 "TOTAL:" $$all   "$$brg"; \
-	  result_count $$1 "PASS: " $$pass  "$$grn"; \
-	  result_count $$1 "SKIP: " $$skip  "$$blu"; \
-	  result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
-	  result_count $$1 "FAIL: " $$fail  "$$red"; \
-	  result_count $$1 "XPASS:" $$xpass "$$red"; \
-	  result_count $$1 "ERROR:" $$error "$$mgn"; \
-	}; \
-	{								\
-	  echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" |	\
-	    $(am__rst_title);						\
-	  create_testsuite_report --no-color;				\
-	  echo;								\
-	  echo ".. contents:: :depth: 2";				\
-	  echo;								\
-	  for b in $$bases; do echo $$b; done				\
-	    | $(am__create_global_log);					\
-	} >$(TEST_SUITE_LOG).tmp || exit 1;				\
-	mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG);			\
-	if $$success; then						\
-	  col="$$grn";							\
-	 else								\
-	  col="$$red";							\
-	  test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG);		\
-	fi;								\
-	echo "$${col}$$br$${std}"; 					\
-	echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}";	\
-	echo "$${col}$$br$${std}"; 					\
-	create_testsuite_report --maybe-color;				\
-	echo "$$col$$br$$std";						\
-	if $$success; then :; else					\
-	  echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}";		\
-	  if test -n "$(PACKAGE_BUGREPORT)"; then			\
-	    echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}";	\
-	  fi;								\
-	  echo "$$col$$br$$std";					\
-	fi;								\
-	$$success || exit 1
-
-check-TESTS:
-	@list='$(RECHECK_LOGS)';           test -z "$$list" || rm -f $$list
-	@list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
-	@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
-	@set +e; $(am__set_TESTS_bases); \
-	log_list=`for i in $$bases; do echo $$i.log; done`; \
-	trs_list=`for i in $$bases; do echo $$i.trs; done`; \
-	log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
-	$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
-	exit $$?;
-recheck: all $(check_PROGRAMS)
-	@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
-	@set +e; $(am__set_TESTS_bases); \
-	bases=`for i in $$bases; do echo $$i; done \
-	         | $(am__list_recheck_tests)` || exit 1; \
-	log_list=`for i in $$bases; do echo $$i.log; done`; \
-	log_list=`echo $$log_list`; \
-	$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
-	        am__force_recheck=am--force-recheck \
-	        TEST_LOGS="$$log_list"; \
-	exit $$?
-simple_xy_wr.log: simple_xy_wr$(EXEEXT)
-	@p='simple_xy_wr$(EXEEXT)'; \
-	b='simple_xy_wr'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-simple_xy_rd.log: simple_xy_rd$(EXEEXT)
-	@p='simple_xy_rd$(EXEEXT)'; \
-	b='simple_xy_rd'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-sfc_pres_temp_wr.log: sfc_pres_temp_wr$(EXEEXT)
-	@p='sfc_pres_temp_wr$(EXEEXT)'; \
-	b='sfc_pres_temp_wr'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-sfc_pres_temp_rd.log: sfc_pres_temp_rd$(EXEEXT)
-	@p='sfc_pres_temp_rd$(EXEEXT)'; \
-	b='sfc_pres_temp_rd'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-pres_temp_4D_wr.log: pres_temp_4D_wr$(EXEEXT)
-	@p='pres_temp_4D_wr$(EXEEXT)'; \
-	b='pres_temp_4D_wr'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-pres_temp_4D_rd.log: pres_temp_4D_rd$(EXEEXT)
-	@p='pres_temp_4D_rd$(EXEEXT)'; \
-	b='pres_temp_4D_rd'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-simple_nc4_wr.log: simple_nc4_wr$(EXEEXT)
-	@p='simple_nc4_wr$(EXEEXT)'; \
-	b='simple_nc4_wr'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-simple_nc4_rd.log: simple_nc4_rd$(EXEEXT)
-	@p='simple_nc4_rd$(EXEEXT)'; \
-	b='simple_nc4_rd'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-simple_xy_nc4_wr.log: simple_xy_nc4_wr$(EXEEXT)
-	@p='simple_xy_nc4_wr$(EXEEXT)'; \
-	b='simple_xy_nc4_wr'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-simple_xy_nc4_rd.log: simple_xy_nc4_rd$(EXEEXT)
-	@p='simple_xy_nc4_rd$(EXEEXT)'; \
-	b='simple_xy_nc4_rd'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-parallel_vara.log: parallel_vara$(EXEEXT)
-	@p='parallel_vara$(EXEEXT)'; \
-	b='parallel_vara'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-run_valgrind_tests.sh.log: run_valgrind_tests.sh
-	@p='run_valgrind_tests.sh'; \
-	b='run_valgrind_tests.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-run_nc4_valgrind_tests.sh.log: run_nc4_valgrind_tests.sh
-	@p='run_nc4_valgrind_tests.sh'; \
-	b='run_nc4_valgrind_tests.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-.test.log:
-	@p='$<'; \
-	$(am__set_b); \
-	$(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
- at am__EXEEXT_TRUE@.test$(EXEEXT).log:
- at am__EXEEXT_TRUE@	@p='$<'; \
- at am__EXEEXT_TRUE@	$(am__set_b); \
- at am__EXEEXT_TRUE@	$(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
- at am__EXEEXT_TRUE@	--log-file $$b.log --trs-file $$b.trs \
- at am__EXEEXT_TRUE@	$(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
- at am__EXEEXT_TRUE@	"$$tst" $(AM_TESTS_FD_REDIRECT)
+	    test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
+	      dashes="$$skipped"; \
+	  fi; \
+	  report=""; \
+	  if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
+	    report="Please report to $(PACKAGE_BUGREPORT)"; \
+	    test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
+	      dashes="$$report"; \
+	  fi; \
+	  dashes=`echo "$$dashes" | sed s/./=/g`; \
+	  if test "$$failed" -eq 0; then \
+	    col="$$grn"; \
+	  else \
+	    col="$$red"; \
+	  fi; \
+	  echo "$${col}$$dashes$${std}"; \
+	  echo "$${col}$$banner$${std}"; \
+	  test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \
+	  test -z "$$report" || echo "$${col}$$report$${std}"; \
+	  echo "$${col}$$dashes$${std}"; \
+	  test "$$failed" -eq 0; \
+	else :; fi
 
 distdir: $(DISTFILES)
 	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@@ -1128,9 +791,6 @@ install-strip:
 	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
 	fi
 mostlyclean-generic:
-	-test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
-	-test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
-	-test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
 
 clean-generic:
 	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
@@ -1227,7 +887,7 @@ uninstall-am:
 	installcheck-am installdirs maintainer-clean \
 	maintainer-clean-generic mostlyclean mostlyclean-compile \
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-	recheck tags tags-am uninstall uninstall-am
+	tags tags-am uninstall uninstall-am
 
 .PRECIOUS: Makefile
 
diff --git a/examples/CDL/Makefile.in b/examples/CDL/Makefile.in
index 745016a..eeb1047 100644
--- a/examples/CDL/Makefile.in
+++ b/examples/CDL/Makefile.in
@@ -149,189 +149,7 @@ am__tty_colors = { \
     std=''; \
   fi; \
 }
-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 = f=`echo $$p | sed -e 's|^.*/||'`;
-am__install_max = 40
-am__nobase_strip_setup = \
-  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
-am__nobase_strip = \
-  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
-am__nobase_list = $(am__nobase_strip_setup); \
-  for p in $$list; do echo "$$p $$p"; done | \
-  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
-  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
-    if (++n[$$2] == $(am__install_max)) \
-      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
-    END { for (dir in files) print dir, files[dir] }'
-am__base_list = \
-  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
-  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-am__uninstall_files_from_dir = { \
-  test -z "$$files" \
-    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
-    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
-         $(am__cd) "$$dir" && rm -f $$files; }; \
-  }
-am__recheck_rx = ^[ 	]*:recheck:[ 	]*
-am__global_test_result_rx = ^[ 	]*:global-test-result:[ 	]*
-am__copy_in_global_log_rx = ^[ 	]*:copy-in-global-log:[ 	]*
-# A command that, given a newline-separated list of test names on the
-# standard input, print the name of the tests that are to be re-run
-# upon "make recheck".
-am__list_recheck_tests = $(AWK) '{ \
-  recheck = 1; \
-  while ((rc = (getline line < ($$0 ".trs"))) != 0) \
-    { \
-      if (rc < 0) \
-        { \
-          if ((getline line2 < ($$0 ".log")) < 0) \
-	    recheck = 0; \
-          break; \
-        } \
-      else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
-        { \
-          recheck = 0; \
-          break; \
-        } \
-      else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
-        { \
-          break; \
-        } \
-    }; \
-  if (recheck) \
-    print $$0; \
-  close ($$0 ".trs"); \
-  close ($$0 ".log"); \
-}'
-# A command that, given a newline-separated list of test names on the
-# standard input, create the global log from their .trs and .log files.
-am__create_global_log = $(AWK) ' \
-function fatal(msg) \
-{ \
-  print "fatal: making $@: " msg | "cat >&2"; \
-  exit 1; \
-} \
-function rst_section(header) \
-{ \
-  print header; \
-  len = length(header); \
-  for (i = 1; i <= len; i = i + 1) \
-    printf "="; \
-  printf "\n\n"; \
-} \
-{ \
-  copy_in_global_log = 1; \
-  global_test_result = "RUN"; \
-  while ((rc = (getline line < ($$0 ".trs"))) != 0) \
-    { \
-      if (rc < 0) \
-         fatal("failed to read from " $$0 ".trs"); \
-      if (line ~ /$(am__global_test_result_rx)/) \
-        { \
-          sub("$(am__global_test_result_rx)", "", line); \
-          sub("[ 	]*$$", "", line); \
-          global_test_result = line; \
-        } \
-      else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
-        copy_in_global_log = 0; \
-    }; \
-  if (copy_in_global_log) \
-    { \
-      rst_section(global_test_result ": " $$0); \
-      while ((rc = (getline line < ($$0 ".log"))) != 0) \
-      { \
-        if (rc < 0) \
-          fatal("failed to read from " $$0 ".log"); \
-        print line; \
-      }; \
-      printf "\n"; \
-    }; \
-  close ($$0 ".trs"); \
-  close ($$0 ".log"); \
-}'
-# Restructured Text title.
-am__rst_title = { sed 's/.*/   &   /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
-# Solaris 10 'make', and several other traditional 'make' implementations,
-# pass "-e" to $(SHELL), and POSIX 2008 even requires this.  Work around it
-# by disabling -e (using the XSI extension "set +e") if it's set.
-am__sh_e_setup = case $$- in *e*) set +e;; esac
-# Default flags passed to test drivers.
-am__common_driver_flags = \
-  --color-tests "$$am__color_tests" \
-  --enable-hard-errors "$$am__enable_hard_errors" \
-  --expect-failure "$$am__expect_failure"
-# To be inserted before the command running the test.  Creates the
-# directory for the log if needed.  Stores in $dir the directory
-# containing $f, in $tst the test, in $log the log.  Executes the
-# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
-# passes TESTS_ENVIRONMENT.  Set up options for the wrapper that
-# will run the test scripts (or their associated LOG_COMPILER, if
-# thy have one).
-am__check_pre = \
-$(am__sh_e_setup);					\
-$(am__vpath_adj_setup) $(am__vpath_adj)			\
-$(am__tty_colors);					\
-srcdir=$(srcdir); export srcdir;			\
-case "$@" in						\
-  */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;;	\
-    *) am__odir=.;; 					\
-esac;							\
-test "x$$am__odir" = x"." || test -d "$$am__odir" 	\
-  || $(MKDIR_P) "$$am__odir" || exit $$?;		\
-if test -f "./$$f"; then dir=./;			\
-elif test -f "$$f"; then dir=;				\
-else dir="$(srcdir)/"; fi;				\
-tst=$$dir$$f; log='$@'; 				\
-if test -n '$(DISABLE_HARD_ERRORS)'; then		\
-  am__enable_hard_errors=no; 				\
-else							\
-  am__enable_hard_errors=yes; 				\
-fi; 							\
-case " $(XFAIL_TESTS) " in				\
-  *[\ \	]$$f[\ \	]* | *[\ \	]$$dir$$f[\ \	]*) \
-    am__expect_failure=yes;;				\
-  *)							\
-    am__expect_failure=no;;				\
-esac; 							\
-$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
-# A shell command to get the names of the tests scripts with any registered
-# extension removed (i.e., equivalently, the names of the test logs, with
-# the '.log' extension removed).  The result is saved in the shell variable
-# '$bases'.  This honors runtime overriding of TESTS and TEST_LOGS.  Sadly,
-# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
-# since that might cause problem with VPATH rewrites for suffix-less tests.
-# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
-am__set_TESTS_bases = \
-  bases='$(TEST_LOGS)'; \
-  bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
-  bases=`echo $$bases`
-RECHECK_LOGS = $(TEST_LOGS)
-AM_RECURSIVE_TARGETS = check recheck
-TEST_SUITE_LOG = test-suite.log
-TEST_EXTENSIONS = @EXEEXT@ .test
-LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
-LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS)
-am__set_b = \
-  case '$@' in \
-    */*) \
-      case '$*' in \
-        */*) b='$*';; \
-          *) b=`echo '$@' | sed 's/\.log$$//'`; \
-       esac;; \
-    *) \
-      b='$*';; \
-  esac
-am__test_logs1 = $(TESTS:=.log)
-am__test_logs2 = $(am__test_logs1:@EXEEXT at .log=.log)
-TEST_LOGS = $(am__test_logs2:.test.log=.log)
-TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
-TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
-	$(TEST_LOG_FLAGS)
-am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/test-driver
+am__DIST_COMMON = $(srcdir)/Makefile.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
@@ -522,7 +340,6 @@ CLEANFILES = simple_xy.nc sfc_pres_temp.nc pres_temp_4D.nc
 all: all-am
 
 .SUFFIXES:
-.SUFFIXES: .log .test .test$(EXEEXT) .trs
 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
@@ -565,175 +382,98 @@ ctags CTAGS:
 cscope cscopelist:
 
 
-# Recover from deleted '.trs' file; this should ensure that
-# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
-# both 'foo.log' and 'foo.trs'.  Break the recipe in two subshells
-# to avoid problems with "make -n".
-.log.trs:
-	rm -f $< $@
-	$(MAKE) $(AM_MAKEFLAGS) $<
-
-# Leading 'am--fnord' is there to ensure the list of targets does not
-# expand to empty, as could happen e.g. with make check TESTS=''.
-am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
-am--force-recheck:
-	@:
-
-$(TEST_SUITE_LOG): $(TEST_LOGS)
-	@$(am__set_TESTS_bases); \
-	am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
-	redo_bases=`for i in $$bases; do \
-	              am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
-	            done`; \
-	if test -n "$$redo_bases"; then \
-	  redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
-	  redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
-	  if $(am__make_dryrun); then :; else \
-	    rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
-	  fi; \
-	fi; \
-	if test -n "$$am__remaking_logs"; then \
-	  echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
-	       "recursion detected" >&2; \
-	elif test -n "$$redo_logs"; then \
-	  am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
-	fi; \
-	if $(am__make_dryrun); then :; else \
-	  st=0;  \
-	  errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
-	  for i in $$redo_bases; do \
-	    test -f $$i.trs && test -r $$i.trs \
-	      || { echo "$$errmsg $$i.trs" >&2; st=1; }; \
-	    test -f $$i.log && test -r $$i.log \
-	      || { echo "$$errmsg $$i.log" >&2; st=1; }; \
+check-TESTS: $(TESTS)
+	@failed=0; all=0; xfail=0; xpass=0; skip=0; \
+	srcdir=$(srcdir); export srcdir; \
+	list=' $(TESTS) '; \
+	$(am__tty_colors); \
+	if test -n "$$list"; then \
+	  for tst in $$list; do \
+	    if test -f ./$$tst; then dir=./; \
+	    elif test -f $$tst; then dir=; \
+	    else dir="$(srcdir)/"; fi; \
+	    if $(TESTS_ENVIRONMENT) $${dir}$$tst $(AM_TESTS_FD_REDIRECT); then \
+	      all=`expr $$all + 1`; \
+	      case " $(XFAIL_TESTS) " in \
+	      *[\ \	]$$tst[\ \	]*) \
+		xpass=`expr $$xpass + 1`; \
+		failed=`expr $$failed + 1`; \
+		col=$$red; res=XPASS; \
+	      ;; \
+	      *) \
+		col=$$grn; res=PASS; \
+	      ;; \
+	      esac; \
+	    elif test $$? -ne 77; then \
+	      all=`expr $$all + 1`; \
+	      case " $(XFAIL_TESTS) " in \
+	      *[\ \	]$$tst[\ \	]*) \
+		xfail=`expr $$xfail + 1`; \
+		col=$$lgn; res=XFAIL; \
+	      ;; \
+	      *) \
+		failed=`expr $$failed + 1`; \
+		col=$$red; res=FAIL; \
+	      ;; \
+	      esac; \
+	    else \
+	      skip=`expr $$skip + 1`; \
+	      col=$$blu; res=SKIP; \
+	    fi; \
+	    echo "$${col}$$res$${std}: $$tst"; \
 	  done; \
-	  test $$st -eq 0 || exit 1; \
-	fi
-	@$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
-	ws='[ 	]'; \
-	results=`for b in $$bases; do echo $$b.trs; done`; \
-	test -n "$$results" || results=/dev/null; \
-	all=`  grep "^$$ws*:test-result:"           $$results | wc -l`; \
-	pass=` grep "^$$ws*:test-result:$$ws*PASS"  $$results | wc -l`; \
-	fail=` grep "^$$ws*:test-result:$$ws*FAIL"  $$results | wc -l`; \
-	skip=` grep "^$$ws*:test-result:$$ws*SKIP"  $$results | wc -l`; \
-	xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
-	xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
-	error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
-	if test `expr $$fail + $$xpass + $$error` -eq 0; then \
-	  success=true; \
-	else \
-	  success=false; \
-	fi; \
-	br='==================='; br=$$br$$br$$br$$br; \
-	result_count () \
-	{ \
-	    if test x"$$1" = x"--maybe-color"; then \
-	      maybe_colorize=yes; \
-	    elif test x"$$1" = x"--no-color"; then \
-	      maybe_colorize=no; \
+	  if test "$$all" -eq 1; then \
+	    tests="test"; \
+	    All=""; \
+	  else \
+	    tests="tests"; \
+	    All="All "; \
+	  fi; \
+	  if test "$$failed" -eq 0; then \
+	    if test "$$xfail" -eq 0; then \
+	      banner="$$All$$all $$tests passed"; \
 	    else \
-	      echo "$@: invalid 'result_count' usage" >&2; exit 4; \
+	      if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
+	      banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
 	    fi; \
-	    shift; \
-	    desc=$$1 count=$$2; \
-	    if test $$maybe_colorize = yes && test $$count -gt 0; then \
-	      color_start=$$3 color_end=$$std; \
+	  else \
+	    if test "$$xpass" -eq 0; then \
+	      banner="$$failed of $$all $$tests failed"; \
+	    else \
+	      if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
+	      banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
+	    fi; \
+	  fi; \
+	  dashes="$$banner"; \
+	  skipped=""; \
+	  if test "$$skip" -ne 0; then \
+	    if test "$$skip" -eq 1; then \
+	      skipped="($$skip test was not run)"; \
 	    else \
-	      color_start= color_end=; \
+	      skipped="($$skip tests were not run)"; \
 	    fi; \
-	    echo "$${color_start}# $$desc $$count$${color_end}"; \
-	}; \
-	create_testsuite_report () \
-	{ \
-	  result_count $$1 "TOTAL:" $$all   "$$brg"; \
-	  result_count $$1 "PASS: " $$pass  "$$grn"; \
-	  result_count $$1 "SKIP: " $$skip  "$$blu"; \
-	  result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
-	  result_count $$1 "FAIL: " $$fail  "$$red"; \
-	  result_count $$1 "XPASS:" $$xpass "$$red"; \
-	  result_count $$1 "ERROR:" $$error "$$mgn"; \
-	}; \
-	{								\
-	  echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" |	\
-	    $(am__rst_title);						\
-	  create_testsuite_report --no-color;				\
-	  echo;								\
-	  echo ".. contents:: :depth: 2";				\
-	  echo;								\
-	  for b in $$bases; do echo $$b; done				\
-	    | $(am__create_global_log);					\
-	} >$(TEST_SUITE_LOG).tmp || exit 1;				\
-	mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG);			\
-	if $$success; then						\
-	  col="$$grn";							\
-	 else								\
-	  col="$$red";							\
-	  test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG);		\
-	fi;								\
-	echo "$${col}$$br$${std}"; 					\
-	echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}";	\
-	echo "$${col}$$br$${std}"; 					\
-	create_testsuite_report --maybe-color;				\
-	echo "$$col$$br$$std";						\
-	if $$success; then :; else					\
-	  echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}";		\
-	  if test -n "$(PACKAGE_BUGREPORT)"; then			\
-	    echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}";	\
-	  fi;								\
-	  echo "$$col$$br$$std";					\
-	fi;								\
-	$$success || exit 1
-
-check-TESTS:
-	@list='$(RECHECK_LOGS)';           test -z "$$list" || rm -f $$list
-	@list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
-	@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
-	@set +e; $(am__set_TESTS_bases); \
-	log_list=`for i in $$bases; do echo $$i.log; done`; \
-	trs_list=`for i in $$bases; do echo $$i.trs; done`; \
-	log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
-	$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
-	exit $$?;
-recheck: all 
-	@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
-	@set +e; $(am__set_TESTS_bases); \
-	bases=`for i in $$bases; do echo $$i; done \
-	         | $(am__list_recheck_tests)` || exit 1; \
-	log_list=`for i in $$bases; do echo $$i.log; done`; \
-	log_list=`echo $$log_list`; \
-	$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
-	        am__force_recheck=am--force-recheck \
-	        TEST_LOGS="$$log_list"; \
-	exit $$?
-create_sample_files.sh.log: create_sample_files.sh
-	@p='create_sample_files.sh'; \
-	b='create_sample_files.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-do_comps.sh.log: do_comps.sh
-	@p='do_comps.sh'; \
-	b='do_comps.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-.test.log:
-	@p='$<'; \
-	$(am__set_b); \
-	$(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
- at am__EXEEXT_TRUE@.test$(EXEEXT).log:
- at am__EXEEXT_TRUE@	@p='$<'; \
- at am__EXEEXT_TRUE@	$(am__set_b); \
- at am__EXEEXT_TRUE@	$(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
- at am__EXEEXT_TRUE@	--log-file $$b.log --trs-file $$b.trs \
- at am__EXEEXT_TRUE@	$(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
- at am__EXEEXT_TRUE@	"$$tst" $(AM_TESTS_FD_REDIRECT)
+	    test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
+	      dashes="$$skipped"; \
+	  fi; \
+	  report=""; \
+	  if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
+	    report="Please report to $(PACKAGE_BUGREPORT)"; \
+	    test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
+	      dashes="$$report"; \
+	  fi; \
+	  dashes=`echo "$$dashes" | sed s/./=/g`; \
+	  if test "$$failed" -eq 0; then \
+	    col="$$grn"; \
+	  else \
+	    col="$$red"; \
+	  fi; \
+	  echo "$${col}$$dashes$${std}"; \
+	  echo "$${col}$$banner$${std}"; \
+	  test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \
+	  test -z "$$report" || echo "$${col}$$report$${std}"; \
+	  echo "$${col}$$dashes$${std}"; \
+	  test "$$failed" -eq 0; \
+	else :; fi
 
 distdir: $(DISTFILES)
 	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@@ -790,9 +530,6 @@ install-strip:
 	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
 	fi
 mostlyclean-generic:
-	-test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
-	-test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
-	-test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
 
 clean-generic:
 	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
@@ -882,8 +619,8 @@ uninstall-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 recheck tags-am \
-	uninstall uninstall-am
+	mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \
+	uninstall-am
 
 .PRECIOUS: Makefile
 
diff --git a/h5_test/Makefile.in b/h5_test/Makefile.in
index b1120cd..c036c68 100644
--- a/h5_test/Makefile.in
+++ b/h5_test/Makefile.in
@@ -334,190 +334,8 @@ am__tty_colors = { \
     std=''; \
   fi; \
 }
-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 = f=`echo $$p | sed -e 's|^.*/||'`;
-am__install_max = 40
-am__nobase_strip_setup = \
-  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
-am__nobase_strip = \
-  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
-am__nobase_list = $(am__nobase_strip_setup); \
-  for p in $$list; do echo "$$p $$p"; done | \
-  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
-  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
-    if (++n[$$2] == $(am__install_max)) \
-      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
-    END { for (dir in files) print dir, files[dir] }'
-am__base_list = \
-  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
-  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-am__uninstall_files_from_dir = { \
-  test -z "$$files" \
-    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
-    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
-         $(am__cd) "$$dir" && rm -f $$files; }; \
-  }
-am__recheck_rx = ^[ 	]*:recheck:[ 	]*
-am__global_test_result_rx = ^[ 	]*:global-test-result:[ 	]*
-am__copy_in_global_log_rx = ^[ 	]*:copy-in-global-log:[ 	]*
-# A command that, given a newline-separated list of test names on the
-# standard input, print the name of the tests that are to be re-run
-# upon "make recheck".
-am__list_recheck_tests = $(AWK) '{ \
-  recheck = 1; \
-  while ((rc = (getline line < ($$0 ".trs"))) != 0) \
-    { \
-      if (rc < 0) \
-        { \
-          if ((getline line2 < ($$0 ".log")) < 0) \
-	    recheck = 0; \
-          break; \
-        } \
-      else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
-        { \
-          recheck = 0; \
-          break; \
-        } \
-      else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
-        { \
-          break; \
-        } \
-    }; \
-  if (recheck) \
-    print $$0; \
-  close ($$0 ".trs"); \
-  close ($$0 ".log"); \
-}'
-# A command that, given a newline-separated list of test names on the
-# standard input, create the global log from their .trs and .log files.
-am__create_global_log = $(AWK) ' \
-function fatal(msg) \
-{ \
-  print "fatal: making $@: " msg | "cat >&2"; \
-  exit 1; \
-} \
-function rst_section(header) \
-{ \
-  print header; \
-  len = length(header); \
-  for (i = 1; i <= len; i = i + 1) \
-    printf "="; \
-  printf "\n\n"; \
-} \
-{ \
-  copy_in_global_log = 1; \
-  global_test_result = "RUN"; \
-  while ((rc = (getline line < ($$0 ".trs"))) != 0) \
-    { \
-      if (rc < 0) \
-         fatal("failed to read from " $$0 ".trs"); \
-      if (line ~ /$(am__global_test_result_rx)/) \
-        { \
-          sub("$(am__global_test_result_rx)", "", line); \
-          sub("[ 	]*$$", "", line); \
-          global_test_result = line; \
-        } \
-      else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
-        copy_in_global_log = 0; \
-    }; \
-  if (copy_in_global_log) \
-    { \
-      rst_section(global_test_result ": " $$0); \
-      while ((rc = (getline line < ($$0 ".log"))) != 0) \
-      { \
-        if (rc < 0) \
-          fatal("failed to read from " $$0 ".log"); \
-        print line; \
-      }; \
-      printf "\n"; \
-    }; \
-  close ($$0 ".trs"); \
-  close ($$0 ".log"); \
-}'
-# Restructured Text title.
-am__rst_title = { sed 's/.*/   &   /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
-# Solaris 10 'make', and several other traditional 'make' implementations,
-# pass "-e" to $(SHELL), and POSIX 2008 even requires this.  Work around it
-# by disabling -e (using the XSI extension "set +e") if it's set.
-am__sh_e_setup = case $$- in *e*) set +e;; esac
-# Default flags passed to test drivers.
-am__common_driver_flags = \
-  --color-tests "$$am__color_tests" \
-  --enable-hard-errors "$$am__enable_hard_errors" \
-  --expect-failure "$$am__expect_failure"
-# To be inserted before the command running the test.  Creates the
-# directory for the log if needed.  Stores in $dir the directory
-# containing $f, in $tst the test, in $log the log.  Executes the
-# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
-# passes TESTS_ENVIRONMENT.  Set up options for the wrapper that
-# will run the test scripts (or their associated LOG_COMPILER, if
-# thy have one).
-am__check_pre = \
-$(am__sh_e_setup);					\
-$(am__vpath_adj_setup) $(am__vpath_adj)			\
-$(am__tty_colors);					\
-srcdir=$(srcdir); export srcdir;			\
-case "$@" in						\
-  */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;;	\
-    *) am__odir=.;; 					\
-esac;							\
-test "x$$am__odir" = x"." || test -d "$$am__odir" 	\
-  || $(MKDIR_P) "$$am__odir" || exit $$?;		\
-if test -f "./$$f"; then dir=./;			\
-elif test -f "$$f"; then dir=;				\
-else dir="$(srcdir)/"; fi;				\
-tst=$$dir$$f; log='$@'; 				\
-if test -n '$(DISABLE_HARD_ERRORS)'; then		\
-  am__enable_hard_errors=no; 				\
-else							\
-  am__enable_hard_errors=yes; 				\
-fi; 							\
-case " $(XFAIL_TESTS) " in				\
-  *[\ \	]$$f[\ \	]* | *[\ \	]$$dir$$f[\ \	]*) \
-    am__expect_failure=yes;;				\
-  *)							\
-    am__expect_failure=no;;				\
-esac; 							\
-$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
-# A shell command to get the names of the tests scripts with any registered
-# extension removed (i.e., equivalently, the names of the test logs, with
-# the '.log' extension removed).  The result is saved in the shell variable
-# '$bases'.  This honors runtime overriding of TESTS and TEST_LOGS.  Sadly,
-# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
-# since that might cause problem with VPATH rewrites for suffix-less tests.
-# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
-am__set_TESTS_bases = \
-  bases='$(TEST_LOGS)'; \
-  bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
-  bases=`echo $$bases`
-RECHECK_LOGS = $(TEST_LOGS)
-AM_RECURSIVE_TARGETS = check recheck
-TEST_SUITE_LOG = test-suite.log
-TEST_EXTENSIONS = @EXEEXT@ .test
-LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
-LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS)
-am__set_b = \
-  case '$@' in \
-    */*) \
-      case '$*' in \
-        */*) b='$*';; \
-          *) b=`echo '$@' | sed 's/\.log$$//'`; \
-       esac;; \
-    *) \
-      b='$*';; \
-  esac
-am__test_logs1 = $(TESTS:=.log)
-am__test_logs2 = $(am__test_logs1:@EXEEXT at .log=.log)
-TEST_LOGS = $(am__test_logs2:.test.log=.log)
-TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
-TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
-	$(TEST_LOG_FLAGS)
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \
-	$(top_srcdir)/lib_flags.am $(top_srcdir)/test-driver
+	$(top_srcdir)/lib_flags.am
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
@@ -715,7 +533,7 @@ CLEANFILES = tst_h_*.h5
 all: all-am
 
 .SUFFIXES:
-.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs
+.SUFFIXES: .c .lo .o .obj
 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/lib_flags.am $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
@@ -985,364 +803,98 @@ cscopelist-am: $(am__tagged_files)
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
-# Recover from deleted '.trs' file; this should ensure that
-# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
-# both 'foo.log' and 'foo.trs'.  Break the recipe in two subshells
-# to avoid problems with "make -n".
-.log.trs:
-	rm -f $< $@
-	$(MAKE) $(AM_MAKEFLAGS) $<
-
-# Leading 'am--fnord' is there to ensure the list of targets does not
-# expand to empty, as could happen e.g. with make check TESTS=''.
-am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
-am--force-recheck:
-	@:
-
-$(TEST_SUITE_LOG): $(TEST_LOGS)
-	@$(am__set_TESTS_bases); \
-	am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
-	redo_bases=`for i in $$bases; do \
-	              am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
-	            done`; \
-	if test -n "$$redo_bases"; then \
-	  redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
-	  redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
-	  if $(am__make_dryrun); then :; else \
-	    rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
-	  fi; \
-	fi; \
-	if test -n "$$am__remaking_logs"; then \
-	  echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
-	       "recursion detected" >&2; \
-	elif test -n "$$redo_logs"; then \
-	  am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
-	fi; \
-	if $(am__make_dryrun); then :; else \
-	  st=0;  \
-	  errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
-	  for i in $$redo_bases; do \
-	    test -f $$i.trs && test -r $$i.trs \
-	      || { echo "$$errmsg $$i.trs" >&2; st=1; }; \
-	    test -f $$i.log && test -r $$i.log \
-	      || { echo "$$errmsg $$i.log" >&2; st=1; }; \
+check-TESTS: $(TESTS)
+	@failed=0; all=0; xfail=0; xpass=0; skip=0; \
+	srcdir=$(srcdir); export srcdir; \
+	list=' $(TESTS) '; \
+	$(am__tty_colors); \
+	if test -n "$$list"; then \
+	  for tst in $$list; do \
+	    if test -f ./$$tst; then dir=./; \
+	    elif test -f $$tst; then dir=; \
+	    else dir="$(srcdir)/"; fi; \
+	    if $(TESTS_ENVIRONMENT) $${dir}$$tst $(AM_TESTS_FD_REDIRECT); then \
+	      all=`expr $$all + 1`; \
+	      case " $(XFAIL_TESTS) " in \
+	      *[\ \	]$$tst[\ \	]*) \
+		xpass=`expr $$xpass + 1`; \
+		failed=`expr $$failed + 1`; \
+		col=$$red; res=XPASS; \
+	      ;; \
+	      *) \
+		col=$$grn; res=PASS; \
+	      ;; \
+	      esac; \
+	    elif test $$? -ne 77; then \
+	      all=`expr $$all + 1`; \
+	      case " $(XFAIL_TESTS) " in \
+	      *[\ \	]$$tst[\ \	]*) \
+		xfail=`expr $$xfail + 1`; \
+		col=$$lgn; res=XFAIL; \
+	      ;; \
+	      *) \
+		failed=`expr $$failed + 1`; \
+		col=$$red; res=FAIL; \
+	      ;; \
+	      esac; \
+	    else \
+	      skip=`expr $$skip + 1`; \
+	      col=$$blu; res=SKIP; \
+	    fi; \
+	    echo "$${col}$$res$${std}: $$tst"; \
 	  done; \
-	  test $$st -eq 0 || exit 1; \
-	fi
-	@$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
-	ws='[ 	]'; \
-	results=`for b in $$bases; do echo $$b.trs; done`; \
-	test -n "$$results" || results=/dev/null; \
-	all=`  grep "^$$ws*:test-result:"           $$results | wc -l`; \
-	pass=` grep "^$$ws*:test-result:$$ws*PASS"  $$results | wc -l`; \
-	fail=` grep "^$$ws*:test-result:$$ws*FAIL"  $$results | wc -l`; \
-	skip=` grep "^$$ws*:test-result:$$ws*SKIP"  $$results | wc -l`; \
-	xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
-	xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
-	error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
-	if test `expr $$fail + $$xpass + $$error` -eq 0; then \
-	  success=true; \
-	else \
-	  success=false; \
-	fi; \
-	br='==================='; br=$$br$$br$$br$$br; \
-	result_count () \
-	{ \
-	    if test x"$$1" = x"--maybe-color"; then \
-	      maybe_colorize=yes; \
-	    elif test x"$$1" = x"--no-color"; then \
-	      maybe_colorize=no; \
+	  if test "$$all" -eq 1; then \
+	    tests="test"; \
+	    All=""; \
+	  else \
+	    tests="tests"; \
+	    All="All "; \
+	  fi; \
+	  if test "$$failed" -eq 0; then \
+	    if test "$$xfail" -eq 0; then \
+	      banner="$$All$$all $$tests passed"; \
 	    else \
-	      echo "$@: invalid 'result_count' usage" >&2; exit 4; \
+	      if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
+	      banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
 	    fi; \
-	    shift; \
-	    desc=$$1 count=$$2; \
-	    if test $$maybe_colorize = yes && test $$count -gt 0; then \
-	      color_start=$$3 color_end=$$std; \
+	  else \
+	    if test "$$xpass" -eq 0; then \
+	      banner="$$failed of $$all $$tests failed"; \
+	    else \
+	      if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
+	      banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
+	    fi; \
+	  fi; \
+	  dashes="$$banner"; \
+	  skipped=""; \
+	  if test "$$skip" -ne 0; then \
+	    if test "$$skip" -eq 1; then \
+	      skipped="($$skip test was not run)"; \
 	    else \
-	      color_start= color_end=; \
+	      skipped="($$skip tests were not run)"; \
 	    fi; \
-	    echo "$${color_start}# $$desc $$count$${color_end}"; \
-	}; \
-	create_testsuite_report () \
-	{ \
-	  result_count $$1 "TOTAL:" $$all   "$$brg"; \
-	  result_count $$1 "PASS: " $$pass  "$$grn"; \
-	  result_count $$1 "SKIP: " $$skip  "$$blu"; \
-	  result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
-	  result_count $$1 "FAIL: " $$fail  "$$red"; \
-	  result_count $$1 "XPASS:" $$xpass "$$red"; \
-	  result_count $$1 "ERROR:" $$error "$$mgn"; \
-	}; \
-	{								\
-	  echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" |	\
-	    $(am__rst_title);						\
-	  create_testsuite_report --no-color;				\
-	  echo;								\
-	  echo ".. contents:: :depth: 2";				\
-	  echo;								\
-	  for b in $$bases; do echo $$b; done				\
-	    | $(am__create_global_log);					\
-	} >$(TEST_SUITE_LOG).tmp || exit 1;				\
-	mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG);			\
-	if $$success; then						\
-	  col="$$grn";							\
-	 else								\
-	  col="$$red";							\
-	  test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG);		\
-	fi;								\
-	echo "$${col}$$br$${std}"; 					\
-	echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}";	\
-	echo "$${col}$$br$${std}"; 					\
-	create_testsuite_report --maybe-color;				\
-	echo "$$col$$br$$std";						\
-	if $$success; then :; else					\
-	  echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}";		\
-	  if test -n "$(PACKAGE_BUGREPORT)"; then			\
-	    echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}";	\
-	  fi;								\
-	  echo "$$col$$br$$std";					\
-	fi;								\
-	$$success || exit 1
-
-check-TESTS:
-	@list='$(RECHECK_LOGS)';           test -z "$$list" || rm -f $$list
-	@list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
-	@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
-	@set +e; $(am__set_TESTS_bases); \
-	log_list=`for i in $$bases; do echo $$i.log; done`; \
-	trs_list=`for i in $$bases; do echo $$i.trs; done`; \
-	log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
-	$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
-	exit $$?;
-recheck: all $(check_PROGRAMS)
-	@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
-	@set +e; $(am__set_TESTS_bases); \
-	bases=`for i in $$bases; do echo $$i; done \
-	         | $(am__list_recheck_tests)` || exit 1; \
-	log_list=`for i in $$bases; do echo $$i.log; done`; \
-	log_list=`echo $$log_list`; \
-	$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
-	        am__force_recheck=am--force-recheck \
-	        TEST_LOGS="$$log_list"; \
-	exit $$?
-tst_h_files.log: tst_h_files$(EXEEXT)
-	@p='tst_h_files$(EXEEXT)'; \
-	b='tst_h_files'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_h_files2.log: tst_h_files2$(EXEEXT)
-	@p='tst_h_files2$(EXEEXT)'; \
-	b='tst_h_files2'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_h_files4.log: tst_h_files4$(EXEEXT)
-	@p='tst_h_files4$(EXEEXT)'; \
-	b='tst_h_files4'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_h_atts.log: tst_h_atts$(EXEEXT)
-	@p='tst_h_atts$(EXEEXT)'; \
-	b='tst_h_atts'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_h_atts3.log: tst_h_atts3$(EXEEXT)
-	@p='tst_h_atts3$(EXEEXT)'; \
-	b='tst_h_atts3'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_h_atts4.log: tst_h_atts4$(EXEEXT)
-	@p='tst_h_atts4$(EXEEXT)'; \
-	b='tst_h_atts4'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_h_vars.log: tst_h_vars$(EXEEXT)
-	@p='tst_h_vars$(EXEEXT)'; \
-	b='tst_h_vars'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_h_vars2.log: tst_h_vars2$(EXEEXT)
-	@p='tst_h_vars2$(EXEEXT)'; \
-	b='tst_h_vars2'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_h_vars3.log: tst_h_vars3$(EXEEXT)
-	@p='tst_h_vars3$(EXEEXT)'; \
-	b='tst_h_vars3'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_h_grps.log: tst_h_grps$(EXEEXT)
-	@p='tst_h_grps$(EXEEXT)'; \
-	b='tst_h_grps'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_h_compounds.log: tst_h_compounds$(EXEEXT)
-	@p='tst_h_compounds$(EXEEXT)'; \
-	b='tst_h_compounds'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_h_compounds2.log: tst_h_compounds2$(EXEEXT)
-	@p='tst_h_compounds2$(EXEEXT)'; \
-	b='tst_h_compounds2'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_h_wrt_cmp.log: tst_h_wrt_cmp$(EXEEXT)
-	@p='tst_h_wrt_cmp$(EXEEXT)'; \
-	b='tst_h_wrt_cmp'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_h_rd_cmp.log: tst_h_rd_cmp$(EXEEXT)
-	@p='tst_h_rd_cmp$(EXEEXT)'; \
-	b='tst_h_rd_cmp'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_h_vl.log: tst_h_vl$(EXEEXT)
-	@p='tst_h_vl$(EXEEXT)'; \
-	b='tst_h_vl'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_h_opaques.log: tst_h_opaques$(EXEEXT)
-	@p='tst_h_opaques$(EXEEXT)'; \
-	b='tst_h_opaques'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_h_strings.log: tst_h_strings$(EXEEXT)
-	@p='tst_h_strings$(EXEEXT)'; \
-	b='tst_h_strings'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_h_strings1.log: tst_h_strings1$(EXEEXT)
-	@p='tst_h_strings1$(EXEEXT)'; \
-	b='tst_h_strings1'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_h_strings2.log: tst_h_strings2$(EXEEXT)
-	@p='tst_h_strings2$(EXEEXT)'; \
-	b='tst_h_strings2'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_h_ints.log: tst_h_ints$(EXEEXT)
-	@p='tst_h_ints$(EXEEXT)'; \
-	b='tst_h_ints'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_h_dimscales.log: tst_h_dimscales$(EXEEXT)
-	@p='tst_h_dimscales$(EXEEXT)'; \
-	b='tst_h_dimscales'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_h_dimscales1.log: tst_h_dimscales1$(EXEEXT)
-	@p='tst_h_dimscales1$(EXEEXT)'; \
-	b='tst_h_dimscales1'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_h_dimscales2.log: tst_h_dimscales2$(EXEEXT)
-	@p='tst_h_dimscales2$(EXEEXT)'; \
-	b='tst_h_dimscales2'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_h_dimscales3.log: tst_h_dimscales3$(EXEEXT)
-	@p='tst_h_dimscales3$(EXEEXT)'; \
-	b='tst_h_dimscales3'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_h_enums.log: tst_h_enums$(EXEEXT)
-	@p='tst_h_enums$(EXEEXT)'; \
-	b='tst_h_enums'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_h_dimscales4.log: tst_h_dimscales4$(EXEEXT)
-	@p='tst_h_dimscales4$(EXEEXT)'; \
-	b='tst_h_dimscales4'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_h_mem.log: tst_h_mem$(EXEEXT)
-	@p='tst_h_mem$(EXEEXT)'; \
-	b='tst_h_mem'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-run_par_tests.sh.log: run_par_tests.sh
-	@p='run_par_tests.sh'; \
-	b='run_par_tests.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-run_valgrind_tests.sh.log: run_valgrind_tests.sh
-	@p='run_valgrind_tests.sh'; \
-	b='run_valgrind_tests.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-.test.log:
-	@p='$<'; \
-	$(am__set_b); \
-	$(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
- at am__EXEEXT_TRUE@.test$(EXEEXT).log:
- at am__EXEEXT_TRUE@	@p='$<'; \
- at am__EXEEXT_TRUE@	$(am__set_b); \
- at am__EXEEXT_TRUE@	$(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
- at am__EXEEXT_TRUE@	--log-file $$b.log --trs-file $$b.trs \
- at am__EXEEXT_TRUE@	$(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
- at am__EXEEXT_TRUE@	"$$tst" $(AM_TESTS_FD_REDIRECT)
+	    test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
+	      dashes="$$skipped"; \
+	  fi; \
+	  report=""; \
+	  if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
+	    report="Please report to $(PACKAGE_BUGREPORT)"; \
+	    test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
+	      dashes="$$report"; \
+	  fi; \
+	  dashes=`echo "$$dashes" | sed s/./=/g`; \
+	  if test "$$failed" -eq 0; then \
+	    col="$$grn"; \
+	  else \
+	    col="$$red"; \
+	  fi; \
+	  echo "$${col}$$dashes$${std}"; \
+	  echo "$${col}$$banner$${std}"; \
+	  test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \
+	  test -z "$$report" || echo "$${col}$$report$${std}"; \
+	  echo "$${col}$$dashes$${std}"; \
+	  test "$$failed" -eq 0; \
+	else :; fi
 
 distdir: $(DISTFILES)
 	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@@ -1400,9 +952,6 @@ install-strip:
 	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
 	fi
 mostlyclean-generic:
-	-test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
-	-test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
-	-test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
 
 clean-generic:
 	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
@@ -1499,7 +1048,7 @@ uninstall-am:
 	installcheck-am installdirs maintainer-clean \
 	maintainer-clean-generic mostlyclean mostlyclean-compile \
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-	recheck tags tags-am uninstall uninstall-am
+	tags tags-am uninstall uninstall-am
 
 .PRECIOUS: Makefile
 
diff --git a/include/nc.h b/include/nc.h
index 5661733..aa597c9 100644
--- a/include/nc.h
+++ b/include/nc.h
@@ -87,12 +87,14 @@ extern int nc_set_default_format(int format, int *old_formatp);
 /* This function gets a current default create flag */
 extern int nc_get_default_format(void);
 
+
 extern int add_to_NCList(NC*);
 extern void del_from_NCList(NC*);/* does not free object */
 extern NC* find_in_NCList(int ext_ncid);
 extern NC* find_in_NCList_by_name(const char*);
 extern void free_NCList(void);/* reclaim whole list */
 extern int count_NCList(void); /* return # of entries in NClist */
+extern int iterate_NCList(int i,NC**); /* Walk from 0 ...; ERANGE return => stop */
 
 /* Defined in nc.c */
 extern void free_NC(NC*);
diff --git a/include/nc3internal.h b/include/nc3internal.h
index 7a8eb57..a9b2d81 100644
--- a/include/nc3internal.h
+++ b/include/nc3internal.h
@@ -25,12 +25,6 @@
 /* Always needed */
 #include "nc.h"
 
-#include "nc_hashmap.h"
-
-/*#ifndef HAVE_SSIZE_T
-#define ssize_t int
-#endif*/
-
 #ifndef NC_ARRAY_GROWBY
 #define NC_ARRAY_GROWBY 4
 #endif
@@ -62,6 +56,24 @@ typedef enum {
 } NCtype;
 
 
+/*! Hashmap-related structs.
+  NOTE: 'data' is the dimid or varid which is non-negative.
+  we store the dimid+1 so a valid entry will have
+  data > 0
+*/
+typedef struct {
+  long data;
+  int flags;
+  unsigned long key;
+} hEntry;
+
+typedef struct s_hashmap {
+  hEntry* table;
+  unsigned long size;
+  unsigned long count;
+} NC_hashmap;
+
+
 /*
  * NC dimension structure
  */
@@ -181,8 +193,8 @@ typedef struct NC_vararray {
 	/* below gets xdr'd */
 	/* NCtype type = NC_VARIABLE */
 	size_t nelems;		/* length of the array */
-	NC_hashmap *hashmap;
-	NC_var **value;
+  NC_hashmap *hashmap;
+  NC_var **value;
 } NC_vararray;
 
 /* Begin defined in lookup3.c */
@@ -224,6 +236,37 @@ NC_lookupvar(NC3_INFO* ncp, int varid, NC_var **varp);
 
 /* End defined in var.c */
 
+/* defined in nc_hashmap.c */
+/** Creates a new hashmap near the given size. */
+extern NC_hashmap* NC_hashmapCreate(unsigned long startsize);
+
+/** Inserts a new element into the hashmap. */
+extern void NC_hashmapAddDim(const NC_dimarray*, long data, const char *name);
+
+/** Removes the storage for the element of the key and returns the element. */
+extern long NC_hashmapRemoveDim(const NC_dimarray*, const char *name);
+
+/** Returns the element for the key. */
+extern long NC_hashmapGetDim(const NC_dimarray*, const char *name);
+
+/** Inserts a new element into the hashmap. */
+extern void NC_hashmapAddVar(const NC_vararray*, long data, const char *name);
+
+/** Removes the storage for the element of the key and returns the element. */
+extern long NC_hashmapRemoveVar(const NC_vararray*, const char *name);
+
+/** Returns the element for the key. */
+extern long NC_hashmapGetVar(const NC_vararray*, const char *name);
+
+/** Returns the number of saved elements. */
+extern unsigned long NC_hashmapCount(NC_hashmap*);
+
+/** Removes the hashmap structure. */
+extern void NC_hashmapDelete(NC_hashmap*);
+
+/* end defined in nc_hashmap.c */
+
+
 #define IS_RECVAR(vp) \
 	((vp)->shape != NULL ? (*(vp)->shape == NC_UNLIMITED) : 0 )
 
diff --git a/include/nc4internal.h b/include/nc4internal.h
index b5f1d12..0e56bd4 100644
--- a/include/nc4internal.h
+++ b/include/nc4internal.h
@@ -9,21 +9,21 @@
 #ifndef _NC4INTERNAL_
 #define _NC4INTERNAL_
 
-#include <config.h>
+#include "config.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <ctype.h>
 #include <stdarg.h>
 #include <string.h>
 #include <hdf5.h>
-#include <ncdimscale.h>
-#include <nc_logging.h>
+#include "ncdimscale.h"
+#include "nc_logging.h"
 
 #ifdef USE_PARALLEL
-#include <netcdf_par.h>
+#include "netcdf_par.h"
 #endif /* USE_PARALLEL */
-#include <netcdf.h>
-#include <netcdf_f.h>
+#include "netcdf.h"
+#include "netcdf_f.h"
 
 /* Always needed */
 #include "nc.h"
@@ -100,6 +100,11 @@ typedef enum {VAR, DIM, ATT} NC_OBJ_T;
 /* Boolean type, to make the code easier to read */
 typedef enum {NC_FALSE = 0, NC_TRUE = 1} nc_bool_t;
 
+#ifdef ENABLE_FILEINFO
+/*Forward*/
+struct NCFILEINFO;
+#endif
+
 /* Generic doubly-linked list node */
 typedef struct NC_LIST_NODE
 {
@@ -286,6 +291,7 @@ typedef struct NC_GRP_INFO
 #define NC_NDIRTY 0x40	/* numrecs has changed */
 #define NC_HDIRTY 0x80  /* header info has changed */
 
+
 /* This is the metadata we need to keep track of for each
    netcdf-4/HDF5 file. */
 typedef struct  NC_HDF5_FILE_INFO
@@ -314,6 +320,9 @@ typedef struct  NC_HDF5_FILE_INFO
    nc_bool_t hdf4;              /* True for HDF4 file */
    int sdid;
 #endif /* USE_HDF4 */
+#ifdef ENABLE_FILEINFO
+   struct NCFILEINFO* fileinfo;
+#endif
 } NC_HDF5_FILE_INFO_T;
 
 
@@ -407,8 +416,8 @@ int nc4_normalize_name(const char *name, char *norm_name);
 int nc4_check_dup_name(NC_GRP_INFO_T *grp, char *norm_name);
 
 /* HDF5 initialization */
-static int nc4_hdf5_initialized;
-void nc4_hdf5_initialize(void);
+extern int nc4_hdf5_initialized;
+extern void nc4_hdf5_initialize(void);
 
 /* This is only included if --enable-logging is used for configure; it
    prints info about the metadata to stderr. */
@@ -420,4 +429,64 @@ int log_metadata_nc(NC *nc);
 #define NC4_DATA(nc) ((NC_HDF5_FILE_INFO_T*)(nc)->dispatchdata)
 #define NC4_DATA_SET(nc,data) ((nc)->dispatchdata = (void*)(data))
 
+/* Reserved Attributes */
+extern const char* NC_RESERVED_VARATT_LIST[];
+extern const char* NC_RESERVED_ATT_LIST[];
+extern const char* NC_RESERVED_SPECIAL_LIST[];
+#define NC_ATT_REFERENCE_LIST "REFERENCE_LIST"
+#define NC_ATT_CLASS "CLASS"
+#define NC_ATT_DIMENSION_LIST "DIMENSION_LIST"
+#define NC_ATT_NAME "NAME"
+#define NC_ATT_COORDINATES COORDINATES /*defined above*/
+#define NC_ATT_FORMAT "_Format"
+
+/**************************************************/
+/**
+For netcdf4 files, capture state information about the following:
+1. Global: netcdf library version
+2. Global: hdf5 library version
+3. Per file: superblock version
+4. Per File: was it created by netcdf-4?
+5. Per file: _NCProperties attribute
+*/
+
+#ifdef ENABLE_FILEINFO
+
+#define NCPROPS "_NCProperties"
+#define NCPROPS_VERSION (1)
+#define NCPROPSSEP  '|'
+#define NCPROPS_LENGTH (8192)
+
+/* Currently used properties */
+#define NCPVERSION "version" /* Of the properties format */
+#define NCPHDF5LIBVERSION "hdf5libversion"
+#define NCPNCLIBVERSION "netcdflibversion"
+
+/* Other hidden attributes */
+#define ISNETCDF4ATT "_IsNetcdf4"
+#define SUPERBLOCKATT "_SuperblockVersion"
+
+struct NCFILEINFO {
+    int superblockversion;
+    /* Following is filled from NCPROPS attribute or from global version */
+    struct NCPROPINFO {
+        int version; /* 0 => not defined */
+        char hdf5ver[NC_MAX_NAME+1];
+        char netcdfver[NC_MAX_NAME+1];
+        char text[NCPROPS_LENGTH+1]; /* Value of the NCPROPS attribute */
+    } propattr;
+};
+
+extern struct NCPROPINFO globalpropinfo;
+
+extern int NC4_fileinfo_init(void); /*libsrc4/ncinfo.c*/
+extern int NC4_get_fileinfo(struct NC_HDF5_FILE_INFO* info, struct NCPROPINFO*); /*libsrc4/ncinfo.c*/
+extern int NC4_put_propattr(struct NC_HDF5_FILE_INFO* info); /*libsrc4/ncinfo.c*/
+
+/* ENABLE_FILEINFO => ENABLE_NETCDF4 */
+extern int NC4_hdf5get_libversion(unsigned*,unsigned*,unsigned*);/*libsrc4/nc4hdf.c*/
+extern int NC4_hdf5get_superblock(struct NC_HDF5_FILE_INFO*, int*);/*libsrc4/nc4hdf.c*/
+extern int NC4_isnetcdf4(struct NC_HDF5_FILE_INFO*); /*libsrc4/nc4hdf.c*/
+#endif /*ENABLE_FILEINFO*/
+
 #endif /* _NETCDF4_ */
diff --git a/include/nc_hashmap.h b/include/nc_hashmap.h
index a5f7e69..848cf42 100644
--- a/include/nc_hashmap.h
+++ b/include/nc_hashmap.h
@@ -2,38 +2,10 @@
 #define HASHMAP_H_INCLUDED
 #include <stdlib.h>
 
-typedef struct NC_vararray NC_vararray;
-typedef struct NC_dimarray NC_dimarray;
-
 /** Hashmap structure (forward declaration) */
 struct s_hashmap;
 typedef struct s_hashmap NC_hashmap;
 
-/** Creates a new hashmap near the given size. */
-extern NC_hashmap* NC_hashmapCreate(unsigned long startsize);
-
-/** Inserts a new element into the hashmap. */
-extern void NC_hashmapAddDim(const NC_dimarray*, long data, const char *name);
-
-/** Removes the storage for the element of the key and returns the element. */
-extern long NC_hashmapRemoveDim(const NC_dimarray*, const char *name);
-
-/** Returns the element for the key. */
-extern long NC_hashmapGetDim(const NC_dimarray*, const char *name);
-
-/** Inserts a new element into the hashmap. */
-extern void NC_hashmapAddVar(const NC_vararray*, long data, const char *name);
-
-/** Removes the storage for the element of the key and returns the element. */
-extern long NC_hashmapRemoveVar(const NC_vararray*, const char *name);
-
-/** Returns the element for the key. */
-extern long NC_hashmapGetVar(const NC_vararray*, const char *name);
-
-/** Returns the number of saved elements. */
-extern unsigned long NC_hashmapCount(NC_hashmap*);
 
-/** Removes the hashmap structure. */
-extern void NC_hashmapDelete(NC_hashmap*);
 
 #endif
diff --git a/libdap2/ncd2dispatch.c b/libdap2/ncd2dispatch.c
index 63414d0..67b2732 100644
--- a/libdap2/ncd2dispatch.c
+++ b/libdap2/ncd2dispatch.c
@@ -2306,7 +2306,7 @@ NCD2_rename_dim(int ncid, int dimid, const char* name)
     NC* drno;
     int ret;
     if((ret = NC_check_id(ncid, (NC**)&drno)) != NC_NOERR) return THROW(ret);
-    ret = nc_rename_dim(getnc3id(drno), dimid, name); 
+    ret = nc_rename_dim(getnc3id(drno), dimid, name);
     return THROW(ret);
 }
 
@@ -2321,7 +2321,7 @@ NCD2_inq_att(int ncid, int varid, const char* name,
     return THROW(ret);
 }
 
-int 
+int
 NCD2_inq_attid(int ncid, int varid, const char *name, int *idp)
 {
     NC* drno;
@@ -2372,21 +2372,21 @@ NCD2_get_att(int ncid, int varid, const char* name, void* value, nc_type t)
 }
 
 int
-NCD2_inq_var_all(int ncid, int varid, char *name, nc_type* xtypep, 
-               int* ndimsp, int* dimidsp, int* nattsp, 
+NCD2_inq_var_all(int ncid, int varid, char *name, nc_type* xtypep,
+               int* ndimsp, int* dimidsp, int* nattsp,
                int* shufflep, int* deflatep, int* deflate_levelp,
-               int* fletcher32p, int* contiguousp, size_t* chunksizesp, 
-               int* no_fill, void* fill_valuep, int* endiannessp, 
+               int* fletcher32p, int* contiguousp, size_t* chunksizesp,
+               int* no_fill, void* fill_valuep, int* endiannessp,
 	       int* options_maskp, int* pixels_per_blockp)
 {
     NC* drno;
     int ret;
     if((ret = NC_check_id(ncid, (NC**)&drno)) != NC_NOERR) return THROW(ret);
-    ret = NCDISPATCH_inq_var_all(getnc3id(drno), varid, name, xtypep, 
-               ndimsp, dimidsp, nattsp, 
+    ret = NCDISPATCH_inq_var_all(getnc3id(drno), varid, name, xtypep,
+               ndimsp, dimidsp, nattsp,
                shufflep, deflatep, deflate_levelp,
-               fletcher32p, contiguousp, chunksizesp, 
-               no_fill, fill_valuep, endiannessp, 
+               fletcher32p, contiguousp, chunksizesp,
+               no_fill, fill_valuep, endiannessp,
 	       options_maskp, pixels_per_blockp);
     return THROW(ret);
 }
@@ -2417,6 +2417,9 @@ NCD2_var_par_access(int ncid, int p2, int p3)
     return THROW(NC_ENOPAR);
 }
 
+
+#ifdef USE_NETCDF4
+
 EXTERNL int
 NCD2_inq_ncid(int ncid, const char* name, int* grp_ncid)
 {
@@ -2427,6 +2430,15 @@ NCD2_inq_ncid(int ncid, const char* name, int* grp_ncid)
     return THROW(ret);
 }
 
+NCD2_show_metadata(int ncid)
+{
+    NC* drno;
+    int ret;
+    if((ret = NC_check_id(ncid, (NC**)&drno)) != NC_NOERR) return THROW(ret);
+    ret = nc_show_metadata(getnc3id(drno));
+    return THROW(ret);
+}
+
 int
 NCD2_inq_grps(int ncid, int* p2, int* p3)
 {
@@ -2447,6 +2459,17 @@ NCD2_inq_grpname(int ncid, char* p)
     return THROW(ret);
 }
 
+
+int
+NCD2_inq_unlimdims(int ncid, int* p2, int* p3)
+{
+    NC* drno;
+    int ret;
+    if((ret = NC_check_id(ncid, (NC**)&drno)) != NC_NOERR) return THROW(ret);
+    ret = nc_inq_unlimdims(getnc3id(drno), p2, p3);
+    return THROW(ret);
+}
+
 int
 NCD2_inq_grpname_full(int ncid, size_t* p2, char* p3)
 {
@@ -2506,7 +2529,7 @@ NCD2_inq_typeids(int ncid, int*  ntypes, int* p)
     ret = nc_inq_typeids(getnc3id(drno), ntypes, p);
     return THROW(ret);
 }
-   
+
 int
 NCD2_inq_type_equal(int ncid, nc_type t1, int p3, nc_type t2, int* p5)
 {
@@ -2579,7 +2602,7 @@ NCD2_insert_compound(int ncid, nc_type t1, const char* p3, size_t p4, nc_type t2
 }
 
 int
-NCD2_insert_array_compound(int ncid, nc_type t1, const char* p3, size_t p4, 
+NCD2_insert_array_compound(int ncid, nc_type t1, const char* p3, size_t p4,
 			  nc_type t2, int p6, const int* p7)
 {
     NC* drno;
@@ -2762,23 +2785,4 @@ NCD2_get_var_chunk_cache(int ncid, int p2, size_t* p3, size_t* p4, float* p5)
     return THROW(ret);
 }
 
-int
-NCD2_inq_unlimdims(int ncid, int* p2, int* p3)
-{
-    NC* drno;
-    int ret;
-    if((ret = NC_check_id(ncid, (NC**)&drno)) != NC_NOERR) return THROW(ret);
-    ret = nc_inq_unlimdims(getnc3id(drno), p2, p3);
-    return THROW(ret);
-}
-
-int
-NCD2_show_metadata(int ncid)
-{
-    NC* drno;
-    int ret;
-    if((ret = NC_check_id(ncid, (NC**)&drno)) != NC_NOERR) return THROW(ret);
-    ret = nc_show_metadata(getnc3id(drno));
-    return THROW(ret);
-}
-
+#endif // USE_NETCDF4
diff --git a/libdap2/ncd2dispatch.h b/libdap2/ncd2dispatch.h
index 9ba5723..9b3e826 100644
--- a/libdap2/ncd2dispatch.h
+++ b/libdap2/ncd2dispatch.h
@@ -1,9 +1,9 @@
 /*
  * Copyright 1993-1996 University Corporation for Atmospheric Research/Unidata
- * 
- * Portions of this software were developed by the Unidata Program at the 
+ *
+ * Portions of this software were developed by the Unidata Program at the
  * University Corporation for Atmospheric Research.
- * 
+ *
  * Access and use of this software shall impose the following obligations
  * and understandings on the user. The user is granted the right, without
  * any fee or cost, to use, copy, modify, alter, enhance and distribute
@@ -20,7 +20,7 @@
  * any support, consulting, training or assistance of any kind with regard
  * to the use, operation and performance of this software nor to provide
  * the user with any updates, revisions, new versions or "bug fixes."
- * 
+ *
  * THIS SOFTWARE IS PROVIDED BY UCAR/UNIDATA "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
@@ -37,6 +37,7 @@
 #include <stddef.h> /* size_t, ptrdiff_t */
 #include "netcdf.h"
 #include "ncdispatch.h"
+#include "config.h"
 
 #if defined(__cplusplus)
 extern "C" {
@@ -99,7 +100,7 @@ EXTERNL int
 NCD2_inq_att(int ncid, int varid, const char *name,
 	    nc_type *xtypep, size_t *lenp);
 
-EXTERNL int 
+EXTERNL int
 NCD2_inq_attid(int ncid, int varid, const char *name, int *idp);
 
 EXTERNL int
@@ -129,19 +130,19 @@ NCD2_def_var(int ncid, const char *name,
 	 nc_type xtype, int ndims, const int *dimidsp, int *varidp);
 
 EXTERNL int
-NCD2_inq_var_all(int ncid, int varid, char *name, nc_type *xtypep, 
-               int *ndimsp, int *dimidsp, int *nattsp, 
+NCD2_inq_var_all(int ncid, int varid, char *name, nc_type *xtypep,
+               int *ndimsp, int *dimidsp, int *nattsp,
                int *shufflep, int *deflatep, int *deflate_levelp,
-               int *fletcher32p, int *contiguousp, size_t *chunksizesp, 
-               int *no_fill, void *fill_valuep, int *endiannessp, 
+               int *fletcher32p, int *contiguousp, size_t *chunksizesp,
+               int *no_fill, void *fill_valuep, int *endiannessp,
 	       int *options_maskp, int *pixels_per_blockp);
 
 EXTERNL int
-NC3_inq_var_all(int ncid, int varid, char *name, nc_type *xtypep, 
-               int *ndimsp, int *dimidsp, int *nattsp, 
+NC3_inq_var_all(int ncid, int varid, char *name, nc_type *xtypep,
+               int *ndimsp, int *dimidsp, int *nattsp,
                int *shufflep, int *deflatep, int *deflate_levelp,
-               int *fletcher32p, int *contiguousp, size_t *chunksizesp, 
-               int *no_fill, void *fill_valuep, int *endiannessp, 
+               int *fletcher32p, int *contiguousp, size_t *chunksizesp,
+               int *no_fill, void *fill_valuep, int *endiannessp,
 	       int *options_maskp, int *pixels_per_blockp);
 
 EXTERNL int
@@ -152,120 +153,131 @@ NCD2_rename_var(int ncid, int varid, const char *name);
 
 /* End _var */
 
-/* netCDF4 API only */
 EXTERNL int
 NCD2_var_par_access(int, int, int);
 
-EXTERNL int
-NCD2_inq_ncid(int, const char *, int *);
+  /* netCDF4 API only */
+#ifdef USE_NETCDF4
+  EXTERNL int
+  NCD2_inq_ncid(int, const char *, int *);
 
-EXTERNL int
-NCD2_inq_grps(int, int *, int *);
+  EXTERNL int
+  NCD2_inq_grps(int, int *, int *);
 
-EXTERNL int
-NCD2_inq_grpname(int, char *);
+  EXTERNL int
+  NCD2_inq_grpname(int, char *);
 
-EXTERNL int
-NCD2_inq_grpname_full(int, size_t *, char *);
+  EXTERNL int
+  NCD2_inq_grpname_full(int, size_t *, char *);
 
-EXTERNL int
-NCD2_inq_grp_parent(int, int *);
+  EXTERNL int
+  NCD2_inq_grp_parent(int, int *);
 
-EXTERNL int
-NCD2_inq_grp_full_ncid(int, const char *, int *);
+  EXTERNL int
+  NCD2_inq_grp_full_ncid(int, const char *, int *);
 
-EXTERNL int
-NCD2_inq_varids(int, int * nvars, int *);
+  EXTERNL int
+  NCD2_inq_varids(int, int * nvars, int *);
 
-EXTERNL int
-NCD2_inq_dimids(int, int * ndims, int *, int);
+  EXTERNL int
+  NCD2_inq_dimids(int, int * ndims, int *, int);
 
-EXTERNL int
-NCD2_inq_typeids(int, int * ntypes, int *);
-   
-EXTERNL int
-NCD2_inq_type_equal(int, nc_type, int, nc_type, int *);
+  EXTERNL int
+  NCD2_inq_typeids(int, int * ntypes, int *);
 
-EXTERNL int
-NCD2_def_grp(int, const char *, int *);
+  EXTERNL int
+  NCD2_inq_type_equal(int, nc_type, int, nc_type, int *);
 
-EXTERNL int
-NCD2_rename_grp(int, const char *);
+  EXTERNL int
+  NCD2_rename_grp(int, const char *);
 
-EXTERNL int
-NCD2_inq_user_type(int, nc_type, char *, size_t *, nc_type *, 
-		  size_t *, int *);
+  EXTERNL int
+  NCD2_inq_user_type(int, nc_type, char *, size_t *, nc_type *,
+                     size_t *, int *);
 
-EXTERNL int
-NCD2_def_compound(int, size_t, const char *, nc_type *);
+  EXTERNL int
+  NCD2_insert_compound(int, nc_type, const char *, size_t, nc_type);
 
-EXTERNL int
-NCD2_insert_compound(int, nc_type, const char *, size_t, nc_type);
+  EXTERNL int
+  NCD2_insert_array_compound(int, nc_type, const char *, size_t,
+                             nc_type, int, const int *);
 
-EXTERNL int
-NCD2_insert_array_compound(int, nc_type, const char *, size_t, 
-			  nc_type, int, const int *);
+  EXTERNL int
+  NCD2_inq_typeid(int, const char *, nc_type *);
 
-EXTERNL int
-NCD2_inq_typeid(int, const char *, nc_type *);
+  EXTERNL int
+  NCD2_inq_compound_field(int, nc_type, int, char *, size_t *,
+                          nc_type *, int *, int *);
 
-EXTERNL int
-NCD2_inq_compound_field(int, nc_type, int, char *, size_t *, 
-		       nc_type *, int *, int *);
+  EXTERNL int
+  NCD2_inq_compound_fieldindex(int, nc_type, const char *, int *);
 
-EXTERNL int
-NCD2_inq_compound_fieldindex(int, nc_type, const char *, int *);
+  EXTERNL int
+  NCD2_def_vlen(int, const char *, nc_type base_typeid, nc_type *);
 
-EXTERNL int
-NCD2_def_vlen(int, const char *, nc_type base_typeid, nc_type *);
+  EXTERNL int
+  NCD2_put_vlen_element(int, int, void *, size_t, const void *);
 
-EXTERNL int
-NCD2_put_vlen_element(int, int, void *, size_t, const void *);
+  EXTERNL int
+  NCD2_get_vlen_element(int, int, const void *, size_t *, void *);
 
-EXTERNL int
-NCD2_get_vlen_element(int, int, const void *, size_t *, void *);
+  EXTERNL int
+  NCD2_insert_enum(int, nc_type, const char *, const void *);
 
-EXTERNL int
-NCD2_def_enum(int, nc_type, const char *, nc_type *);
+  EXTERNL int
+  NCD2_inq_enum_member(int, nc_type, int, char *, void *);
 
-EXTERNL int
-NCD2_insert_enum(int, nc_type, const char *, const void *);
+  EXTERNL int
+  NCD2_inq_enum_ident(int, nc_type, long long, char *);
 
-EXTERNL int
-NCD2_inq_enum_member(int, nc_type, int, char *, void *);
+  EXTERNL int
+  NCD2_def_var_deflate(int, int, int, int, int);
 
-EXTERNL int
-NCD2_inq_enum_ident(int, nc_type, long long, char *);
+  EXTERNL int
+  NCD2_def_var_fletcher32(int, int, int);
 
-EXTERNL int
-NCD2_def_opaque(int, size_t, const char *, nc_type *);
+  EXTERNL int
+  NCD2_def_var_chunking(int, int, int, const size_t *);
 
-EXTERNL int
-NCD2_def_var_deflate(int, int, int, int, int);
+  EXTERNL int
+  NCD2_def_var_fill(int, int, int, const void *);
 
-EXTERNL int
-NCD2_def_var_fletcher32(int, int, int);
+  EXTERNL int
+  NCD2_def_var_endian(int, int, int);
 
-EXTERNL int
-NCD2_def_var_chunking(int, int, int, const size_t *);
+  EXTERNL int
+  NCD2_inq_unlimdims(int, int *, int *);
 
-EXTERNL int
-NCD2_def_var_fill(int, int, int, const void *);
+  EXTERNL int
+  NCD2_show_metadata(int);
 
-EXTERNL int
-NCD2_def_var_endian(int, int, int);
+  EXTERNL int
+  NCD2_def_compound(int, size_t, const char *, nc_type *);
+
+  EXTERNL int
+  NCD2_def_enum(int, nc_type, const char *, nc_type *);
+
+  EXTERNL int
+  NCD2_def_grp(int, const char *, int *);
+
+  EXTERNL int
+  NCD2_def_opaque(int, size_t, const char *, nc_type *);
+
+  EXTERNL int
+  NCD2_set_var_chunk_cache(int, int, size_t, size_t, float);
 
-EXTERNL int
-NCD2_set_var_chunk_cache(int, int, size_t, size_t, float);
 
 EXTERNL int
 NCD2_get_var_chunk_cache(int, int, size_t *, size_t *, float *);
 
-EXTERNL int
-NCD2_inq_unlimdims(int, int *, int *);
 
-EXTERNL int
-NCD2_show_metadata(int);
+#endif //USE_NETCDF4
+
+
+
+
+
+
 
 extern int NCD2_initialize(void);
 
diff --git a/libdispatch/datt.c b/libdispatch/datt.c
index efd615c..0b0a064 100644
--- a/libdispatch/datt.c
+++ b/libdispatch/datt.c
@@ -161,7 +161,8 @@ nc_del_att(int ncid, int varid, const char *name)
    int stat = NC_check_id(ncid, &ncp);
    if(stat != NC_NOERR) return stat;
    TRACE(nc_del_att);
-   return ncp->dispatch->del_att(ncid, varid, name);
+   stat = ncp->dispatch->del_att(ncid, varid, name);
+   return stat;
 }
 /*! \} */  /* End of named group ...*/
 
diff --git a/libdispatch/nclistmgr.c b/libdispatch/nclistmgr.c
index a5d6596..d804835 100644
--- a/libdispatch/nclistmgr.c
+++ b/libdispatch/nclistmgr.c
@@ -11,6 +11,7 @@
 
 #define ID_SHIFT (16)
 #define NCFILELISTLENGTH 0x10000
+
 /* Version one just allocates the max space (sizeof(NC*)*2^16)*/
 static NC** nc_filelist = NULL;
 
@@ -111,4 +112,13 @@ find_in_NCList_by_name(const char* path)
    return f;
 }
 
+int
+iterate_NCList(int index, NC** ncp)
+{
+    /* Walk from 0 ...; 0 return => stop */
+    if(index < 0 || index >= NCFILELISTLENGTH)
+	return NC_ERANGE;
+    if(ncp) *ncp = nc_filelist[index];
+    return NC_NOERR;
+}
 
diff --git a/liblib/Makefile.am b/liblib/Makefile.am
index f2431ce..2b76d3d 100755
--- a/liblib/Makefile.am
+++ b/liblib/Makefile.am
@@ -14,12 +14,11 @@ lib_LTLIBRARIES = libnetcdf.la
 
 ##
 # These linker flags specify libtool version info.
-# Note: version-info of "9:0:2" results in soname of libnetcdf.so.7 -> libnetcdf.so.7.2.0
 # See http://www.gnu.org/software/libtool/manual/libtool.html#Libtool-versioning
 # for information regarding incrementing `-version-info`.
 ##
 
-libnetcdf_la_LDFLAGS = -version-info 12:0:0 ${NOUNDEFINED}
+libnetcdf_la_LDFLAGS = -version-info 11:2:0 ${NOUNDEFINED}
 
 libnetcdf_la_CPPFLAGS = ${AM_CPPFLAGS}
 libnetcdf_la_LIBADD =
diff --git a/liblib/Makefile.in b/liblib/Makefile.in
index 1a5cb0d..ab5ce9a 100644
--- a/liblib/Makefile.in
+++ b/liblib/Makefile.in
@@ -426,10 +426,9 @@ top_srcdir = @top_srcdir@
 lib_LTLIBRARIES = libnetcdf.la
 
 # These linker flags specify libtool version info.
-# Note: version-info of "9:0:2" results in soname of libnetcdf.so.7 -> libnetcdf.so.7.2.0
 # See http://www.gnu.org/software/libtool/manual/libtool.html#Libtool-versioning
 # for information regarding incrementing `-version-info`.
-libnetcdf_la_LDFLAGS = -version-info 12:0:0 ${NOUNDEFINED} \
+libnetcdf_la_LDFLAGS = -version-info 11:2:0 ${NOUNDEFINED} \
 	$(am__append_3)
 libnetcdf_la_CPPFLAGS = ${AM_CPPFLAGS} $(am__append_4)
 
diff --git a/liblib/nc_initialize.c b/liblib/nc_initialize.c
index ca7c766..9b084da 100644
--- a/liblib/nc_initialize.c
+++ b/liblib/nc_initialize.c
@@ -10,6 +10,7 @@
 #endif
 
 #include "ncdispatch.h"
+#include "nc4internal.h"
 
 extern int NC3_initialize(void);
 extern int NC3_finalize(void);
@@ -54,25 +55,26 @@ nc_initialize()
     NC_finalized = 0;
 
     /* Do general initialization */
-    if((stat = NCDISPATCH_initialize())) return stat;
+    if((stat = NCDISPATCH_initialize())) goto done;
 
     /* Initialize each active protocol */
-
-    if((stat = NC3_initialize())) return stat;
-
+    if((stat = NC3_initialize())) goto done;
 #ifdef USE_DAP
-    if((stat = NCD2_initialize())) return stat;
+    if((stat = NCD2_initialize())) goto done;
 #endif
-
 #ifdef USE_PNETCDF
-    if((stat = NCP_initialize())) return stat;
+    if((stat = NCP_initialize())) goto done;
 #endif
-
 #ifdef USE_NETCDF4
-    if((stat = NC4_initialize())) return stat;
+    if((stat = NC4_initialize())) goto done;
 #endif /* USE_NETCDF4 */
 
-    return NC_NOERR;
+#ifdef ENABLE_FILEINFO
+    stat = NC4_fileinfo_init();
+#endif
+
+done:
+    return stat;
 }
 
 /**
@@ -114,5 +116,3 @@ nc_finalize(void)
 
     return NC_NOERR;
 }
-
-
diff --git a/libsrc/lookup3.c b/libsrc/lookup3.c
index b970567..4464153 100644
--- a/libsrc/lookup3.c
+++ b/libsrc/lookup3.c
@@ -46,7 +46,7 @@ on 1 byte), but shoehorning those bytes into integers efficiently is messy.
 */
 /* #define SELF_TEST 1 */
 
-#include <config.h>
+#include "config.h"
 #include <stdio.h>      /* defines printf for tests */
 #include <time.h>       /* defines time_t for timings in the test */
 #ifndef HAVE_STDINT_H
diff --git a/libsrc/nc_hashmap.c b/libsrc/nc_hashmap.c
index 638c5d9..2e27596 100644
--- a/libsrc/nc_hashmap.c
+++ b/libsrc/nc_hashmap.c
@@ -1,4 +1,3 @@
-#include "nc_hashmap.h"
 #include "nc3internal.h"
 
 #include <stdio.h>
@@ -15,22 +14,6 @@
 
 extern uint32_t hash_fast(const void *key, size_t length);
 
-/* NOTE: 'data' is the dimid or varid which is non-negative.
-   we store the dimid+1 so a valid entry will have
-   data > 0
-*/
-typedef struct {
-  long data;
-  int flags;
-  unsigned long key;
-} hEntry;
-
-struct s_hashmap{
-  hEntry* table;
-  unsigned long size;
-  unsigned long count;
-};
-
 static int isPrime(unsigned long val)
 {
   int i;
diff --git a/libsrc4/CMakeLists.txt b/libsrc4/CMakeLists.txt
index 3d9e6c4..8890a09 100644
--- a/libsrc4/CMakeLists.txt
+++ b/libsrc4/CMakeLists.txt
@@ -1,6 +1,6 @@
 # Process these files with m4.
 
-SET(libsrc4_SOURCES nc4dispatch.c nc4attr.c nc4dim.c nc4file.c nc4grp.c nc4type.c nc4var.c ncfunc.c nc4internal.c nc4hdf.c)
+SET(libsrc4_SOURCES nc4dispatch.c nc4attr.c nc4dim.c nc4file.c nc4grp.c nc4type.c nc4var.c ncfunc.c nc4internal.c nc4hdf.c nc4info.c)
 
 IF(LOGGING)
   SET(libsrc4_SOURCES ${libsrc4_SOURCES} error4.c)
diff --git a/libsrc4/Makefile.am b/libsrc4/Makefile.am
index db16fbf..d1197bd 100644
--- a/libsrc4/Makefile.am
+++ b/libsrc4/Makefile.am
@@ -16,6 +16,9 @@ endif
 noinst_LTLIBRARIES = libnetcdf4.la
 libnetcdf4_la_SOURCES = nc4dispatch.c nc4dispatch.h nc4attr.c nc4dim.c	\
 nc4file.c nc4grp.c nc4hdf.c nc4internal.c nc4type.c nc4var.c ncfunc.c error4.c
+if ENABLE_FILEINFO
+libnetcdf4_la_SOURCES += nc4info.c
+endif
 
 EXTRA_DIST=CMakeLists.txt
 
diff --git a/libsrc4/Makefile.in b/libsrc4/Makefile.in
index a607e2e..87abb3f 100644
--- a/libsrc4/Makefile.in
+++ b/libsrc4/Makefile.in
@@ -109,6 +109,7 @@ target_triplet = @target@
 
 # This turns on declspec magic in netcdf.h for windows DLLs.
 @BUILD_DLL_TRUE at am__append_3 = -DDLL_EXPORT
+ at ENABLE_FILEINFO_TRUE@am__append_4 = nc4info.c
 subdir = libsrc4
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
@@ -124,12 +125,17 @@ CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 LTLIBRARIES = $(noinst_LTLIBRARIES)
 libnetcdf4_la_LIBADD =
+am__libnetcdf4_la_SOURCES_DIST = nc4dispatch.c nc4dispatch.h nc4attr.c \
+	nc4dim.c nc4file.c nc4grp.c nc4hdf.c nc4internal.c nc4type.c \
+	nc4var.c ncfunc.c error4.c nc4info.c
+ at ENABLE_FILEINFO_TRUE@am__objects_1 = libnetcdf4_la-nc4info.lo
 am_libnetcdf4_la_OBJECTS = libnetcdf4_la-nc4dispatch.lo \
 	libnetcdf4_la-nc4attr.lo libnetcdf4_la-nc4dim.lo \
 	libnetcdf4_la-nc4file.lo libnetcdf4_la-nc4grp.lo \
 	libnetcdf4_la-nc4hdf.lo libnetcdf4_la-nc4internal.lo \
 	libnetcdf4_la-nc4type.lo libnetcdf4_la-nc4var.lo \
-	libnetcdf4_la-ncfunc.lo libnetcdf4_la-error4.lo
+	libnetcdf4_la-ncfunc.lo libnetcdf4_la-error4.lo \
+	$(am__objects_1)
 libnetcdf4_la_OBJECTS = $(am_libnetcdf4_la_OBJECTS)
 AM_V_lt = $(am__v_lt_ at AM_V@)
 am__v_lt_ = $(am__v_lt_ at AM_DEFAULT_V@)
@@ -170,7 +176,7 @@ am__v_CCLD_ = $(am__v_CCLD_ at AM_DEFAULT_V@)
 am__v_CCLD_0 = @echo "  CCLD    " $@;
 am__v_CCLD_1 = 
 SOURCES = $(libnetcdf4_la_SOURCES)
-DIST_SOURCES = $(libnetcdf4_la_SOURCES)
+DIST_SOURCES = $(am__libnetcdf4_la_SOURCES_DIST)
 am__can_run_installinfo = \
   case $$AM_UPDATE_INFO_DIR in \
     n|no|NO) false;; \
@@ -374,9 +380,9 @@ libnetcdf4_la_CPPFLAGS = ${AM_CPPFLAGS} $(am__append_3)
 
 # This is our output. The netCDF-4 convenience library.
 noinst_LTLIBRARIES = libnetcdf4.la
-libnetcdf4_la_SOURCES = nc4dispatch.c nc4dispatch.h nc4attr.c nc4dim.c	\
-nc4file.c nc4grp.c nc4hdf.c nc4internal.c nc4type.c nc4var.c ncfunc.c error4.c
-
+libnetcdf4_la_SOURCES = nc4dispatch.c nc4dispatch.h nc4attr.c nc4dim.c \
+	nc4file.c nc4grp.c nc4hdf.c nc4internal.c nc4type.c nc4var.c \
+	ncfunc.c error4.c $(am__append_4)
 EXTRA_DIST = CMakeLists.txt
 all: all-am
 
@@ -440,6 +446,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libnetcdf4_la-nc4file.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libnetcdf4_la-nc4grp.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libnetcdf4_la-nc4hdf.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libnetcdf4_la-nc4info.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libnetcdf4_la-nc4internal.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libnetcdf4_la-nc4type.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libnetcdf4_la-nc4var.Plo at am__quote@
@@ -546,6 +553,13 @@ libnetcdf4_la-error4.lo: error4.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libnetcdf4_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libnetcdf4_la-error4.lo `test -f 'error4.c' || echo '$(srcdir)/'`error4.c
 
+libnetcdf4_la-nc4info.lo: nc4info.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libnetcdf4_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libnetcdf4_la-nc4info.lo -MD -MP -MF $(DEPDIR)/libnetcdf4_la-nc4info.Tpo -c -o libnetcdf4_la-nc4info.lo `test -f 'nc4info.c' || echo '$(srcdir)/'`nc4info.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libnetcdf4_la-nc4info.Tpo $(DEPDIR)/libnetcdf4_la-nc4info.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='nc4info.c' object='libnetcdf4_la-nc4info.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libnetcdf4_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libnetcdf4_la-nc4info.lo `test -f 'nc4info.c' || echo '$(srcdir)/'`nc4info.c
+
 mostlyclean-libtool:
 	-rm -f *.lo
 
diff --git a/libsrc4/nc4attr.c b/libsrc4/nc4attr.c
index c1d038a..4e5e288 100644
--- a/libsrc4/nc4attr.c
+++ b/libsrc4/nc4attr.c
@@ -21,6 +21,10 @@ conditions.
 #include <pnetcdf.h>
 #endif
 
+#ifdef ENABLE_FILEINFO
+static int nc4_get_att_special(NC_HDF5_FILE_INFO_T*, const char*, nc_type, int, void*, size_t*, int*);
+#endif
+
 int nc4typelen(nc_type type);
 
 /* Get or put attribute metadata from our linked list of file
@@ -43,10 +47,11 @@ nc4_get_att(int ncid, NC *nc, int varid, const char *name,
    char norm_name[NC_MAX_NAME + 1];
    int i;
    int retval = NC_NOERR;
+   const char** sp;
 
-   if (attnum)
+   if (attnum) {
       my_attnum = *attnum;
-   assert(nc && NC4_DATA(nc));
+   }
 
    LOG((3, "%s: ncid 0x%x varid %d name %s attnum %d mem_type %d",
 	__func__, ncid, varid, name, my_attnum, mem_type));
@@ -60,6 +65,17 @@ nc4_get_att(int ncid, NC *nc, int varid, const char *name,
    if ((retval = nc4_normalize_name(name, norm_name)))
       BAIL(retval);
 
+#ifdef ENABLE_FILEINFO
+   if(nc->ext_ncid == ncid && varid == NC_GLOBAL) {	
+	const char** sp;
+	for(sp = NC_RESERVED_SPECIAL_LIST;*sp;sp++) {
+	    if(strcmp(name,*sp)==0) {
+		return nc4_get_att_special(h5, norm_name, mem_type, is_long, data, lenp, attnum);
+	    }
+	}
+    }
+#endif
+
    /* Find the attribute, if it exists. If we don't find it, we are
       major failures. */
    if ((retval = nc4_find_grp_att(grp, varid, norm_name, my_attnum, &att)))
@@ -84,8 +100,9 @@ nc4_get_att(int ncid, NC *nc, int varid, const char *name,
       *lenp = att->len;
    if (xtype)
       *xtype = att->nc_typeid;
-   if (attnum)
+   if (attnum) {
       *attnum = att->attnum;
+   }
 
    /* Zero len attributes are easy to read! */
    if (!att->len)
@@ -232,6 +249,17 @@ nc4_put_att(int ncid, NC *nc, int varid, const char *name,
    if ((retval = nc4_check_name(name, norm_name)))
       return retval;
 
+#ifdef ENABLE_FILEINFO
+   if(nc->ext_ncid == ncid && varid == NC_GLOBAL) {	
+	const char** sp;
+	for(sp = NC_RESERVED_SPECIAL_LIST;*sp;sp++) {
+	    if(strcmp(name,*sp)==0) {
+		return NC_ENOTATT; /* Not settable */
+	    }
+	}
+    }
+#endif
+
    /* Find att, if it exists. */
    if (varid == NC_GLOBAL)
       attlist = &grp->att;
@@ -246,6 +274,7 @@ nc4_put_att(int ncid, NC *nc, int varid, const char *name,
       if (!var)
 	 return NC_ENOTVAR;
    }
+
    for (att = *attlist; att; att = att->l.next)
       if (!strcmp(att->name, norm_name))
 	 break;
@@ -860,6 +889,22 @@ nc4_put_att_tc(int ncid, int varid, const char *name, nc_type file_type,
    h5 = NC4_DATA(nc);
    assert(h5);
 
+   if(nc->ext_ncid == ncid && varid == NC_GLOBAL) {
+      const char** reserved = NC_RESERVED_ATT_LIST;
+      for(;*reserved;reserved++) {
+	if(strcmp(name,*reserved)==0)
+	    return NC_ENAMEINUSE;
+      }
+   }
+
+   if(varid != NC_GLOBAL) {
+      const char** reserved = NC_RESERVED_VARATT_LIST;
+      for(;*reserved;reserved++) {
+	if(strcmp(name,*reserved)==0)
+	    return NC_ENAMEINUSE;
+      }
+   }
+
 #if 0 /*def USE_PNETCDF*/
    /* Take care of files created/opened with parallel-netcdf library. */
    if (h5->pnetcdf_file)
@@ -903,6 +948,44 @@ nc4_put_att_tc(int ncid, int varid, const char *name, nc_type file_type,
 		      mem_type_is_long, op);
 }
 
+#ifdef ENABLE_FILEINFO
+static int
+nc4_get_att_special(NC_HDF5_FILE_INFO_T *h5, const char* name, nc_type mem_type, int islong, void* data, size_t* lenp, int* idp)
+{
+    /* Always make the attr id be -1 */
+    if(idp) *idp = -1;
+
+    if(strcmp(name,NCPROPS)==0) {
+	if(h5->fileinfo->propattr.version == 0)
+	    return NC_ENOTATT;
+	if(lenp) *lenp = strlen(h5->fileinfo->propattr.text);
+	if(data) strcpy((char*)data,h5->fileinfo->propattr.text);
+    } else if(strcmp(name,ISNETCDF4ATT)==0
+              || strcmp(name,SUPERBLOCKATT)==0) {
+	unsigned long long iv = 0;
+	if(strcmp(name,SUPERBLOCKATT)==0)
+	    iv = (unsigned long long)h5->fileinfo->superblockversion;
+	else /* strcmp(name,ISNETCDF4ATT)==0 */
+	    iv = NC4_isnetcdf4(h5);
+	if(lenp) *lenp = 1;
+	if(data)
+	switch (mem_type) {
+	case NC_BYTE: *((char*)data) = (char)iv; break;
+	case NC_SHORT: *((short*)data) = (short)iv; break;
+	case NC_INT: *((int*)data) = (int)iv; break;
+	case NC_UBYTE: *((unsigned char*)data) = (unsigned char)iv; break;
+	case NC_USHORT: *((unsigned short*)data) = (unsigned short)iv; break;
+	case NC_UINT: *((unsigned int*)data) = (unsigned int)iv; break;
+	case NC_INT64: *((long long*)data) = (long long)iv; break;
+	case NC_UINT64: *((unsigned long long*)data) = (unsigned long long)iv; break;
+	default:
+	    return NC_ERANGE;
+	}
+    }
+    return NC_NOERR;
+}
+#endif
+
 /* Read an attribute of any type, with type conversion. This may be
  * called by any of the nc_get_att_* functions. */
 int
@@ -953,8 +1036,7 @@ nc4_get_att_tc(int ncid, int varid, const char *name, nc_type mem_type,
       }
    }
 #endif /* USE_PNETCDF */
-
-   return nc4_get_att(ncid, nc, varid, name, NULL, mem_type,
+    return nc4_get_att(ncid, nc, varid, name, NULL, mem_type,
 		      NULL, NULL, mem_type_is_long, ip);
 }
 
diff --git a/libsrc4/nc4file.c b/libsrc4/nc4file.c
index b191d47..4a4e70f 100644
--- a/libsrc4/nc4file.c
+++ b/libsrc4/nc4file.c
@@ -12,7 +12,6 @@ COPYRIGHT file for copying and redistribution conditions.
 #include "config.h"
 #include <errno.h>  /* netcdf functions sometimes return system errors */
 
-
 #include "nc.h"
 #include "nc4internal.h"
 #include "nc4dispatch.h"
@@ -28,6 +27,11 @@ COPYRIGHT file for copying and redistribution conditions.
 #include <hdf5_hl.h>
 #endif
 
+/* When we have open objects at file close, should
+   we log them or print to stdout. Default is to log
+*/
+#define LOGOPEN 1
+
 /* This is to track opened HDF5 objects to make sure they are
  * closed. */
 #ifdef EXTRA_TESTS
@@ -38,18 +42,13 @@ extern int num_spaces;
 #define MIN_DEFLATE_LEVEL 0
 #define MAX_DEFLATE_LEVEL 9
 
-/* These are the special attributes added by the HDF5 dimension scale
- * API. They will be ignored by netCDF-4. */
-#define REFERENCE_LIST "REFERENCE_LIST"
-#define CLASS "CLASS"
-#define DIMENSION_LIST "DIMENSION_LIST"
-#define NAME "NAME"
-
 /* Define the illegal mode flags */
 static const int ILLEGAL_OPEN_FLAGS = (NC_MMAP|NC_64BIT_OFFSET);
 
 static const int ILLEGAL_CREATE_FLAGS = (NC_NOWRITE|NC_MMAP|NC_INMEMORY|NC_64BIT_OFFSET|NC_CDF5);
 
+extern void reportopenobjects(int log, hid_t);
+
 /*! Struct to track information about objects in a group, for nc4_rec_read_metadata()
 
  \internal
@@ -80,6 +79,46 @@ static int NC4_enddef(int ncid);
 static int nc4_rec_read_metadata(NC_GRP_INFO_T *grp);
 static int close_netcdf4_file(NC_HDF5_FILE_INFO_T *h5, int abort);
 
+/* Define the names of attributes to ignore
+ * added by the HDF5 dimension scale; these
+ * attached to variables.
+ * They cannot be modified thru the netcdf-4 API.
+ */
+const char* NC_RESERVED_VARATT_LIST[] = {
+NC_ATT_REFERENCE_LIST,
+NC_ATT_CLASS,
+NC_ATT_DIMENSION_LIST,
+NC_ATT_NAME,
+NC_ATT_COORDINATES,
+NC_DIMID_ATT_NAME,
+NULL
+};
+
+/* Define the names of attributes to ignore
+ * because they are "hidden" global attributes.
+ * They can be read, but not modified thru the netcdf-4 API.
+ */
+const char* NC_RESERVED_ATT_LIST[] = {
+NC_ATT_FORMAT,
+NC3_STRICT_ATT_NAME,
+#ifdef ENABLE_FILEINFO
+NCPROPS,
+ISNETCDF4ATT,
+SUPERBLOCKATT,
+#endif
+NULL
+};
+
+#ifdef ENABLE_FILEINFO
+/* Define the subset of the reserved list that is readable by name only */
+const char* NC_RESERVED_SPECIAL_LIST[] = {
+ISNETCDF4ATT,
+SUPERBLOCKATT,
+NCPROPS,
+NULL
+};
+#endif
+
 /* These are the default chunk cache sizes for HDF5 files created or
  * opened with netCDF-4. */
 size_t nc4_chunk_cache_size = CHUNK_CACHE_SIZE;
@@ -314,7 +353,7 @@ nc4_create_file(const char *path, int cmode, MPI_Comm comm, MPI_Info info,
 	return NC_NOERR;
 #endif
 
-   /* Need this access plist to control how HDF5 handles open onjects
+   /* Need this access plist to control how HDF5 handles open objects
     * on file close. (Setting H5F_CLOSE_SEMI will cause H5Fclose to
     * fail if there are any open objects in the file. */
    if ((fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0)
@@ -424,8 +463,7 @@ nc4_create_file(const char *path, int cmode, MPI_Comm comm, MPI_Info info,
       BAIL(NC_EFILEMETA);
 
    /* Release the property lists. */
-   if (H5Pclose(fapl_id) < 0 ||
-       H5Pclose(fcpl_id) < 0)
+   if (H5Pclose(fapl_id) < 0 || H5Pclose(fcpl_id) < 0)
       BAIL(NC_EHDFERR);
 #ifdef EXTRA_TESTS
    num_plists--;
@@ -435,6 +473,11 @@ nc4_create_file(const char *path, int cmode, MPI_Comm comm, MPI_Info info,
    /* Define mode gets turned on automatically on create. */
    nc4_info->flags |= NC_INDEF;
 
+#ifdef ENABLE_FILEINFO
+   NC4_get_fileinfo(nc4_info,&globalpropinfo);
+   NC4_put_propattr(nc4_info);
+#endif  
+
    return NC_NOERR;
 
 exit: /*failure exit*/
@@ -474,6 +517,7 @@ NC4_create(const char* path, int cmode, size_t initialsz, int basepe,
    MPI_Comm comm = MPI_COMM_WORLD;
    MPI_Info info = MPI_INFO_NULL;
    int res;
+   NC* nc;
 
    assert(nc_file && path);
 
@@ -1490,6 +1534,7 @@ read_var(NC_GRP_INFO_T *grp, hid_t datasetid, const char *obj_name,
    hid_t access_pid = 0;
    int incr_id_rc = 0;          /* Whether the dataset ID's ref count has been incremented */
    int natts, a, d;
+   const char** reserved;
 
    NC_ATT_INFO_T *att;
    hid_t attid = 0;
@@ -1758,13 +1803,10 @@ read_var(NC_GRP_INFO_T *grp, hid_t datasetid, const char *obj_name,
       LOG((4, "%s:: a %d att_name %s", __func__, a, att_name));
 
       /* Should we ignore this attribute? */
-      if (strcmp(att_name, REFERENCE_LIST) &&
-	  strcmp(att_name, CLASS) &&
-	  strcmp(att_name, DIMENSION_LIST) &&
-	  strcmp(att_name, NAME) &&
-	  strcmp(att_name, COORDINATES) &&
-	  strcmp(att_name, NC_DIMID_ATT_NAME))
-      {
+      for(reserved=NC_RESERVED_VARATT_LIST;*reserved;reserved++) {
+          if (strcmp(att_name, *reserved)==0) break;
+      }
+      if(*reserved == NULL) {
 	 /* Add to the end of the list of atts for this var. */
 	 if ((retval = nc4_att_list_add(&var->att, &att)))
 	    BAIL(retval);
@@ -1825,36 +1867,43 @@ exit:
 static int
 read_grp_atts(NC_GRP_INFO_T *grp)
 {
-   hid_t attid = 0;
+   hid_t attid = -1;
    hsize_t num_obj, i;
    NC_ATT_INFO_T *att;
    NC_TYPE_INFO_T *type;
    char obj_name[NC_MAX_HDF5_NAME + 1];
    int max_len;
    int retval = NC_NOERR;
+   int hidden = 0;
 
    num_obj = H5Aget_num_attrs(grp->hdf_grpid);
    for (i = 0; i < num_obj; i++)
    {
-      /* Close an attribute from previous loop iteration */
-      /* (Should be from 'continue' statement, below) */
-      if (attid && H5Aclose(attid) < 0)
-         BAIL(NC_EHDFERR);
-
       if ((attid = H5Aopen_idx(grp->hdf_grpid, (unsigned int)i)) < 0)
          BAIL(NC_EATTMETA);
       if (H5Aget_name(attid, NC_MAX_NAME + 1, obj_name) < 0)
          BAIL(NC_EATTMETA);
       LOG((3, "reading attribute of _netCDF group, named %s", obj_name));
 
+      /* See if this a hidden, global attribute */
+      if(grp->nc4_info->root_grp == grp) {
+	const char** reserved = NC_RESERVED_ATT_LIST;
+	hidden = 0;
+	for(;*reserved;reserved++) {
+	    if(strcmp(*reserved,obj_name)==0) {
+		hidden = 1;
+		break;
+	    }
+	}
+      }
+
       /* This may be an attribute telling us that strict netcdf-3
        * rules are in effect. If so, we will make note of the fact,
        * but not add this attribute to the metadata. It's not a user
        * attribute, but an internal netcdf-4 one. */
-      if (!strcmp(obj_name, NC3_STRICT_ATT_NAME))
-         grp->nc4_info->cmode |= NC_CLASSIC_MODEL;
-      else
-      {
+      if(strcmp(obj_name, NC3_STRICT_ATT_NAME)==0)
+             grp->nc4_info->cmode |= NC_CLASSIC_MODEL;
+      else if(!hidden) {
          /* Add an att struct at the end of the list, and then go to it. */
          if ((retval = nc4_att_list_add(&grp->att, &att)))
             BAIL(retval);
@@ -1866,26 +1915,28 @@ read_grp_atts(NC_GRP_INFO_T *grp)
          strncpy(att->name, obj_name, max_len);
          att->name[max_len] = 0;
          att->attnum = grp->natts++;
-         if ((retval = read_hdf5_att(grp, attid, att)))
-         {
-            if (NC_EBADTYPID == retval)
-            {
-               if ((retval = nc4_att_list_del(&grp->att, att)))
+         retval = read_hdf5_att(grp, attid, att);
+         if(retval == NC_EBADTYPID) {
+               if((retval = nc4_att_list_del(&grp->att, att)))
                   BAIL(retval);
-               continue;
-            }
-            else
+	 } else if(retval) {
                BAIL(retval);
-         }
-         att->created = NC_TRUE;
-         if ((retval = nc4_find_type(grp->nc4_info, att->nc_typeid, &type)))
-            BAIL(retval);
+         } else {
+             att->created = NC_TRUE;
+	     if ((retval = nc4_find_type(grp->nc4_info, att->nc_typeid, &type)))
+            	BAIL(retval);
+	 }
       }
+      /* Unconditionally close the open attribute */
+      H5Aclose(attid);
+      attid = -1;
    }
 
-  exit:
-   if (attid > 0 && H5Aclose(attid) < 0)
-      BAIL2(NC_EHDFERR);
+exit:
+   if (attid > 0) {
+	if(H5Aclose(attid) < 0)
+            BAIL2(NC_EHDFERR);
+   }
    return retval;
 }
 
@@ -2229,7 +2280,6 @@ nc4_open_file(const char *path, int mode, void* parameters, NC *nc)
       BAIL(NC_EHDFERR);
 #endif
 
-
 #ifdef USE_PARALLEL4
    /* If this is a parallel file create, set up the file creation
       property list. */
@@ -2323,6 +2373,10 @@ nc4_open_file(const char *path, int mode, void* parameters, NC *nc)
    num_plists--;
 #endif
 
+#ifdef ENABLE_FILEINFO
+   NC4_get_fileinfo(nc4_info,NULL);
+#endif
+
    return NC_NOERR;
 
 exit:
@@ -2834,7 +2888,6 @@ NC4_open(const char *path, int mode, int basepe, size_t *chunksizehintp,
 #endif /* USE_HDF4 */
    else
          assert(0); /* should never happen */
-
    return res;
 }
 
@@ -3087,6 +3140,11 @@ close_netcdf4_file(NC_HDF5_FILE_INFO_T *h5, int abort)
               MPI_Info_free(&h5->info);
       }
 #endif
+
+#ifdef ENABLE_FILEINFO
+      if(h5->fileinfo) free(h5->fileinfo);
+#endif
+
       if (H5Fclose(h5->hdfid) < 0)
       {
 	int nobjs;
@@ -3097,23 +3155,29 @@ close_netcdf4_file(NC_HDF5_FILE_INFO_T *h5, int abort)
           BAIL_QUIET(NC_EHDFERR);
 	} else if(nobjs > 0) {
 #ifdef LOGGING
+	 char msg[1024];
+	 int logit = 1;
 	 /* If the close doesn't work, probably there are still some HDF5
 	  * objects open, which means there's a bug in the library. So
 	  * print out some info on to help the poor programmer figure it
 	  * out. */
-         LOG((0, "There are %d HDF5 objects open!", nobjs));
+	snprintf(msg,sizeof(msg),"There are %d HDF5 objects open!", nobjs);
+#ifdef LOGOPEN
+         LOG((0, msg));
+#else
+         fprintf(stdout,msg);
+	 logit = 0;
+#endif
+	 reportopenobjects(logit,h5->hdfid);
 #endif
-         BAIL_QUIET(NC_EHDFERR);
-	}
       }
+    }
    }
-
 exit:
    /* Free the nc4_info struct; above code should have reclaimed
       everything else */
    if(h5 != NULL)
        free(h5);
-
    return retval;
 }
 
diff --git a/libsrc4/nc4hdf.c b/libsrc4/nc4hdf.c
index 445a2f8..d11d800 100644
--- a/libsrc4/nc4hdf.c
+++ b/libsrc4/nc4hdf.c
@@ -25,6 +25,8 @@
 
 #define NC3_STRICT_ATT_NAME "_nc3_strict"
 
+#define NC_HDF5_MAX_NAME 1024
+
 /* This is to track opened HDF5 objects to make sure they are
  * closed. */
 #ifdef EXTRA_TESTS
@@ -1901,10 +1903,10 @@ write_nc3_strict_att(hid_t hdf_grpid)
         BAIL(NC_EHDFERR);
       if (H5Aget_name(attid, NC_MAX_HDF5_NAME, att_name) < 0)
         BAIL(NC_EHDFERR);
-      if (!strcmp(att_name, NC3_STRICT_ATT_NAME))
-        {
-          if (H5Aclose(attid) < 0)
+      if (H5Aclose(attid) < 0)
             return NC_EFILEMETA;
+      if (strcmp(att_name, NC3_STRICT_ATT_NAME)==0)
+        {
           return NC_NOERR;
         }
     }
@@ -2488,14 +2490,12 @@ nc4_rec_write_metadata(NC_GRP_INFO_T *grp, nc_bool_t bad_coord_order)
   int coord_varid = -1;
 
   int retval;
-
   assert(grp && grp->name && grp->hdf_grpid);
   LOG((3, "%s: grp->name %s, bad_coord_order %d", __func__, grp->name, bad_coord_order));
 
   /* Write global attributes for this group. */
   if ((retval = write_attlist(grp->att, NC_GLOBAL, grp)))
     return retval;
-
   /* Set the pointers to the beginning of the list of dims & vars in this
    * group. */
   dim = grp->dim;
@@ -3848,3 +3848,228 @@ nc4_get_typeclass(const NC_HDF5_FILE_INFO_T *h5, nc_type xtype, int *type_class)
  exit:
   return retval;
 }
+
+int
+NC4_test_netcdf4(void)
+{
+    return NC_NOERR;
+}
+void
+reportobject(int log, hid_t id, unsigned int type)
+{
+#   define MAXNAME 1024
+    char name[MAXNAME];
+    ssize_t len;
+    const char* typename = NULL;       
+
+    len = H5Iget_name(id, name, MAXNAME);
+    if(len < 0) return;
+    name[len] = '\0';
+
+    switch (type) {
+    case H5F_OBJ_FILE: typename = "File"; break;
+    case H5F_OBJ_DATASET: typename = "Dataset"; break;
+    case H5F_OBJ_GROUP: typename = "Group"; break;
+    case H5F_OBJ_DATATYPE: typename = "Datatype"; break;
+    case H5F_OBJ_ATTR:
+	typename = "Attribute";
+	len = H5Aget_name(id, MAXNAME, name);
+        if(len < 0) len = 0;
+	name[len] = '\0';
+	break;
+    default: typename = "<unknown>"; break;
+    }
+    if(log) {
+#ifdef LOGGING
+	LOG((0,"Type = %s(%8u) name='%s'",typename,id,name));
+#endif
+    } else {    
+	fprintf(stderr,"Type = %s(%8u) name='%s'",typename,id,name);
+    }
+}
+
+static unsigned int OTYPES[5] = {H5F_OBJ_FILE, H5F_OBJ_DATASET, H5F_OBJ_GROUP, H5F_OBJ_DATATYPE, H5F_OBJ_ATTR};
+
+static void
+reportopenobjectsT(int log, hid_t fid, int ntypes, unsigned int* otypes)
+{
+    int t,i;
+    ssize_t ocount;
+    size_t maxobjs = -1;
+    hid_t* idlist = NULL;
+
+    if(log) {
+#ifdef LOGGING
+        LOG((0,"\nReport: open objects on %d\n",fid));
+#endif
+    } else {
+        fprintf(stdout,"\nReport: open objects on %d\n",fid);
+    }
+    maxobjs = H5Fget_obj_count(fid,H5F_OBJ_ALL);
+    if(idlist != NULL) free(idlist);
+    idlist = (hid_t*)malloc(sizeof(hid_t)*maxobjs);
+    for(t=0;t<ntypes;t++) {    
+	unsigned int ot = otypes[t];
+	if(ot < 0) break;
+        ocount = H5Fget_obj_ids(fid,ot,maxobjs,idlist);
+	for(i=0;i<ocount;i++) {
+	    hid_t o = idlist[i];
+	    reportobject(log,o,ot);
+	}
+    }
+    if(idlist != NULL) free(idlist);
+}
+
+void
+reportopenobjects(int log, hid_t fid)
+{
+    reportopenobjectsT(log, fid,5,OTYPES);
+}
+
+
+#ifdef ENABLE_FILEINFO
+int
+NC4_hdf5get_libversion(unsigned* major,unsigned* minor,unsigned* release)
+{
+    if(H5get_libversion(major,minor,release) < 0)
+	return NC_EHDFERR;
+    return NC_NOERR;
+}
+
+int
+NC4_hdf5get_superblock(struct NC_HDF5_FILE_INFO* h5, int* idp)
+{
+    int stat = NC_NOERR;
+    unsigned super;
+    hid_t plist = -1;
+    if((plist = H5Fget_create_plist(h5->hdfid)) < 0)
+	{stat = NC_EHDFERR; goto done;}
+    if(H5Pget_version(plist, &super, NULL, NULL, NULL) < 0) 
+	{stat = NC_EHDFERR; goto done;}
+    if(idp) *idp = (int)super;
+done:
+    if(plist >= 0) H5Pclose(plist);
+    return stat;
+}
+
+/* We define a file as being from netcdf-4 if any of the following
+are true:
+1. NCPROPS attribute exists in root group
+2. NC3_STRICT_ATT_NAME exists in root group
+3. any of NC_ATT_REFERENCE_LIST, NC_ATT_CLASS,
+   NC_ATT_DIMENSION_LIST, NC_ATT_NAME,
+   NC_ATT_COORDINATES, NC_DIMID_ATT_NAME
+   exist anywhere in the file; note that this
+   requires walking the file.
+WARNINGS:
+1. False negatives are possible for a small subset of netcdf-4
+   created files.
+2. Deliberate falsification in the file can be used to cause
+   a false positive.
+*/
+
+static int NC4_get_strict_att(NC_HDF5_FILE_INFO_T*);
+static int NC4_walk(hid_t, int*);
+
+int
+NC4_isnetcdf4(struct NC_HDF5_FILE_INFO* h5)
+{
+    int stat;
+    int isnc4 = 0;
+    int count;
+
+#if 0
+    if(h5->fileinfo->propattr.version > 0) {
+	isnc4 = 1;
+	goto done;
+    }
+#endif
+    /* Look for NC3_STRICT_ATT_NAME */
+    isnc4 = NC4_get_strict_att(h5);
+    if(isnc4 > 0)
+	goto done;
+    /* attribute did not exist */
+    /* => last resort: walk the HDF5 file looking for markers */
+    count = 0;
+    stat = NC4_walk(h5->root_grp->hdf_grpid, &count);
+    if(stat != NC_NOERR)
+	isnc4 = 0;
+    else /* Threshold is at least two matches */
+	isnc4 = (count >= 2);
+
+done:
+    return isnc4;
+}
+
+static int
+NC4_get_strict_att(NC_HDF5_FILE_INFO_T* h5)
+{
+    int ncstat = NC_NOERR;
+    size_t size;
+    char text[NCPROPS_LENGTH+1];
+    hid_t grp = -1;
+    hid_t attid = -1;
+    herr_t herr = 0;
+
+    /* Get root group */
+    grp = h5->root_grp->hdf_grpid; /* get root group */
+    /* Try to extract the NC3_STRICT_ATT_NAME attribute */
+    attid = H5Aopen_name(grp, NC3_STRICT_ATT_NAME);
+    H5Aclose(attid);
+    return attid;
+}
+
+static int
+NC4_walk(hid_t gid, int* countp)
+{
+    int ncstat = NC_NOERR;
+    int i,j,na;
+    ssize_t len;
+    hsize_t nobj;
+    herr_t err;
+    int otype;
+    hid_t grpid, dsid;
+    char name[NC_HDF5_MAX_NAME];
+
+    /* walk group members of interest */
+    err = H5Gget_num_objs(gid, &nobj);
+    for(i = 0; i < nobj; i++) {
+        /* Get name & kind of object in the group */
+        len = H5Gget_objname_by_idx(gid,(hsize_t)i,name,(size_t)NC_HDF5_MAX_NAME);
+        otype =  H5Gget_objtype_by_idx(gid,(size_t)i);
+        switch(otype) {
+        case H5G_GROUP:
+            grpid = H5Gopen(gid,name);
+            NC4_walk(grpid,countp);
+            H5Gclose(grpid);
+            break;
+        case H5G_DATASET: /* variables */
+	    /* Check for phony_dim */
+	    if(strcmp(name,"phony_dim")==0)
+		*countp = *countp + 1;
+            dsid = H5Dopen(gid,name);
+            na = H5Aget_num_attrs(dsid);
+            for(j = 0; j < na; j++) {
+                hid_t aid =  H5Aopen_idx(dsid,(unsigned int)    j);
+                if(aid >= 0) {
+                    const char** p;
+                    ssize_t len = H5Aget_name(aid, NC_HDF5_MAX_NAME, name);
+                    /* Is this a netcdf-4 marker attribute */
+                        for(p=NC_RESERVED_VARATT_LIST;*p;p++) {
+                            if(strcmp(name,*p) ==     0) {
+                                *countp = *countp + 1;
+                            }
+                        }               
+                }
+                H5Aclose(aid);
+            }
+            H5Dclose(dsid);
+            break;
+        default:/* ignore */
+            break;
+            }
+    }
+    return ncstat;
+}
+
+#endif
diff --git a/libsrc4/nc4info.c b/libsrc4/nc4info.c
new file mode 100644
index 0000000..a1ec4a0
--- /dev/null
+++ b/libsrc4/nc4info.c
@@ -0,0 +1,213 @@
+/*********************************************************************
+*    Copyright 2010, UCAR/Unidata
+*    See netcdf/COPYRIGHT file for copying and redistribution conditions.
+* ********************************************************************/
+
+#include "config.h"
+#include <stdlib.h>
+#include <string.h>
+#include <hdf5.h>
+#include "netcdf.h"
+#include "nc4internal.h"
+
+#define IGNORE 0
+
+#define HDF5_MAX_NAME 1024
+
+#define NCHECK(expr) {if((expr)!=NC_NOERR) {goto done;}}
+#define HCHECK(expr) {if((expr)<0) {ncstat = NC_EHDFERR; goto done;}}
+
+/* Global */
+struct NCPROPINFO globalpropinfo;
+
+int
+NC4_fileinfo_init(void)
+{
+    int stat = NC_NOERR;
+    unsigned major,minor,release;
+    int super;
+    size_t total = 0;
+
+    /* Build nc properties */
+    memset((void*)&globalpropinfo,0,sizeof(globalpropinfo));
+    globalpropinfo.version = NCPROPS_VERSION;
+    globalpropinfo.netcdfver[0] = '\0';
+    globalpropinfo.hdf5ver[0] = '\0';
+
+    stat = NC4_hdf5get_libversion(&major,&minor,&release);
+    if(stat) goto done;
+    snprintf(globalpropinfo.hdf5ver,sizeof(globalpropinfo.hdf5ver),
+		 "%1u.%1u.%1u",major,minor,release);
+    strncpy(globalpropinfo.netcdfver,PACKAGE_VERSION,sizeof(globalpropinfo.netcdfver));
+    /* Now build actual attribute text */
+    total = 0;
+    total += strlen(NCPVERSION);
+    total += strlen("=00000000|");
+    total += strlen(NCPNCLIBVERSION);
+    total += strlen(globalpropinfo.netcdfver);
+    total += strlen("=|");
+    total += strlen(NCPHDF5LIBVERSION);
+    total += strlen(globalpropinfo.hdf5ver);
+    total += strlen("="); /* Last pair has no trailing '|' */
+    if(total >= sizeof(globalpropinfo.text)) {
+        fprintf(stderr,"%s size is too small\n",NCPROPS);
+        goto done;
+    }
+    globalpropinfo.text[0] = '\0';
+    snprintf(globalpropinfo.text,sizeof(globalpropinfo.text),
+		"%s=%d|%s=%s|%s=%s",
+	        NCPVERSION,globalpropinfo.version,
+	        NCPNCLIBVERSION,globalpropinfo.netcdfver,
+	        NCPHDF5LIBVERSION,globalpropinfo.hdf5ver);
+done:
+    return stat;
+}
+
+static int
+NC4_properties_parse(struct NCPROPINFO* ncprops)
+{
+    size_t len;
+    char propdata[NCPROPS_LENGTH]; /* match nc.h struct NCProperties */
+    char* p;
+
+    ncprops->version = 0;
+    ncprops->hdf5ver[0] = '\0';
+    ncprops->netcdfver[0] = '\0';
+
+    strncpy(propdata,ncprops->text,sizeof(propdata)-1);
+    propdata[sizeof(propdata)-1] = '\0';
+    len = strlen(propdata);
+    if(len == 0) return NC_NOERR;
+
+    /* Walk and fill in ncinfo */
+    p = propdata;
+    while(*p) {
+	char* name = p;
+	char* value = NULL;
+	char* q = strchr(p,'=');
+	if(q == NULL)
+	    return NC_EINVAL;
+	*q++ = '\0';
+	value = p = q;
+        q = strchr(p,NCPROPSSEP);
+	if(q == NULL) q = (p+strlen(p)); else* q++ = '\0';
+	p = q;
+	if(name != NULL && value != NULL) {
+	    if(strcmp(name,NCPVERSION) == 0) {
+		int v = atoi(value);
+		if(v < 0) v = 0;
+		ncprops->version = v;
+	    } else if(strcmp(name,NCPNCLIBVERSION) == 0)
+	        strncpy(ncprops->netcdfver,value,sizeof(ncprops->netcdfver)-1);
+	    else if(strcmp(name,NCPHDF5LIBVERSION) == 0)
+	        strncpy(ncprops->hdf5ver,value,sizeof(ncprops->hdf5ver)-1);
+	    /* else ignore */
+	}
+    }
+    /* Guarantee null term */
+    ncprops->netcdfver[sizeof(ncprops->netcdfver)-1] = '\0';
+    ncprops->hdf5ver[sizeof(ncprops->hdf5ver)-1] = '\0';
+    return NC_NOERR;
+}
+
+static int
+NC4_get_propattr(NC_HDF5_FILE_INFO_T* h5)
+{
+    int ncstat = NC_NOERR;
+    size_t size;
+    H5T_class_t t_class;	
+    char text[NCPROPS_LENGTH+1];
+    hid_t grp = -1;
+    hid_t attid = -1;
+    hid_t aspace = -1;
+    hid_t atype = -1;
+    hid_t ntype = -1;
+    herr_t herr = 0;
+
+    /* Get root group */
+    grp = h5->root_grp->hdf_grpid; /* get root group */
+    /* Try to extract the NCPROPS attribute */
+    attid = H5Aopen_name(grp, NCPROPS);
+    if(attid >= 0) {
+	herr = -1;
+	aspace = H5Aget_space(attid); /* dimensions of attribute data */
+        atype = H5Aget_type(attid);
+	/* Verify that atype and size */
+	t_class = H5Tget_class(atype);
+	if(t_class != H5T_STRING) {ncstat = NC_EATTMETA; goto done;}
+        size = H5Tget_size(atype);
+	if(size != NCPROPS_LENGTH) {ncstat = NC_EATTMETA; goto done;}
+        HCHECK((ntype = H5Tget_native_type(atype, H5T_DIR_ASCEND)));
+        HCHECK((H5Aread(attid, ntype, text)));
+	/* Try to parse text */
+	strncpy(h5->fileinfo->propattr.text,text,NCPROPS_LENGTH);
+	h5->fileinfo->propattr.text[NCPROPS_LENGTH-1] = '\0';
+	ncstat = NC4_properties_parse(&h5->fileinfo->propattr);
+	herr = 0;
+    }    
+done:
+    if(attid >= 0) HCHECK((H5Aclose(attid)));
+    if(aspace >= 0) HCHECK((H5Sclose(aspace)));
+    if(ntype >= 0) HCHECK((H5Tclose(ntype)));
+    if(atype >= 0) HCHECK((H5Tclose(atype)));
+    return ncstat;
+}
+
+int
+NC4_put_propattr(NC_HDF5_FILE_INFO_T* h5)
+{
+    int ncstat = NC_NOERR;
+    char text[NCPROPS_LENGTH+1];
+    H5T_class_t t_class;	
+    size_t size;
+    hid_t grp = -1;
+    hid_t exists = -1;
+    hid_t attid = -1;
+    hid_t aspace = -1;
+    hid_t atype = -1;
+    herr_t herr = 0;
+
+    /* Get root group */
+    grp = h5->root_grp->hdf_grpid; /* get root group */
+    /* See if the NCPROPS attribute exists */
+    exists = H5Aopen_name(grp, NCPROPS);
+    if(exists < 0) {/* Does not exist */
+	herr = -1;
+        /* Create a datatype to refer to. */
+        HCHECK((atype = H5Tcopy(H5T_C_S1)));
+	HCHECK((H5Tset_cset(atype, H5T_CSET_UTF8)));
+        HCHECK((H5Tset_size(atype, NCPROPS_LENGTH)));
+	HCHECK((aspace = H5Screate(H5S_SCALAR)));
+	HCHECK((attid = H5Acreate(grp, NCPROPS, atype, aspace, H5P_DEFAULT)));
+        HCHECK((H5Awrite(attid, atype, h5->fileinfo->propattr.text)));
+	herr = 0;
+    }
+done:
+    if(exists >= 0) HCHECK((H5Aclose(exists)));
+    if(attid >= 0) HCHECK((H5Aclose(attid)));
+    if(aspace >= 0) HCHECK((H5Sclose(aspace)));
+    if(atype >= 0) HCHECK((H5Tclose(atype)));
+    return ncstat;
+}
+
+int
+NC4_get_fileinfo(NC_HDF5_FILE_INFO_T* h5, struct NCPROPINFO* init)
+{
+    int ncstat = NC_NOERR;
+
+    /* Allocate the fileinfo in h5 */
+    h5->fileinfo = (struct NCFILEINFO*)calloc(1,sizeof(struct NCFILEINFO));
+    if(h5->fileinfo == NULL)
+	{ncstat = NC_ENOMEM; goto done;}
+
+    /* Get superblock version */
+    NCHECK((ncstat = NC4_hdf5get_superblock(h5,&h5->fileinfo->superblockversion)));
+    /* Get properties attribute if not already defined */
+    if(init == NULL) {
+        NCHECK((ncstat = NC4_get_propattr(h5)));
+    } else { /*init != NULL*/
+       h5->fileinfo->propattr = *init; /* Initialize */
+    }
+done:
+    return ncstat;    
+}
diff --git a/libsrc4/nc4internal.c b/libsrc4/nc4internal.c
index a7a1a0b..fd4c088 100644
--- a/libsrc4/nc4internal.c
+++ b/libsrc4/nc4internal.c
@@ -45,7 +45,7 @@ int nc_log_level = -1;
 
 #endif /* LOGGING */
 
-static int nc4_hdf5_initialized = 0;
+int nc4_hdf5_initialized = 0;
 
 /*
 Provide a function to do any necessary initialization
@@ -544,12 +544,13 @@ nc4_find_grp_att(NC_GRP_INFO_T *grp, int varid, const char *name, int attnum,
 
    /* Now find the attribute by name or number. If a name is provided,
     * ignore the attnum. */
-   for (*att = attlist; *att; *att = (*att)->l.next) {
-      if (name && (*att)->name && !strcmp((*att)->name, name))
-	return NC_NOERR;
-      if (!name && (*att)->attnum == attnum)
-	return NC_NOERR;
-   }
+   if(attlist)
+       for (*att = attlist; *att; *att = (*att)->l.next) {
+           if (name && (*att)->name && !strcmp((*att)->name, name))
+	       return NC_NOERR;
+           if (!name && (*att)->attnum == attnum)
+	       return NC_NOERR;
+       }
 
    /* If we get here, we couldn't find the attribute. */
    return NC_ENOTATT;
diff --git a/libsrc4/nc4var.c b/libsrc4/nc4var.c
index eb0cb95..b990c4a 100644
--- a/libsrc4/nc4var.c
+++ b/libsrc4/nc4var.c
@@ -1474,10 +1474,7 @@ nc4_get_hdf4_vara(NC *nc, int ncid, int varid, const size_t *startp,
    NC_VAR_INFO_T *var;
    int32 start32[NC_MAX_VAR_DIMS], edge32[NC_MAX_VAR_DIMS];
    int retval, d;
-#if 0
-   NC_GRP_INFO_T *g;
-   NC_DIM_INFO_T *dim;
-#endif
+
    /* Find our metadata for this file, group, and var. */
    assert(nc);
    if ((retval = nc4_find_g_var_nc(nc, ncid, varid, &grp, &var)))
diff --git a/nc_test/Make0 b/nc_test/Make0
index c60b85e..4e1c2b2 100644
--- a/nc_test/Make0
+++ b/nc_test/Make0
@@ -1,34 +1,33 @@
 # Test c output
-T=t
+T=tst_small
 #CMD=valgrind --leak-check=full
+CMD=gdb --args
 
-#CMD=gdb --args
+#PAR=1
 
-CC=mpicc
+CFLAGS=-Wall -Wno-unused-variable -Wno-unused-function -g -O0 -I.. -I../include
 
-CFLAGS=-g -O0 -I.. -I../include
+ifdef PAR
+CC=mpicc
+#CC=/usr/local/bin/mpicc
+LDFLAGS=../liblib/.libs/libnetcdf.a -L/usr/local/lib -lhdf5_hl -lhdf5 -lz  -ldl -lcurl -lpnetcdf -lmpich -lm
+else
+CC=gcc
 #LDFLAGS=../liblib/.libs/libnetcdf.a  -L/usr/local/lib -lhdf5_hl -lhdf5 -lz -lm -lcurl
-
-LDFLAGS=-L/usr/local/lib -lhdf5_hl -lhdf5 -lz  ../liblib/.libs/libnetcdf.a -ldl -lm -lcurl
-
-CC=/usr/local/bin/mpicc
-LDFLAGS=-L/usr/local/lib -lhdf5_hl -lhdf5 -lz  ../liblib/.libs/libnetcdf.a -ldl -lcurl -lpnetcdf -lmpich -lm
+LDFLAGS=../liblib/.libs/libnetcdf.a -L/usr/local/lib -lhdf5_hl -lhdf5 -lz  -ldl -lm -lcurl
+endif
 
 #	cd .. ; ${MAKE} all
 
 LLP=/usr/local/lib:${LD_LIBRARY_PATH}
 
-all::
-	echo ${LD_RUN_PATH}
+all:: cmp
 	export LD_LIBRARY_PATH=${LLP}; export CFLAGS; export LDFLAGS; \
-	${CC} -o t ${CFLAGS} ${T}.c ${LDFLAGS}; \
 	${CMD} ./t
 
+cmp::
+	export LD_LIBRARY_PATH=${LLP}; export CFLAGS; export LDFLAGS; \
+	${CC} -o t ${CFLAGS} ${T}.c ${SRC} ${LDFLAGS}; \
+
 cpp::
 	${CC} -E ${CFLAGS} ${T}.c > ${T}.txt
-
-all::
-	echo ${LD_RUN_PATH}
-	export LD_LIBRARY_PATH=${LLP}; export CFLAGS; export LDFLAGS; \
-	gcc -o t ${CFLAGS} ${T}.c ${LDFLAGS}; \
-	${CMD} ./t
diff --git a/nc_test/Makefile.in b/nc_test/Makefile.in
index 37357aa..34f2689 100644
--- a/nc_test/Makefile.in
+++ b/nc_test/Makefile.in
@@ -386,190 +386,8 @@ am__tty_colors = { \
     std=''; \
   fi; \
 }
-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 = f=`echo $$p | sed -e 's|^.*/||'`;
-am__install_max = 40
-am__nobase_strip_setup = \
-  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
-am__nobase_strip = \
-  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
-am__nobase_list = $(am__nobase_strip_setup); \
-  for p in $$list; do echo "$$p $$p"; done | \
-  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
-  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
-    if (++n[$$2] == $(am__install_max)) \
-      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
-    END { for (dir in files) print dir, files[dir] }'
-am__base_list = \
-  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
-  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-am__uninstall_files_from_dir = { \
-  test -z "$$files" \
-    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
-    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
-         $(am__cd) "$$dir" && rm -f $$files; }; \
-  }
-am__recheck_rx = ^[ 	]*:recheck:[ 	]*
-am__global_test_result_rx = ^[ 	]*:global-test-result:[ 	]*
-am__copy_in_global_log_rx = ^[ 	]*:copy-in-global-log:[ 	]*
-# A command that, given a newline-separated list of test names on the
-# standard input, print the name of the tests that are to be re-run
-# upon "make recheck".
-am__list_recheck_tests = $(AWK) '{ \
-  recheck = 1; \
-  while ((rc = (getline line < ($$0 ".trs"))) != 0) \
-    { \
-      if (rc < 0) \
-        { \
-          if ((getline line2 < ($$0 ".log")) < 0) \
-	    recheck = 0; \
-          break; \
-        } \
-      else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
-        { \
-          recheck = 0; \
-          break; \
-        } \
-      else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
-        { \
-          break; \
-        } \
-    }; \
-  if (recheck) \
-    print $$0; \
-  close ($$0 ".trs"); \
-  close ($$0 ".log"); \
-}'
-# A command that, given a newline-separated list of test names on the
-# standard input, create the global log from their .trs and .log files.
-am__create_global_log = $(AWK) ' \
-function fatal(msg) \
-{ \
-  print "fatal: making $@: " msg | "cat >&2"; \
-  exit 1; \
-} \
-function rst_section(header) \
-{ \
-  print header; \
-  len = length(header); \
-  for (i = 1; i <= len; i = i + 1) \
-    printf "="; \
-  printf "\n\n"; \
-} \
-{ \
-  copy_in_global_log = 1; \
-  global_test_result = "RUN"; \
-  while ((rc = (getline line < ($$0 ".trs"))) != 0) \
-    { \
-      if (rc < 0) \
-         fatal("failed to read from " $$0 ".trs"); \
-      if (line ~ /$(am__global_test_result_rx)/) \
-        { \
-          sub("$(am__global_test_result_rx)", "", line); \
-          sub("[ 	]*$$", "", line); \
-          global_test_result = line; \
-        } \
-      else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
-        copy_in_global_log = 0; \
-    }; \
-  if (copy_in_global_log) \
-    { \
-      rst_section(global_test_result ": " $$0); \
-      while ((rc = (getline line < ($$0 ".log"))) != 0) \
-      { \
-        if (rc < 0) \
-          fatal("failed to read from " $$0 ".log"); \
-        print line; \
-      }; \
-      printf "\n"; \
-    }; \
-  close ($$0 ".trs"); \
-  close ($$0 ".log"); \
-}'
-# Restructured Text title.
-am__rst_title = { sed 's/.*/   &   /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
-# Solaris 10 'make', and several other traditional 'make' implementations,
-# pass "-e" to $(SHELL), and POSIX 2008 even requires this.  Work around it
-# by disabling -e (using the XSI extension "set +e") if it's set.
-am__sh_e_setup = case $$- in *e*) set +e;; esac
-# Default flags passed to test drivers.
-am__common_driver_flags = \
-  --color-tests "$$am__color_tests" \
-  --enable-hard-errors "$$am__enable_hard_errors" \
-  --expect-failure "$$am__expect_failure"
-# To be inserted before the command running the test.  Creates the
-# directory for the log if needed.  Stores in $dir the directory
-# containing $f, in $tst the test, in $log the log.  Executes the
-# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
-# passes TESTS_ENVIRONMENT.  Set up options for the wrapper that
-# will run the test scripts (or their associated LOG_COMPILER, if
-# thy have one).
-am__check_pre = \
-$(am__sh_e_setup);					\
-$(am__vpath_adj_setup) $(am__vpath_adj)			\
-$(am__tty_colors);					\
-srcdir=$(srcdir); export srcdir;			\
-case "$@" in						\
-  */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;;	\
-    *) am__odir=.;; 					\
-esac;							\
-test "x$$am__odir" = x"." || test -d "$$am__odir" 	\
-  || $(MKDIR_P) "$$am__odir" || exit $$?;		\
-if test -f "./$$f"; then dir=./;			\
-elif test -f "$$f"; then dir=;				\
-else dir="$(srcdir)/"; fi;				\
-tst=$$dir$$f; log='$@'; 				\
-if test -n '$(DISABLE_HARD_ERRORS)'; then		\
-  am__enable_hard_errors=no; 				\
-else							\
-  am__enable_hard_errors=yes; 				\
-fi; 							\
-case " $(XFAIL_TESTS) " in				\
-  *[\ \	]$$f[\ \	]* | *[\ \	]$$dir$$f[\ \	]*) \
-    am__expect_failure=yes;;				\
-  *)							\
-    am__expect_failure=no;;				\
-esac; 							\
-$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
-# A shell command to get the names of the tests scripts with any registered
-# extension removed (i.e., equivalently, the names of the test logs, with
-# the '.log' extension removed).  The result is saved in the shell variable
-# '$bases'.  This honors runtime overriding of TESTS and TEST_LOGS.  Sadly,
-# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
-# since that might cause problem with VPATH rewrites for suffix-less tests.
-# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
-am__set_TESTS_bases = \
-  bases='$(TEST_LOGS)'; \
-  bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
-  bases=`echo $$bases`
-RECHECK_LOGS = $(TEST_LOGS)
-AM_RECURSIVE_TARGETS = check recheck
-TEST_SUITE_LOG = test-suite.log
-TEST_EXTENSIONS = @EXEEXT@ .test
-LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
-LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS)
-am__set_b = \
-  case '$@' in \
-    */*) \
-      case '$*' in \
-        */*) b='$*';; \
-          *) b=`echo '$@' | sed 's/\.log$$//'`; \
-       esac;; \
-    *) \
-      b='$*';; \
-  esac
-am__test_logs1 = $(TESTS:=.log)
-am__test_logs2 = $(am__test_logs1:@EXEEXT at .log=.log)
-TEST_LOGS = $(am__test_logs2:.test.log=.log)
-TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
-TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
-	$(TEST_LOG_FLAGS)
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \
-	$(top_srcdir)/lib_flags.am $(top_srcdir)/test-driver
+	$(top_srcdir)/lib_flags.am
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
@@ -785,7 +603,7 @@ EXTRA_DIST = test_get.m4 test_put.m4 run_valgrind_tests.sh \
 all: all-am
 
 .SUFFIXES:
-.SUFFIXES: .c .lo .log .m4 .o .obj .test .test$(EXEEXT) .trs
+.SUFFIXES: .c .lo .m4 .o .obj
 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/lib_flags.am $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
@@ -1071,378 +889,98 @@ cscopelist-am: $(am__tagged_files)
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
-# Recover from deleted '.trs' file; this should ensure that
-# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
-# both 'foo.log' and 'foo.trs'.  Break the recipe in two subshells
-# to avoid problems with "make -n".
-.log.trs:
-	rm -f $< $@
-	$(MAKE) $(AM_MAKEFLAGS) $<
-
-# Leading 'am--fnord' is there to ensure the list of targets does not
-# expand to empty, as could happen e.g. with make check TESTS=''.
-am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
-am--force-recheck:
-	@:
-
-$(TEST_SUITE_LOG): $(TEST_LOGS)
-	@$(am__set_TESTS_bases); \
-	am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
-	redo_bases=`for i in $$bases; do \
-	              am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
-	            done`; \
-	if test -n "$$redo_bases"; then \
-	  redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
-	  redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
-	  if $(am__make_dryrun); then :; else \
-	    rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
-	  fi; \
-	fi; \
-	if test -n "$$am__remaking_logs"; then \
-	  echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
-	       "recursion detected" >&2; \
-	elif test -n "$$redo_logs"; then \
-	  am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
-	fi; \
-	if $(am__make_dryrun); then :; else \
-	  st=0;  \
-	  errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
-	  for i in $$redo_bases; do \
-	    test -f $$i.trs && test -r $$i.trs \
-	      || { echo "$$errmsg $$i.trs" >&2; st=1; }; \
-	    test -f $$i.log && test -r $$i.log \
-	      || { echo "$$errmsg $$i.log" >&2; st=1; }; \
+check-TESTS: $(TESTS)
+	@failed=0; all=0; xfail=0; xpass=0; skip=0; \
+	srcdir=$(srcdir); export srcdir; \
+	list=' $(TESTS) '; \
+	$(am__tty_colors); \
+	if test -n "$$list"; then \
+	  for tst in $$list; do \
+	    if test -f ./$$tst; then dir=./; \
+	    elif test -f $$tst; then dir=; \
+	    else dir="$(srcdir)/"; fi; \
+	    if $(TESTS_ENVIRONMENT) $${dir}$$tst $(AM_TESTS_FD_REDIRECT); then \
+	      all=`expr $$all + 1`; \
+	      case " $(XFAIL_TESTS) " in \
+	      *[\ \	]$$tst[\ \	]*) \
+		xpass=`expr $$xpass + 1`; \
+		failed=`expr $$failed + 1`; \
+		col=$$red; res=XPASS; \
+	      ;; \
+	      *) \
+		col=$$grn; res=PASS; \
+	      ;; \
+	      esac; \
+	    elif test $$? -ne 77; then \
+	      all=`expr $$all + 1`; \
+	      case " $(XFAIL_TESTS) " in \
+	      *[\ \	]$$tst[\ \	]*) \
+		xfail=`expr $$xfail + 1`; \
+		col=$$lgn; res=XFAIL; \
+	      ;; \
+	      *) \
+		failed=`expr $$failed + 1`; \
+		col=$$red; res=FAIL; \
+	      ;; \
+	      esac; \
+	    else \
+	      skip=`expr $$skip + 1`; \
+	      col=$$blu; res=SKIP; \
+	    fi; \
+	    echo "$${col}$$res$${std}: $$tst"; \
 	  done; \
-	  test $$st -eq 0 || exit 1; \
-	fi
-	@$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
-	ws='[ 	]'; \
-	results=`for b in $$bases; do echo $$b.trs; done`; \
-	test -n "$$results" || results=/dev/null; \
-	all=`  grep "^$$ws*:test-result:"           $$results | wc -l`; \
-	pass=` grep "^$$ws*:test-result:$$ws*PASS"  $$results | wc -l`; \
-	fail=` grep "^$$ws*:test-result:$$ws*FAIL"  $$results | wc -l`; \
-	skip=` grep "^$$ws*:test-result:$$ws*SKIP"  $$results | wc -l`; \
-	xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
-	xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
-	error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
-	if test `expr $$fail + $$xpass + $$error` -eq 0; then \
-	  success=true; \
-	else \
-	  success=false; \
-	fi; \
-	br='==================='; br=$$br$$br$$br$$br; \
-	result_count () \
-	{ \
-	    if test x"$$1" = x"--maybe-color"; then \
-	      maybe_colorize=yes; \
-	    elif test x"$$1" = x"--no-color"; then \
-	      maybe_colorize=no; \
+	  if test "$$all" -eq 1; then \
+	    tests="test"; \
+	    All=""; \
+	  else \
+	    tests="tests"; \
+	    All="All "; \
+	  fi; \
+	  if test "$$failed" -eq 0; then \
+	    if test "$$xfail" -eq 0; then \
+	      banner="$$All$$all $$tests passed"; \
 	    else \
-	      echo "$@: invalid 'result_count' usage" >&2; exit 4; \
+	      if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
+	      banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
 	    fi; \
-	    shift; \
-	    desc=$$1 count=$$2; \
-	    if test $$maybe_colorize = yes && test $$count -gt 0; then \
-	      color_start=$$3 color_end=$$std; \
+	  else \
+	    if test "$$xpass" -eq 0; then \
+	      banner="$$failed of $$all $$tests failed"; \
+	    else \
+	      if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
+	      banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
+	    fi; \
+	  fi; \
+	  dashes="$$banner"; \
+	  skipped=""; \
+	  if test "$$skip" -ne 0; then \
+	    if test "$$skip" -eq 1; then \
+	      skipped="($$skip test was not run)"; \
 	    else \
-	      color_start= color_end=; \
+	      skipped="($$skip tests were not run)"; \
 	    fi; \
-	    echo "$${color_start}# $$desc $$count$${color_end}"; \
-	}; \
-	create_testsuite_report () \
-	{ \
-	  result_count $$1 "TOTAL:" $$all   "$$brg"; \
-	  result_count $$1 "PASS: " $$pass  "$$grn"; \
-	  result_count $$1 "SKIP: " $$skip  "$$blu"; \
-	  result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
-	  result_count $$1 "FAIL: " $$fail  "$$red"; \
-	  result_count $$1 "XPASS:" $$xpass "$$red"; \
-	  result_count $$1 "ERROR:" $$error "$$mgn"; \
-	}; \
-	{								\
-	  echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" |	\
-	    $(am__rst_title);						\
-	  create_testsuite_report --no-color;				\
-	  echo;								\
-	  echo ".. contents:: :depth: 2";				\
-	  echo;								\
-	  for b in $$bases; do echo $$b; done				\
-	    | $(am__create_global_log);					\
-	} >$(TEST_SUITE_LOG).tmp || exit 1;				\
-	mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG);			\
-	if $$success; then						\
-	  col="$$grn";							\
-	 else								\
-	  col="$$red";							\
-	  test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG);		\
-	fi;								\
-	echo "$${col}$$br$${std}"; 					\
-	echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}";	\
-	echo "$${col}$$br$${std}"; 					\
-	create_testsuite_report --maybe-color;				\
-	echo "$$col$$br$$std";						\
-	if $$success; then :; else					\
-	  echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}";		\
-	  if test -n "$(PACKAGE_BUGREPORT)"; then			\
-	    echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}";	\
-	  fi;								\
-	  echo "$$col$$br$$std";					\
-	fi;								\
-	$$success || exit 1
-
-check-TESTS:
-	@list='$(RECHECK_LOGS)';           test -z "$$list" || rm -f $$list
-	@list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
-	@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
-	@set +e; $(am__set_TESTS_bases); \
-	log_list=`for i in $$bases; do echo $$i.log; done`; \
-	trs_list=`for i in $$bases; do echo $$i.trs; done`; \
-	log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
-	$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
-	exit $$?;
-recheck: all $(check_PROGRAMS)
-	@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
-	@set +e; $(am__set_TESTS_bases); \
-	bases=`for i in $$bases; do echo $$i; done \
-	         | $(am__list_recheck_tests)` || exit 1; \
-	log_list=`for i in $$bases; do echo $$i.log; done`; \
-	log_list=`echo $$log_list`; \
-	$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
-	        am__force_recheck=am--force-recheck \
-	        TEST_LOGS="$$log_list"; \
-	exit $$?
-t_nc.log: t_nc$(EXEEXT)
-	@p='t_nc$(EXEEXT)'; \
-	b='t_nc'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_small.log: tst_small$(EXEEXT)
-	@p='tst_small$(EXEEXT)'; \
-	b='tst_small'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-nc_test.log: nc_test$(EXEEXT)
-	@p='nc_test$(EXEEXT)'; \
-	b='nc_test'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_misc.log: tst_misc$(EXEEXT)
-	@p='tst_misc$(EXEEXT)'; \
-	b='tst_misc'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_norm.log: tst_norm$(EXEEXT)
-	@p='tst_norm$(EXEEXT)'; \
-	b='tst_norm'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_names.log: tst_names$(EXEEXT)
-	@p='tst_names$(EXEEXT)'; \
-	b='tst_names'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_nofill.log: tst_nofill$(EXEEXT)
-	@p='tst_nofill$(EXEEXT)'; \
-	b='tst_nofill'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_nofill2.log: tst_nofill2$(EXEEXT)
-	@p='tst_nofill2$(EXEEXT)'; \
-	b='tst_nofill2'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_nofill3.log: tst_nofill3$(EXEEXT)
-	@p='tst_nofill3$(EXEEXT)'; \
-	b='tst_nofill3'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_atts3.log: tst_atts3$(EXEEXT)
-	@p='tst_atts3$(EXEEXT)'; \
-	b='tst_atts3'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_meta.log: tst_meta$(EXEEXT)
-	@p='tst_meta$(EXEEXT)'; \
-	b='tst_meta'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_inq_type.log: tst_inq_type$(EXEEXT)
-	@p='tst_inq_type$(EXEEXT)'; \
-	b='tst_inq_type'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_atts.log: tst_atts$(EXEEXT)
-	@p='tst_atts$(EXEEXT)'; \
-	b='tst_atts'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_put_vars.log: tst_put_vars$(EXEEXT)
-	@p='tst_put_vars$(EXEEXT)'; \
-	b='tst_put_vars'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_parallel2.log: tst_parallel2$(EXEEXT)
-	@p='tst_parallel2$(EXEEXT)'; \
-	b='tst_parallel2'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_pnetcdf.log: tst_pnetcdf$(EXEEXT)
-	@p='tst_pnetcdf$(EXEEXT)'; \
-	b='tst_pnetcdf'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_addvar.log: tst_addvar$(EXEEXT)
-	@p='tst_addvar$(EXEEXT)'; \
-	b='tst_addvar'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_formatx_pnetcdf.log: tst_formatx_pnetcdf$(EXEEXT)
-	@p='tst_formatx_pnetcdf$(EXEEXT)'; \
-	b='tst_formatx_pnetcdf'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-quick_large_files.log: quick_large_files$(EXEEXT)
-	@p='quick_large_files$(EXEEXT)'; \
-	b='quick_large_files'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_big_var6.log: tst_big_var6$(EXEEXT)
-	@p='tst_big_var6$(EXEEXT)'; \
-	b='tst_big_var6'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_big_var2.log: tst_big_var2$(EXEEXT)
-	@p='tst_big_var2$(EXEEXT)'; \
-	b='tst_big_var2'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_big_rvar.log: tst_big_rvar$(EXEEXT)
-	@p='tst_big_rvar$(EXEEXT)'; \
-	b='tst_big_rvar'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_big_var.log: tst_big_var$(EXEEXT)
-	@p='tst_big_var$(EXEEXT)'; \
-	b='tst_big_var'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_large.log: tst_large$(EXEEXT)
-	@p='tst_large$(EXEEXT)'; \
-	b='tst_large'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-large_files.log: large_files$(EXEEXT)
-	@p='large_files$(EXEEXT)'; \
-	b='large_files'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-testnc3perf.log: testnc3perf$(EXEEXT)
-	@p='testnc3perf$(EXEEXT)'; \
-	b='testnc3perf'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-run_diskless.sh.log: run_diskless.sh
-	@p='run_diskless.sh'; \
-	b='run_diskless.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-run_mmap.sh.log: run_mmap.sh
-	@p='run_mmap.sh'; \
-	b='run_mmap.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-run_diskless2.sh.log: run_diskless2.sh
-	@p='run_diskless2.sh'; \
-	b='run_diskless2.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-run_pnetcdf_test.sh.log: run_pnetcdf_test.sh
-	@p='run_pnetcdf_test.sh'; \
-	b='run_pnetcdf_test.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-run_valgrind_tests.sh.log: run_valgrind_tests.sh
-	@p='run_valgrind_tests.sh'; \
-	b='run_valgrind_tests.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-.test.log:
-	@p='$<'; \
-	$(am__set_b); \
-	$(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
- at am__EXEEXT_TRUE@.test$(EXEEXT).log:
- at am__EXEEXT_TRUE@	@p='$<'; \
- at am__EXEEXT_TRUE@	$(am__set_b); \
- at am__EXEEXT_TRUE@	$(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
- at am__EXEEXT_TRUE@	--log-file $$b.log --trs-file $$b.trs \
- at am__EXEEXT_TRUE@	$(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
- at am__EXEEXT_TRUE@	"$$tst" $(AM_TESTS_FD_REDIRECT)
+	    test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
+	      dashes="$$skipped"; \
+	  fi; \
+	  report=""; \
+	  if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
+	    report="Please report to $(PACKAGE_BUGREPORT)"; \
+	    test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
+	      dashes="$$report"; \
+	  fi; \
+	  dashes=`echo "$$dashes" | sed s/./=/g`; \
+	  if test "$$failed" -eq 0; then \
+	    col="$$grn"; \
+	  else \
+	    col="$$red"; \
+	  fi; \
+	  echo "$${col}$$dashes$${std}"; \
+	  echo "$${col}$$banner$${std}"; \
+	  test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \
+	  test -z "$$report" || echo "$${col}$$report$${std}"; \
+	  echo "$${col}$$dashes$${std}"; \
+	  test "$$failed" -eq 0; \
+	else :; fi
 
 distdir: $(DISTFILES)
 	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@@ -1500,9 +1038,6 @@ install-strip:
 	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
 	fi
 mostlyclean-generic:
-	-test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
-	-test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
-	-test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
 
 clean-generic:
 	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
@@ -1599,7 +1134,7 @@ uninstall-am:
 	installcheck-am installdirs maintainer-clean \
 	maintainer-clean-generic mostlyclean mostlyclean-compile \
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-	recheck tags tags-am uninstall uninstall-am
+	tags tags-am uninstall uninstall-am
 
 .PRECIOUS: Makefile
 
diff --git a/nc_test4/Make0 b/nc_test4/Make0
index 7f4732b..d437579 100644
--- a/nc_test4/Make0
+++ b/nc_test4/Make0
@@ -1,31 +1,33 @@
 # Test c output
-T=tst_mode
+T=tst_chunk_hdf4
 #CMD=valgrind --leak-check=full
 CMD=gdb --args
 
-PAR=1
+#PAR=1
 
-CFLAGS=-g -O0 -I.. -I../include
+CFLAGS=-Wall -Wno-unused-variable -Wno-unused-function -g -O0 -I.. -I../include
 
 ifdef PAR
 CC=mpicc
 #CC=/usr/local/bin/mpicc
-LDFLAGS=-L/usr/local/lib -lhdf5_hl -lhdf5 -lz  ../liblib/.libs/libnetcdf.a -ldl -lcurl -lpnetcdf -lmpich -lm
+LDFLAGS=../liblib/.libs/libnetcdf.a -L/usr/local/lib -lhdf5_hl -lhdf5 -lz  -ldl -lcurl -lpnetcdf -lmpich -lm
 else
 CC=gcc
 #LDFLAGS=../liblib/.libs/libnetcdf.a  -L/usr/local/lib -lhdf5_hl -lhdf5 -lz -lm -lcurl
-LDFLAGS=-L/usr/local/lib -lhdf5_hl -lhdf5 -lz  ../liblib/.libs/libnetcdf.a -ldl -lm -lcurl
+LDFLAGS=../liblib/.libs/libnetcdf.a -L/usr/local/lib -lhdf5_hl -lhdf5 -lz  -ldl -lm -lcurl
 endif
 
 #	cd .. ; ${MAKE} all
 
 LLP=/usr/local/lib:${LD_LIBRARY_PATH}
 
-all::
-	echo ${LD_RUN_PATH}
+all:: cmp
 	export LD_LIBRARY_PATH=${LLP}; export CFLAGS; export LDFLAGS; \
-	${CC} -o t ${CFLAGS} ${T}.c ${LDFLAGS}; \
 	${CMD} ./t
 
+cmp::
+	export LD_LIBRARY_PATH=${LLP}; export CFLAGS; export LDFLAGS; \
+	${CC} -o t ${CFLAGS} ${T}.c ${SRC} ${LDFLAGS}; \
+
 cpp::
 	${CC} -E ${CFLAGS} ${T}.c > ${T}.txt
diff --git a/nc_test4/Makefile.in b/nc_test4/Makefile.in
index c227f06..358f21b 100644
--- a/nc_test4/Makefile.in
+++ b/nc_test4/Makefile.in
@@ -642,168 +642,6 @@ am__tty_colors = { \
     std=''; \
   fi; \
 }
-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 = f=`echo $$p | sed -e 's|^.*/||'`;
-am__install_max = 40
-am__nobase_strip_setup = \
-  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
-am__nobase_strip = \
-  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
-am__nobase_list = $(am__nobase_strip_setup); \
-  for p in $$list; do echo "$$p $$p"; done | \
-  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
-  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
-    if (++n[$$2] == $(am__install_max)) \
-      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
-    END { for (dir in files) print dir, files[dir] }'
-am__base_list = \
-  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
-  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-am__uninstall_files_from_dir = { \
-  test -z "$$files" \
-    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
-    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
-         $(am__cd) "$$dir" && rm -f $$files; }; \
-  }
-am__recheck_rx = ^[ 	]*:recheck:[ 	]*
-am__global_test_result_rx = ^[ 	]*:global-test-result:[ 	]*
-am__copy_in_global_log_rx = ^[ 	]*:copy-in-global-log:[ 	]*
-# A command that, given a newline-separated list of test names on the
-# standard input, print the name of the tests that are to be re-run
-# upon "make recheck".
-am__list_recheck_tests = $(AWK) '{ \
-  recheck = 1; \
-  while ((rc = (getline line < ($$0 ".trs"))) != 0) \
-    { \
-      if (rc < 0) \
-        { \
-          if ((getline line2 < ($$0 ".log")) < 0) \
-	    recheck = 0; \
-          break; \
-        } \
-      else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
-        { \
-          recheck = 0; \
-          break; \
-        } \
-      else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
-        { \
-          break; \
-        } \
-    }; \
-  if (recheck) \
-    print $$0; \
-  close ($$0 ".trs"); \
-  close ($$0 ".log"); \
-}'
-# A command that, given a newline-separated list of test names on the
-# standard input, create the global log from their .trs and .log files.
-am__create_global_log = $(AWK) ' \
-function fatal(msg) \
-{ \
-  print "fatal: making $@: " msg | "cat >&2"; \
-  exit 1; \
-} \
-function rst_section(header) \
-{ \
-  print header; \
-  len = length(header); \
-  for (i = 1; i <= len; i = i + 1) \
-    printf "="; \
-  printf "\n\n"; \
-} \
-{ \
-  copy_in_global_log = 1; \
-  global_test_result = "RUN"; \
-  while ((rc = (getline line < ($$0 ".trs"))) != 0) \
-    { \
-      if (rc < 0) \
-         fatal("failed to read from " $$0 ".trs"); \
-      if (line ~ /$(am__global_test_result_rx)/) \
-        { \
-          sub("$(am__global_test_result_rx)", "", line); \
-          sub("[ 	]*$$", "", line); \
-          global_test_result = line; \
-        } \
-      else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
-        copy_in_global_log = 0; \
-    }; \
-  if (copy_in_global_log) \
-    { \
-      rst_section(global_test_result ": " $$0); \
-      while ((rc = (getline line < ($$0 ".log"))) != 0) \
-      { \
-        if (rc < 0) \
-          fatal("failed to read from " $$0 ".log"); \
-        print line; \
-      }; \
-      printf "\n"; \
-    }; \
-  close ($$0 ".trs"); \
-  close ($$0 ".log"); \
-}'
-# Restructured Text title.
-am__rst_title = { sed 's/.*/   &   /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
-# Solaris 10 'make', and several other traditional 'make' implementations,
-# pass "-e" to $(SHELL), and POSIX 2008 even requires this.  Work around it
-# by disabling -e (using the XSI extension "set +e") if it's set.
-am__sh_e_setup = case $$- in *e*) set +e;; esac
-# Default flags passed to test drivers.
-am__common_driver_flags = \
-  --color-tests "$$am__color_tests" \
-  --enable-hard-errors "$$am__enable_hard_errors" \
-  --expect-failure "$$am__expect_failure"
-# To be inserted before the command running the test.  Creates the
-# directory for the log if needed.  Stores in $dir the directory
-# containing $f, in $tst the test, in $log the log.  Executes the
-# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
-# passes TESTS_ENVIRONMENT.  Set up options for the wrapper that
-# will run the test scripts (or their associated LOG_COMPILER, if
-# thy have one).
-am__check_pre = \
-$(am__sh_e_setup);					\
-$(am__vpath_adj_setup) $(am__vpath_adj)			\
-$(am__tty_colors);					\
-srcdir=$(srcdir); export srcdir;			\
-case "$@" in						\
-  */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;;	\
-    *) am__odir=.;; 					\
-esac;							\
-test "x$$am__odir" = x"." || test -d "$$am__odir" 	\
-  || $(MKDIR_P) "$$am__odir" || exit $$?;		\
-if test -f "./$$f"; then dir=./;			\
-elif test -f "$$f"; then dir=;				\
-else dir="$(srcdir)/"; fi;				\
-tst=$$dir$$f; log='$@'; 				\
-if test -n '$(DISABLE_HARD_ERRORS)'; then		\
-  am__enable_hard_errors=no; 				\
-else							\
-  am__enable_hard_errors=yes; 				\
-fi; 							\
-case " $(XFAIL_TESTS) " in				\
-  *[\ \	]$$f[\ \	]* | *[\ \	]$$dir$$f[\ \	]*) \
-    am__expect_failure=yes;;				\
-  *)							\
-    am__expect_failure=no;;				\
-esac; 							\
-$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
-# A shell command to get the names of the tests scripts with any registered
-# extension removed (i.e., equivalently, the names of the test logs, with
-# the '.log' extension removed).  The result is saved in the shell variable
-# '$bases'.  This honors runtime overriding of TESTS and TEST_LOGS.  Sadly,
-# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
-# since that might cause problem with VPATH rewrites for suffix-less tests.
-# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
-am__set_TESTS_bases = \
-  bases='$(TEST_LOGS)'; \
-  bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
-  bases=`echo $$bases`
-RECHECK_LOGS = $(TEST_LOGS)
-AM_RECURSIVE_TARGETS = check recheck
 @BUILD_BENCHMARKS_TRUE at am__EXEEXT_9 = tst_ar4_3d$(EXEEXT) \
 @BUILD_BENCHMARKS_TRUE@	tst_create_files$(EXEEXT) \
 @BUILD_BENCHMARKS_TRUE@	run_bm_test1.sh run_bm_elena.sh \
@@ -817,30 +655,9 @@ AM_RECURSIVE_TARGETS = check recheck
 @USE_HDF4_TRUE@	tst_h4_lendian$(EXEEXT)
 @USE_HDF4_FILE_TESTS_TRUE@@USE_HDF4_TRUE at am__EXEEXT_11 = run_get_hdf4_files.sh \
 @USE_HDF4_FILE_TESTS_TRUE@@USE_HDF4_TRUE@	tst_interops3$(EXEEXT)
-TEST_SUITE_LOG = test-suite.log
-TEST_EXTENSIONS = @EXEEXT@ .test
-LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
-LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS)
-am__set_b = \
-  case '$@' in \
-    */*) \
-      case '$*' in \
-        */*) b='$*';; \
-          *) b=`echo '$@' | sed 's/\.log$$//'`; \
-       esac;; \
-    *) \
-      b='$*';; \
-  esac
-am__test_logs1 = $(TESTS:=.log)
-am__test_logs2 = $(am__test_logs1:@EXEEXT at .log=.log)
-TEST_LOGS = $(am__test_logs2:.test.log=.log)
-TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
-TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
-	$(TEST_LOG_FLAGS)
 am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/ref_hdf5_compat1.nc \
 	$(srcdir)/ref_hdf5_compat2.nc $(srcdir)/ref_hdf5_compat3.nc \
-	$(top_srcdir)/depcomp $(top_srcdir)/lib_flags.am \
-	$(top_srcdir)/test-driver
+	$(top_srcdir)/depcomp $(top_srcdir)/lib_flags.am
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
@@ -1076,7 +893,7 @@ tst_atts_string_rewrite.nc tst_empty_vlen_unlim.nc tst_empty_vlen_lim.nc
 all: all-am
 
 .SUFFIXES:
-.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs
+.SUFFIXES: .c .lo .o .obj
 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/lib_flags.am $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
@@ -1642,756 +1459,98 @@ cscopelist-am: $(am__tagged_files)
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
-# Recover from deleted '.trs' file; this should ensure that
-# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
-# both 'foo.log' and 'foo.trs'.  Break the recipe in two subshells
-# to avoid problems with "make -n".
-.log.trs:
-	rm -f $< $@
-	$(MAKE) $(AM_MAKEFLAGS) $<
-
-# Leading 'am--fnord' is there to ensure the list of targets does not
-# expand to empty, as could happen e.g. with make check TESTS=''.
-am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
-am--force-recheck:
-	@:
-
-$(TEST_SUITE_LOG): $(TEST_LOGS)
-	@$(am__set_TESTS_bases); \
-	am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
-	redo_bases=`for i in $$bases; do \
-	              am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
-	            done`; \
-	if test -n "$$redo_bases"; then \
-	  redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
-	  redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
-	  if $(am__make_dryrun); then :; else \
-	    rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
-	  fi; \
-	fi; \
-	if test -n "$$am__remaking_logs"; then \
-	  echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
-	       "recursion detected" >&2; \
-	elif test -n "$$redo_logs"; then \
-	  am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
-	fi; \
-	if $(am__make_dryrun); then :; else \
-	  st=0;  \
-	  errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
-	  for i in $$redo_bases; do \
-	    test -f $$i.trs && test -r $$i.trs \
-	      || { echo "$$errmsg $$i.trs" >&2; st=1; }; \
-	    test -f $$i.log && test -r $$i.log \
-	      || { echo "$$errmsg $$i.log" >&2; st=1; }; \
+check-TESTS: $(TESTS)
+	@failed=0; all=0; xfail=0; xpass=0; skip=0; \
+	srcdir=$(srcdir); export srcdir; \
+	list=' $(TESTS) '; \
+	$(am__tty_colors); \
+	if test -n "$$list"; then \
+	  for tst in $$list; do \
+	    if test -f ./$$tst; then dir=./; \
+	    elif test -f $$tst; then dir=; \
+	    else dir="$(srcdir)/"; fi; \
+	    if $(TESTS_ENVIRONMENT) $${dir}$$tst $(AM_TESTS_FD_REDIRECT); then \
+	      all=`expr $$all + 1`; \
+	      case " $(XFAIL_TESTS) " in \
+	      *[\ \	]$$tst[\ \	]*) \
+		xpass=`expr $$xpass + 1`; \
+		failed=`expr $$failed + 1`; \
+		col=$$red; res=XPASS; \
+	      ;; \
+	      *) \
+		col=$$grn; res=PASS; \
+	      ;; \
+	      esac; \
+	    elif test $$? -ne 77; then \
+	      all=`expr $$all + 1`; \
+	      case " $(XFAIL_TESTS) " in \
+	      *[\ \	]$$tst[\ \	]*) \
+		xfail=`expr $$xfail + 1`; \
+		col=$$lgn; res=XFAIL; \
+	      ;; \
+	      *) \
+		failed=`expr $$failed + 1`; \
+		col=$$red; res=FAIL; \
+	      ;; \
+	      esac; \
+	    else \
+	      skip=`expr $$skip + 1`; \
+	      col=$$blu; res=SKIP; \
+	    fi; \
+	    echo "$${col}$$res$${std}: $$tst"; \
 	  done; \
-	  test $$st -eq 0 || exit 1; \
-	fi
-	@$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
-	ws='[ 	]'; \
-	results=`for b in $$bases; do echo $$b.trs; done`; \
-	test -n "$$results" || results=/dev/null; \
-	all=`  grep "^$$ws*:test-result:"           $$results | wc -l`; \
-	pass=` grep "^$$ws*:test-result:$$ws*PASS"  $$results | wc -l`; \
-	fail=` grep "^$$ws*:test-result:$$ws*FAIL"  $$results | wc -l`; \
-	skip=` grep "^$$ws*:test-result:$$ws*SKIP"  $$results | wc -l`; \
-	xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
-	xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
-	error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
-	if test `expr $$fail + $$xpass + $$error` -eq 0; then \
-	  success=true; \
-	else \
-	  success=false; \
-	fi; \
-	br='==================='; br=$$br$$br$$br$$br; \
-	result_count () \
-	{ \
-	    if test x"$$1" = x"--maybe-color"; then \
-	      maybe_colorize=yes; \
-	    elif test x"$$1" = x"--no-color"; then \
-	      maybe_colorize=no; \
+	  if test "$$all" -eq 1; then \
+	    tests="test"; \
+	    All=""; \
+	  else \
+	    tests="tests"; \
+	    All="All "; \
+	  fi; \
+	  if test "$$failed" -eq 0; then \
+	    if test "$$xfail" -eq 0; then \
+	      banner="$$All$$all $$tests passed"; \
 	    else \
-	      echo "$@: invalid 'result_count' usage" >&2; exit 4; \
+	      if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
+	      banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
 	    fi; \
-	    shift; \
-	    desc=$$1 count=$$2; \
-	    if test $$maybe_colorize = yes && test $$count -gt 0; then \
-	      color_start=$$3 color_end=$$std; \
+	  else \
+	    if test "$$xpass" -eq 0; then \
+	      banner="$$failed of $$all $$tests failed"; \
+	    else \
+	      if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
+	      banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
+	    fi; \
+	  fi; \
+	  dashes="$$banner"; \
+	  skipped=""; \
+	  if test "$$skip" -ne 0; then \
+	    if test "$$skip" -eq 1; then \
+	      skipped="($$skip test was not run)"; \
 	    else \
-	      color_start= color_end=; \
+	      skipped="($$skip tests were not run)"; \
 	    fi; \
-	    echo "$${color_start}# $$desc $$count$${color_end}"; \
-	}; \
-	create_testsuite_report () \
-	{ \
-	  result_count $$1 "TOTAL:" $$all   "$$brg"; \
-	  result_count $$1 "PASS: " $$pass  "$$grn"; \
-	  result_count $$1 "SKIP: " $$skip  "$$blu"; \
-	  result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
-	  result_count $$1 "FAIL: " $$fail  "$$red"; \
-	  result_count $$1 "XPASS:" $$xpass "$$red"; \
-	  result_count $$1 "ERROR:" $$error "$$mgn"; \
-	}; \
-	{								\
-	  echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" |	\
-	    $(am__rst_title);						\
-	  create_testsuite_report --no-color;				\
-	  echo;								\
-	  echo ".. contents:: :depth: 2";				\
-	  echo;								\
-	  for b in $$bases; do echo $$b; done				\
-	    | $(am__create_global_log);					\
-	} >$(TEST_SUITE_LOG).tmp || exit 1;				\
-	mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG);			\
-	if $$success; then						\
-	  col="$$grn";							\
-	 else								\
-	  col="$$red";							\
-	  test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG);		\
-	fi;								\
-	echo "$${col}$$br$${std}"; 					\
-	echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}";	\
-	echo "$${col}$$br$${std}"; 					\
-	create_testsuite_report --maybe-color;				\
-	echo "$$col$$br$$std";						\
-	if $$success; then :; else					\
-	  echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}";		\
-	  if test -n "$(PACKAGE_BUGREPORT)"; then			\
-	    echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}";	\
-	  fi;								\
-	  echo "$$col$$br$$std";					\
-	fi;								\
-	$$success || exit 1
-
-check-TESTS:
-	@list='$(RECHECK_LOGS)';           test -z "$$list" || rm -f $$list
-	@list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
-	@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
-	@set +e; $(am__set_TESTS_bases); \
-	log_list=`for i in $$bases; do echo $$i.log; done`; \
-	trs_list=`for i in $$bases; do echo $$i.trs; done`; \
-	log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
-	$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
-	exit $$?;
-recheck: all $(check_PROGRAMS)
-	@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
-	@set +e; $(am__set_TESTS_bases); \
-	bases=`for i in $$bases; do echo $$i; done \
-	         | $(am__list_recheck_tests)` || exit 1; \
-	log_list=`for i in $$bases; do echo $$i.log; done`; \
-	log_list=`echo $$log_list`; \
-	$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
-	        am__force_recheck=am--force-recheck \
-	        TEST_LOGS="$$log_list"; \
-	exit $$?
-tst_dims.log: tst_dims$(EXEEXT)
-	@p='tst_dims$(EXEEXT)'; \
-	b='tst_dims'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_dims2.log: tst_dims2$(EXEEXT)
-	@p='tst_dims2$(EXEEXT)'; \
-	b='tst_dims2'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_dims3.log: tst_dims3$(EXEEXT)
-	@p='tst_dims3$(EXEEXT)'; \
-	b='tst_dims3'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_files.log: tst_files$(EXEEXT)
-	@p='tst_files$(EXEEXT)'; \
-	b='tst_files'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_files4.log: tst_files4$(EXEEXT)
-	@p='tst_files4$(EXEEXT)'; \
-	b='tst_files4'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_vars.log: tst_vars$(EXEEXT)
-	@p='tst_vars$(EXEEXT)'; \
-	b='tst_vars'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_varms.log: tst_varms$(EXEEXT)
-	@p='tst_varms$(EXEEXT)'; \
-	b='tst_varms'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_unlim_vars.log: tst_unlim_vars$(EXEEXT)
-	@p='tst_unlim_vars$(EXEEXT)'; \
-	b='tst_unlim_vars'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_converts.log: tst_converts$(EXEEXT)
-	@p='tst_converts$(EXEEXT)'; \
-	b='tst_converts'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_converts2.log: tst_converts2$(EXEEXT)
-	@p='tst_converts2$(EXEEXT)'; \
-	b='tst_converts2'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_grps.log: tst_grps$(EXEEXT)
-	@p='tst_grps$(EXEEXT)'; \
-	b='tst_grps'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_grps2.log: tst_grps2$(EXEEXT)
-	@p='tst_grps2$(EXEEXT)'; \
-	b='tst_grps2'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_compounds.log: tst_compounds$(EXEEXT)
-	@p='tst_compounds$(EXEEXT)'; \
-	b='tst_compounds'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_compounds2.log: tst_compounds2$(EXEEXT)
-	@p='tst_compounds2$(EXEEXT)'; \
-	b='tst_compounds2'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_compounds3.log: tst_compounds3$(EXEEXT)
-	@p='tst_compounds3$(EXEEXT)'; \
-	b='tst_compounds3'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_opaques.log: tst_opaques$(EXEEXT)
-	@p='tst_opaques$(EXEEXT)'; \
-	b='tst_opaques'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_strings.log: tst_strings$(EXEEXT)
-	@p='tst_strings$(EXEEXT)'; \
-	b='tst_strings'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_strings2.log: tst_strings2$(EXEEXT)
-	@p='tst_strings2$(EXEEXT)'; \
-	b='tst_strings2'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_interops.log: tst_interops$(EXEEXT)
-	@p='tst_interops$(EXEEXT)'; \
-	b='tst_interops'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_interops4.log: tst_interops4$(EXEEXT)
-	@p='tst_interops4$(EXEEXT)'; \
-	b='tst_interops4'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_interops5.log: tst_interops5$(EXEEXT)
-	@p='tst_interops5$(EXEEXT)'; \
-	b='tst_interops5'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_interops6.log: tst_interops6$(EXEEXT)
-	@p='tst_interops6$(EXEEXT)'; \
-	b='tst_interops6'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_enums.log: tst_enums$(EXEEXT)
-	@p='tst_enums$(EXEEXT)'; \
-	b='tst_enums'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_coords.log: tst_coords$(EXEEXT)
-	@p='tst_coords$(EXEEXT)'; \
-	b='tst_coords'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_coords2.log: tst_coords2$(EXEEXT)
-	@p='tst_coords2$(EXEEXT)'; \
-	b='tst_coords2'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_coords3.log: tst_coords3$(EXEEXT)
-	@p='tst_coords3$(EXEEXT)'; \
-	b='tst_coords3'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_vars3.log: tst_vars3$(EXEEXT)
-	@p='tst_vars3$(EXEEXT)'; \
-	b='tst_vars3'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_vars4.log: tst_vars4$(EXEEXT)
-	@p='tst_vars4$(EXEEXT)'; \
-	b='tst_vars4'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_chunks.log: tst_chunks$(EXEEXT)
-	@p='tst_chunks$(EXEEXT)'; \
-	b='tst_chunks'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_chunks2.log: tst_chunks2$(EXEEXT)
-	@p='tst_chunks2$(EXEEXT)'; \
-	b='tst_chunks2'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_utf8.log: tst_utf8$(EXEEXT)
-	@p='tst_utf8$(EXEEXT)'; \
-	b='tst_utf8'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_fills.log: tst_fills$(EXEEXT)
-	@p='tst_fills$(EXEEXT)'; \
-	b='tst_fills'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_fills2.log: tst_fills2$(EXEEXT)
-	@p='tst_fills2$(EXEEXT)'; \
-	b='tst_fills2'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_fillbug.log: tst_fillbug$(EXEEXT)
-	@p='tst_fillbug$(EXEEXT)'; \
-	b='tst_fillbug'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_xplatform.log: tst_xplatform$(EXEEXT)
-	@p='tst_xplatform$(EXEEXT)'; \
-	b='tst_xplatform'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_xplatform2.log: tst_xplatform2$(EXEEXT)
-	@p='tst_xplatform2$(EXEEXT)'; \
-	b='tst_xplatform2'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_h_atts2.log: tst_h_atts2$(EXEEXT)
-	@p='tst_h_atts2$(EXEEXT)'; \
-	b='tst_h_atts2'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_endian_fill.log: tst_endian_fill$(EXEEXT)
-	@p='tst_endian_fill$(EXEEXT)'; \
-	b='tst_endian_fill'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_atts.log: tst_atts$(EXEEXT)
-	@p='tst_atts$(EXEEXT)'; \
-	b='tst_atts'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-t_type.log: t_type$(EXEEXT)
-	@p='t_type$(EXEEXT)'; \
-	b='t_type'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-cdm_sea_soundings.log: cdm_sea_soundings$(EXEEXT)
-	@p='cdm_sea_soundings$(EXEEXT)'; \
-	b='cdm_sea_soundings'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_camrun.log: tst_camrun$(EXEEXT)
-	@p='tst_camrun$(EXEEXT)'; \
-	b='tst_camrun'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_vl.log: tst_vl$(EXEEXT)
-	@p='tst_vl$(EXEEXT)'; \
-	b='tst_vl'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_atts1.log: tst_atts1$(EXEEXT)
-	@p='tst_atts1$(EXEEXT)'; \
-	b='tst_atts1'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_atts2.log: tst_atts2$(EXEEXT)
-	@p='tst_atts2$(EXEEXT)'; \
-	b='tst_atts2'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_vars2.log: tst_vars2$(EXEEXT)
-	@p='tst_vars2$(EXEEXT)'; \
-	b='tst_vars2'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_files5.log: tst_files5$(EXEEXT)
-	@p='tst_files5$(EXEEXT)'; \
-	b='tst_files5'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_files6.log: tst_files6$(EXEEXT)
-	@p='tst_files6$(EXEEXT)'; \
-	b='tst_files6'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_sync.log: tst_sync$(EXEEXT)
-	@p='tst_sync$(EXEEXT)'; \
-	b='tst_sync'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_h_strbug.log: tst_h_strbug$(EXEEXT)
-	@p='tst_h_strbug$(EXEEXT)'; \
-	b='tst_h_strbug'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_h_refs.log: tst_h_refs$(EXEEXT)
-	@p='tst_h_refs$(EXEEXT)'; \
-	b='tst_h_refs'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_h_scalar.log: tst_h_scalar$(EXEEXT)
-	@p='tst_h_scalar$(EXEEXT)'; \
-	b='tst_h_scalar'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_rename.log: tst_rename$(EXEEXT)
-	@p='tst_rename$(EXEEXT)'; \
-	b='tst_rename'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_h5_endians.log: tst_h5_endians$(EXEEXT)
-	@p='tst_h5_endians$(EXEEXT)'; \
-	b='tst_h5_endians'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_atts_string_rewrite.log: tst_atts_string_rewrite$(EXEEXT)
-	@p='tst_atts_string_rewrite$(EXEEXT)'; \
-	b='tst_atts_string_rewrite'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_hdf5_file_compat.log: tst_hdf5_file_compat$(EXEEXT)
-	@p='tst_hdf5_file_compat$(EXEEXT)'; \
-	b='tst_hdf5_file_compat'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-run_grp_rename.sh.log: run_grp_rename.sh
-	@p='run_grp_rename.sh'; \
-	b='run_grp_rename.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-run_empty_vlen_test.sh.log: run_empty_vlen_test.sh
-	@p='run_empty_vlen_test.sh'; \
-	b='run_empty_vlen_test.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_v2.log: tst_v2$(EXEEXT)
-	@p='tst_v2$(EXEEXT)'; \
-	b='tst_v2'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_large.log: tst_large$(EXEEXT)
-	@p='tst_large$(EXEEXT)'; \
-	b='tst_large'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_ar4_3d.log: tst_ar4_3d$(EXEEXT)
-	@p='tst_ar4_3d$(EXEEXT)'; \
-	b='tst_ar4_3d'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_create_files.log: tst_create_files$(EXEEXT)
-	@p='tst_create_files$(EXEEXT)'; \
-	b='tst_create_files'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-run_bm_test1.sh.log: run_bm_test1.sh
-	@p='run_bm_test1.sh'; \
-	b='run_bm_test1.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-run_bm_elena.sh.log: run_bm_elena.sh
-	@p='run_bm_elena.sh'; \
-	b='run_bm_elena.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-run_bm_test2.sh.log: run_bm_test2.sh
-	@p='run_bm_test2.sh'; \
-	b='run_bm_test2.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-run_tst_chunks.sh.log: run_tst_chunks.sh
-	@p='run_tst_chunks.sh'; \
-	b='run_tst_chunks.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-run_bm_ar4.sh.log: run_bm_ar4.sh
-	@p='run_bm_ar4.sh'; \
-	b='run_bm_ar4.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_files2.log: tst_files2$(EXEEXT)
-	@p='tst_files2$(EXEEXT)'; \
-	b='tst_files2'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_files3.log: tst_files3$(EXEEXT)
-	@p='tst_files3$(EXEEXT)'; \
-	b='tst_files3'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_ar5.log: tst_ar5$(EXEEXT)
-	@p='tst_ar5$(EXEEXT)'; \
-	b='tst_ar5'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_h_files3.log: tst_h_files3$(EXEEXT)
-	@p='tst_h_files3$(EXEEXT)'; \
-	b='tst_h_files3'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_mem.log: tst_mem$(EXEEXT)
-	@p='tst_mem$(EXEEXT)'; \
-	b='tst_mem'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-run_get_knmi_files.sh.log: run_get_knmi_files.sh
-	@p='run_get_knmi_files.sh'; \
-	b='run_get_knmi_files.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_knmi.log: tst_knmi$(EXEEXT)
-	@p='tst_knmi$(EXEEXT)'; \
-	b='tst_knmi'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-run_par_bm_test.sh.log: run_par_bm_test.sh
-	@p='run_par_bm_test.sh'; \
-	b='run_par_bm_test.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_interops2.log: tst_interops2$(EXEEXT)
-	@p='tst_interops2$(EXEEXT)'; \
-	b='tst_interops2'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_formatx_hdf4.sh.log: tst_formatx_hdf4.sh
-	@p='tst_formatx_hdf4.sh'; \
-	b='tst_formatx_hdf4.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-run_chunk_hdf4.sh.log: run_chunk_hdf4.sh
-	@p='run_chunk_hdf4.sh'; \
-	b='run_chunk_hdf4.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_h4_lendian.log: tst_h4_lendian$(EXEEXT)
-	@p='tst_h4_lendian$(EXEEXT)'; \
-	b='tst_h4_lendian'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-run_get_hdf4_files.sh.log: run_get_hdf4_files.sh
-	@p='run_get_hdf4_files.sh'; \
-	b='run_get_hdf4_files.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_interops3.log: tst_interops3$(EXEEXT)
-	@p='tst_interops3$(EXEEXT)'; \
-	b='tst_interops3'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-run_valgrind_tests.sh.log: run_valgrind_tests.sh
-	@p='run_valgrind_tests.sh'; \
-	b='run_valgrind_tests.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-run_valgrind_tests2.sh.log: run_valgrind_tests2.sh
-	@p='run_valgrind_tests2.sh'; \
-	b='run_valgrind_tests2.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-run_hdf4_valgrind_tests.sh.log: run_hdf4_valgrind_tests.sh
-	@p='run_hdf4_valgrind_tests.sh'; \
-	b='run_hdf4_valgrind_tests.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-run_par_test.sh.log: run_par_test.sh
-	@p='run_par_test.sh'; \
-	b='run_par_test.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-.test.log:
-	@p='$<'; \
-	$(am__set_b); \
-	$(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
- at am__EXEEXT_TRUE@.test$(EXEEXT).log:
- at am__EXEEXT_TRUE@	@p='$<'; \
- at am__EXEEXT_TRUE@	$(am__set_b); \
- at am__EXEEXT_TRUE@	$(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
- at am__EXEEXT_TRUE@	--log-file $$b.log --trs-file $$b.trs \
- at am__EXEEXT_TRUE@	$(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
- at am__EXEEXT_TRUE@	"$$tst" $(AM_TESTS_FD_REDIRECT)
+	    test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
+	      dashes="$$skipped"; \
+	  fi; \
+	  report=""; \
+	  if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
+	    report="Please report to $(PACKAGE_BUGREPORT)"; \
+	    test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
+	      dashes="$$report"; \
+	  fi; \
+	  dashes=`echo "$$dashes" | sed s/./=/g`; \
+	  if test "$$failed" -eq 0; then \
+	    col="$$grn"; \
+	  else \
+	    col="$$red"; \
+	  fi; \
+	  echo "$${col}$$dashes$${std}"; \
+	  echo "$${col}$$banner$${std}"; \
+	  test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \
+	  test -z "$$report" || echo "$${col}$$report$${std}"; \
+	  echo "$${col}$$dashes$${std}"; \
+	  test "$$failed" -eq 0; \
+	else :; fi
 
 distdir: $(DISTFILES)
 	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@@ -2449,9 +1608,6 @@ install-strip:
 	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
 	fi
 mostlyclean-generic:
-	-test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
-	-test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
-	-test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
 
 clean-generic:
 	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
@@ -2549,7 +1705,7 @@ uninstall-am:
 	installcheck-am installdirs maintainer-clean \
 	maintainer-clean-generic mostlyclean mostlyclean-compile \
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-	recheck tags tags-am uninstall uninstall-am
+	tags tags-am uninstall uninstall-am
 
 .PRECIOUS: Makefile
 
diff --git a/nc_test4/run_empty_vlen_test.sh b/nc_test4/run_empty_vlen_test.sh
index adddd29..57a1405 100755
--- a/nc_test4/run_empty_vlen_test.sh
+++ b/nc_test4/run_empty_vlen_test.sh
@@ -23,12 +23,15 @@ echo "* Testing Empty Ragged Arrays (VLEN)"
 echo "Generating test netcdf files."
 ./tst_empty_vlen_unlim
 
-echo "Validating Files with ncdump."
-echo "======================================"
-../ncdump/ncdump -s tst_empty_vlen_unlim.nc
-echo "---------------------------------------"
-../ncdump/ncdump -s tst_empty_vlen_lim.nc
-echo "======================================"
+# Since no comparison is made, I am not sure 
+# if this is useful.
+#echo "Validating Files with ncdump."
+#echo "======================================"
+#../ncdump/ncdump -s tst_empty_vlen_unlim.nc
+#echo "---------------------------------------"
+#../ncdump/ncdump -s tst_empty_vlen_lim.nc
+#echo "======================================"
+
 
 echo "* Tests Passed."
 exit 0
diff --git a/ncdap_test/Makefile.in b/ncdap_test/Makefile.in
index a7b412c..cf4855f 100644
--- a/ncdap_test/Makefile.in
+++ b/ncdap_test/Makefile.in
@@ -257,7 +257,7 @@ am__recursive_targets = \
   $(RECURSIVE_CLEAN_TARGETS) \
   $(am__extra_recursive_targets)
 AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
-	check recheck distdir
+	distdir
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
 # Read a list of newline-separated strings from the standard input,
 # and print each of them once, without duplicates.  Input order is
@@ -299,196 +299,15 @@ am__tty_colors = { \
     std=''; \
   fi; \
 }
-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 = f=`echo $$p | sed -e 's|^.*/||'`;
-am__install_max = 40
-am__nobase_strip_setup = \
-  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
-am__nobase_strip = \
-  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
-am__nobase_list = $(am__nobase_strip_setup); \
-  for p in $$list; do echo "$$p $$p"; done | \
-  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
-  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
-    if (++n[$$2] == $(am__install_max)) \
-      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
-    END { for (dir in files) print dir, files[dir] }'
-am__base_list = \
-  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
-  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-am__uninstall_files_from_dir = { \
-  test -z "$$files" \
-    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
-    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
-         $(am__cd) "$$dir" && rm -f $$files; }; \
-  }
-am__recheck_rx = ^[ 	]*:recheck:[ 	]*
-am__global_test_result_rx = ^[ 	]*:global-test-result:[ 	]*
-am__copy_in_global_log_rx = ^[ 	]*:copy-in-global-log:[ 	]*
-# A command that, given a newline-separated list of test names on the
-# standard input, print the name of the tests that are to be re-run
-# upon "make recheck".
-am__list_recheck_tests = $(AWK) '{ \
-  recheck = 1; \
-  while ((rc = (getline line < ($$0 ".trs"))) != 0) \
-    { \
-      if (rc < 0) \
-        { \
-          if ((getline line2 < ($$0 ".log")) < 0) \
-	    recheck = 0; \
-          break; \
-        } \
-      else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
-        { \
-          recheck = 0; \
-          break; \
-        } \
-      else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
-        { \
-          break; \
-        } \
-    }; \
-  if (recheck) \
-    print $$0; \
-  close ($$0 ".trs"); \
-  close ($$0 ".log"); \
-}'
-# A command that, given a newline-separated list of test names on the
-# standard input, create the global log from their .trs and .log files.
-am__create_global_log = $(AWK) ' \
-function fatal(msg) \
-{ \
-  print "fatal: making $@: " msg | "cat >&2"; \
-  exit 1; \
-} \
-function rst_section(header) \
-{ \
-  print header; \
-  len = length(header); \
-  for (i = 1; i <= len; i = i + 1) \
-    printf "="; \
-  printf "\n\n"; \
-} \
-{ \
-  copy_in_global_log = 1; \
-  global_test_result = "RUN"; \
-  while ((rc = (getline line < ($$0 ".trs"))) != 0) \
-    { \
-      if (rc < 0) \
-         fatal("failed to read from " $$0 ".trs"); \
-      if (line ~ /$(am__global_test_result_rx)/) \
-        { \
-          sub("$(am__global_test_result_rx)", "", line); \
-          sub("[ 	]*$$", "", line); \
-          global_test_result = line; \
-        } \
-      else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
-        copy_in_global_log = 0; \
-    }; \
-  if (copy_in_global_log) \
-    { \
-      rst_section(global_test_result ": " $$0); \
-      while ((rc = (getline line < ($$0 ".log"))) != 0) \
-      { \
-        if (rc < 0) \
-          fatal("failed to read from " $$0 ".log"); \
-        print line; \
-      }; \
-      printf "\n"; \
-    }; \
-  close ($$0 ".trs"); \
-  close ($$0 ".log"); \
-}'
-# Restructured Text title.
-am__rst_title = { sed 's/.*/   &   /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
-# Solaris 10 'make', and several other traditional 'make' implementations,
-# pass "-e" to $(SHELL), and POSIX 2008 even requires this.  Work around it
-# by disabling -e (using the XSI extension "set +e") if it's set.
-am__sh_e_setup = case $$- in *e*) set +e;; esac
-# Default flags passed to test drivers.
-am__common_driver_flags = \
-  --color-tests "$$am__color_tests" \
-  --enable-hard-errors "$$am__enable_hard_errors" \
-  --expect-failure "$$am__expect_failure"
-# To be inserted before the command running the test.  Creates the
-# directory for the log if needed.  Stores in $dir the directory
-# containing $f, in $tst the test, in $log the log.  Executes the
-# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
-# passes TESTS_ENVIRONMENT.  Set up options for the wrapper that
-# will run the test scripts (or their associated LOG_COMPILER, if
-# thy have one).
-am__check_pre = \
-$(am__sh_e_setup);					\
-$(am__vpath_adj_setup) $(am__vpath_adj)			\
-$(am__tty_colors);					\
-srcdir=$(srcdir); export srcdir;			\
-case "$@" in						\
-  */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;;	\
-    *) am__odir=.;; 					\
-esac;							\
-test "x$$am__odir" = x"." || test -d "$$am__odir" 	\
-  || $(MKDIR_P) "$$am__odir" || exit $$?;		\
-if test -f "./$$f"; then dir=./;			\
-elif test -f "$$f"; then dir=;				\
-else dir="$(srcdir)/"; fi;				\
-tst=$$dir$$f; log='$@'; 				\
-if test -n '$(DISABLE_HARD_ERRORS)'; then		\
-  am__enable_hard_errors=no; 				\
-else							\
-  am__enable_hard_errors=yes; 				\
-fi; 							\
-case " $(XFAIL_TESTS) " in				\
-  *[\ \	]$$f[\ \	]* | *[\ \	]$$dir$$f[\ \	]*) \
-    am__expect_failure=yes;;				\
-  *)							\
-    am__expect_failure=no;;				\
-esac; 							\
-$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
-# A shell command to get the names of the tests scripts with any registered
-# extension removed (i.e., equivalently, the names of the test logs, with
-# the '.log' extension removed).  The result is saved in the shell variable
-# '$bases'.  This honors runtime overriding of TESTS and TEST_LOGS.  Sadly,
-# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
-# since that might cause problem with VPATH rewrites for suffix-less tests.
-# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
-am__set_TESTS_bases = \
-  bases='$(TEST_LOGS)'; \
-  bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
-  bases=`echo $$bases`
-RECHECK_LOGS = $(TEST_LOGS)
 @ENABLE_DAP_REMOTE_TESTS_TRUE at am__EXEEXT_2 = tst_remote3.sh \
 @ENABLE_DAP_REMOTE_TESTS_TRUE@	tst_formatx.sh \
 @ENABLE_DAP_REMOTE_TESTS_TRUE@	test_partvar$(EXEEXT) testurl.sh
 @ENABLE_DAP_REMOTE_TESTS_TRUE at am__EXEEXT_3 = test_varm3$(EXEEXT) \
 @ENABLE_DAP_REMOTE_TESTS_TRUE@	test_nstride_cached$(EXEEXT) \
 @ENABLE_DAP_REMOTE_TESTS_TRUE@	t_misc$(EXEEXT)
-TEST_SUITE_LOG = test-suite.log
-TEST_EXTENSIONS = @EXEEXT@ .test
-LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
-LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS)
-am__set_b = \
-  case '$@' in \
-    */*) \
-      case '$*' in \
-        */*) b='$*';; \
-          *) b=`echo '$@' | sed 's/\.log$$//'`; \
-       esac;; \
-    *) \
-      b='$*';; \
-  esac
-am__test_logs1 = $(TESTS:=.log)
-am__test_logs2 = $(am__test_logs1:@EXEEXT at .log=.log)
-TEST_LOGS = $(am__test_logs2:.test.log=.log)
-TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
-TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
-	$(TEST_LOG_FLAGS)
 DIST_SUBDIRS = $(SUBDIRS)
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \
-	$(top_srcdir)/lib_flags.am $(top_srcdir)/test-driver
+	$(top_srcdir)/lib_flags.am
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 am__relativize = \
   dir0=`pwd`; \
@@ -736,7 +555,7 @@ all: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) all-recursive
 
 .SUFFIXES:
-.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs
+.SUFFIXES: .c .lo .o .obj
 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/lib_flags.am $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
@@ -958,252 +777,98 @@ cscopelist-am: $(am__tagged_files)
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
-# Recover from deleted '.trs' file; this should ensure that
-# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
-# both 'foo.log' and 'foo.trs'.  Break the recipe in two subshells
-# to avoid problems with "make -n".
-.log.trs:
-	rm -f $< $@
-	$(MAKE) $(AM_MAKEFLAGS) $<
-
-# Leading 'am--fnord' is there to ensure the list of targets does not
-# expand to empty, as could happen e.g. with make check TESTS=''.
-am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
-am--force-recheck:
-	@:
-
-$(TEST_SUITE_LOG): $(TEST_LOGS)
-	@$(am__set_TESTS_bases); \
-	am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
-	redo_bases=`for i in $$bases; do \
-	              am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
-	            done`; \
-	if test -n "$$redo_bases"; then \
-	  redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
-	  redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
-	  if $(am__make_dryrun); then :; else \
-	    rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
-	  fi; \
-	fi; \
-	if test -n "$$am__remaking_logs"; then \
-	  echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
-	       "recursion detected" >&2; \
-	elif test -n "$$redo_logs"; then \
-	  am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
-	fi; \
-	if $(am__make_dryrun); then :; else \
-	  st=0;  \
-	  errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
-	  for i in $$redo_bases; do \
-	    test -f $$i.trs && test -r $$i.trs \
-	      || { echo "$$errmsg $$i.trs" >&2; st=1; }; \
-	    test -f $$i.log && test -r $$i.log \
-	      || { echo "$$errmsg $$i.log" >&2; st=1; }; \
+check-TESTS: $(TESTS)
+	@failed=0; all=0; xfail=0; xpass=0; skip=0; \
+	srcdir=$(srcdir); export srcdir; \
+	list=' $(TESTS) '; \
+	$(am__tty_colors); \
+	if test -n "$$list"; then \
+	  for tst in $$list; do \
+	    if test -f ./$$tst; then dir=./; \
+	    elif test -f $$tst; then dir=; \
+	    else dir="$(srcdir)/"; fi; \
+	    if $(TESTS_ENVIRONMENT) $${dir}$$tst $(AM_TESTS_FD_REDIRECT); then \
+	      all=`expr $$all + 1`; \
+	      case " $(XFAIL_TESTS) " in \
+	      *[\ \	]$$tst[\ \	]*) \
+		xpass=`expr $$xpass + 1`; \
+		failed=`expr $$failed + 1`; \
+		col=$$red; res=XPASS; \
+	      ;; \
+	      *) \
+		col=$$grn; res=PASS; \
+	      ;; \
+	      esac; \
+	    elif test $$? -ne 77; then \
+	      all=`expr $$all + 1`; \
+	      case " $(XFAIL_TESTS) " in \
+	      *[\ \	]$$tst[\ \	]*) \
+		xfail=`expr $$xfail + 1`; \
+		col=$$lgn; res=XFAIL; \
+	      ;; \
+	      *) \
+		failed=`expr $$failed + 1`; \
+		col=$$red; res=FAIL; \
+	      ;; \
+	      esac; \
+	    else \
+	      skip=`expr $$skip + 1`; \
+	      col=$$blu; res=SKIP; \
+	    fi; \
+	    echo "$${col}$$res$${std}: $$tst"; \
 	  done; \
-	  test $$st -eq 0 || exit 1; \
-	fi
-	@$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
-	ws='[ 	]'; \
-	results=`for b in $$bases; do echo $$b.trs; done`; \
-	test -n "$$results" || results=/dev/null; \
-	all=`  grep "^$$ws*:test-result:"           $$results | wc -l`; \
-	pass=` grep "^$$ws*:test-result:$$ws*PASS"  $$results | wc -l`; \
-	fail=` grep "^$$ws*:test-result:$$ws*FAIL"  $$results | wc -l`; \
-	skip=` grep "^$$ws*:test-result:$$ws*SKIP"  $$results | wc -l`; \
-	xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
-	xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
-	error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
-	if test `expr $$fail + $$xpass + $$error` -eq 0; then \
-	  success=true; \
-	else \
-	  success=false; \
-	fi; \
-	br='==================='; br=$$br$$br$$br$$br; \
-	result_count () \
-	{ \
-	    if test x"$$1" = x"--maybe-color"; then \
-	      maybe_colorize=yes; \
-	    elif test x"$$1" = x"--no-color"; then \
-	      maybe_colorize=no; \
+	  if test "$$all" -eq 1; then \
+	    tests="test"; \
+	    All=""; \
+	  else \
+	    tests="tests"; \
+	    All="All "; \
+	  fi; \
+	  if test "$$failed" -eq 0; then \
+	    if test "$$xfail" -eq 0; then \
+	      banner="$$All$$all $$tests passed"; \
 	    else \
-	      echo "$@: invalid 'result_count' usage" >&2; exit 4; \
+	      if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
+	      banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
 	    fi; \
-	    shift; \
-	    desc=$$1 count=$$2; \
-	    if test $$maybe_colorize = yes && test $$count -gt 0; then \
-	      color_start=$$3 color_end=$$std; \
+	  else \
+	    if test "$$xpass" -eq 0; then \
+	      banner="$$failed of $$all $$tests failed"; \
+	    else \
+	      if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
+	      banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
+	    fi; \
+	  fi; \
+	  dashes="$$banner"; \
+	  skipped=""; \
+	  if test "$$skip" -ne 0; then \
+	    if test "$$skip" -eq 1; then \
+	      skipped="($$skip test was not run)"; \
 	    else \
-	      color_start= color_end=; \
+	      skipped="($$skip tests were not run)"; \
 	    fi; \
-	    echo "$${color_start}# $$desc $$count$${color_end}"; \
-	}; \
-	create_testsuite_report () \
-	{ \
-	  result_count $$1 "TOTAL:" $$all   "$$brg"; \
-	  result_count $$1 "PASS: " $$pass  "$$grn"; \
-	  result_count $$1 "SKIP: " $$skip  "$$blu"; \
-	  result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
-	  result_count $$1 "FAIL: " $$fail  "$$red"; \
-	  result_count $$1 "XPASS:" $$xpass "$$red"; \
-	  result_count $$1 "ERROR:" $$error "$$mgn"; \
-	}; \
-	{								\
-	  echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" |	\
-	    $(am__rst_title);						\
-	  create_testsuite_report --no-color;				\
-	  echo;								\
-	  echo ".. contents:: :depth: 2";				\
-	  echo;								\
-	  for b in $$bases; do echo $$b; done				\
-	    | $(am__create_global_log);					\
-	} >$(TEST_SUITE_LOG).tmp || exit 1;				\
-	mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG);			\
-	if $$success; then						\
-	  col="$$grn";							\
-	 else								\
-	  col="$$red";							\
-	  test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG);		\
-	fi;								\
-	echo "$${col}$$br$${std}"; 					\
-	echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}";	\
-	echo "$${col}$$br$${std}"; 					\
-	create_testsuite_report --maybe-color;				\
-	echo "$$col$$br$$std";						\
-	if $$success; then :; else					\
-	  echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}";		\
-	  if test -n "$(PACKAGE_BUGREPORT)"; then			\
-	    echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}";	\
-	  fi;								\
-	  echo "$$col$$br$$std";					\
-	fi;								\
-	$$success || exit 1
-
-check-TESTS:
-	@list='$(RECHECK_LOGS)';           test -z "$$list" || rm -f $$list
-	@list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
-	@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
-	@set +e; $(am__set_TESTS_bases); \
-	log_list=`for i in $$bases; do echo $$i.log; done`; \
-	trs_list=`for i in $$bases; do echo $$i.trs; done`; \
-	log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
-	$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
-	exit $$?;
-recheck: all $(check_PROGRAMS)
-	@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
-	@set +e; $(am__set_TESTS_bases); \
-	bases=`for i in $$bases; do echo $$i; done \
-	         | $(am__list_recheck_tests)` || exit 1; \
-	log_list=`for i in $$bases; do echo $$i.log; done`; \
-	log_list=`echo $$log_list`; \
-	$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
-	        am__force_recheck=am--force-recheck \
-	        TEST_LOGS="$$log_list"; \
-	exit $$?
-tst_ncdap3.sh.log: tst_ncdap3.sh
-	@p='tst_ncdap3.sh'; \
-	b='tst_ncdap3.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-t_dap3a.log: t_dap3a$(EXEEXT)
-	@p='t_dap3a$(EXEEXT)'; \
-	b='t_dap3a'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-test_cvt3.log: test_cvt3$(EXEEXT)
-	@p='test_cvt3$(EXEEXT)'; \
-	b='test_cvt3'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-test_vara.log: test_vara$(EXEEXT)
-	@p='test_vara$(EXEEXT)'; \
-	b='test_vara'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_remote3.sh.log: tst_remote3.sh
-	@p='tst_remote3.sh'; \
-	b='tst_remote3.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_formatx.sh.log: tst_formatx.sh
-	@p='tst_formatx.sh'; \
-	b='tst_formatx.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-test_partvar.log: test_partvar$(EXEEXT)
-	@p='test_partvar$(EXEEXT)'; \
-	b='test_partvar'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-testurl.sh.log: testurl.sh
-	@p='testurl.sh'; \
-	b='testurl.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_longremote3.sh.log: tst_longremote3.sh
-	@p='tst_longremote3.sh'; \
-	b='tst_longremote3.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-test_varm3.log: test_varm3$(EXEEXT)
-	@p='test_varm3$(EXEEXT)'; \
-	b='test_varm3'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-test_nstride_cached.log: test_nstride_cached$(EXEEXT)
-	@p='test_nstride_cached$(EXEEXT)'; \
-	b='test_nstride_cached'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-t_misc.log: t_misc$(EXEEXT)
-	@p='t_misc$(EXEEXT)'; \
-	b='t_misc'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-testauth.sh.log: testauth.sh
-	@p='testauth.sh'; \
-	b='testauth.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-.test.log:
-	@p='$<'; \
-	$(am__set_b); \
-	$(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
- at am__EXEEXT_TRUE@.test$(EXEEXT).log:
- at am__EXEEXT_TRUE@	@p='$<'; \
- at am__EXEEXT_TRUE@	$(am__set_b); \
- at am__EXEEXT_TRUE@	$(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
- at am__EXEEXT_TRUE@	--log-file $$b.log --trs-file $$b.trs \
- at am__EXEEXT_TRUE@	$(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
- at am__EXEEXT_TRUE@	"$$tst" $(AM_TESTS_FD_REDIRECT)
+	    test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
+	      dashes="$$skipped"; \
+	  fi; \
+	  report=""; \
+	  if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
+	    report="Please report to $(PACKAGE_BUGREPORT)"; \
+	    test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
+	      dashes="$$report"; \
+	  fi; \
+	  dashes=`echo "$$dashes" | sed s/./=/g`; \
+	  if test "$$failed" -eq 0; then \
+	    col="$$grn"; \
+	  else \
+	    col="$$red"; \
+	  fi; \
+	  echo "$${col}$$dashes$${std}"; \
+	  echo "$${col}$$banner$${std}"; \
+	  test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \
+	  test -z "$$report" || echo "$${col}$$report$${std}"; \
+	  echo "$${col}$$dashes$${std}"; \
+	  test "$$failed" -eq 0; \
+	else :; fi
 
 distdir: $(DISTFILES)
 	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@@ -1289,9 +954,6 @@ install-strip:
 	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
 	fi
 mostlyclean-generic:
-	-test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
-	-test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
-	-test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
 
 clean-generic:
 	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
@@ -1391,8 +1053,8 @@ uninstall-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 recheck tags tags-am \
-	uninstall uninstall-am
+	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
+	uninstall-am
 
 .PRECIOUS: Makefile
 
diff --git a/ncdump/CMakeLists.txt b/ncdump/CMakeLists.txt
index 075feda..fb96ee4 100644
--- a/ncdump/CMakeLists.txt
+++ b/ncdump/CMakeLists.txt
@@ -59,6 +59,12 @@ IF(ENABLE_TESTS)
   TARGET_LINK_LIBRARIES(bom netcdf)
   TARGET_LINK_LIBRARIES(tst_dimsizes netcdf)
 
+IF(ENABLE_FILEINFO)
+  ADD_EXECUTABLE(tst_fileinfo tst_fileinfo.c)
+  TARGET_LINK_LIBRARIES(tst_fileinfo netcdf)
+  add_sh_test(ncdump tst_fileinfo)
+ENDIF()
+
 IF(MSVC)
   SET_TARGET_PROPERTIES(rewrite-scalar PROPERTIES RUNTIME_OUTPUT_DIRECTORY
     ${CMAKE_CURRENT_BINARY_DIR})
@@ -80,6 +86,8 @@ IF(MSVC)
     ${CMAKE_CURRENT_BINARY_DIR})
   SET_TARGET_PROPERTIES(tst_dimsizes PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE
     ${CMAKE_CURRENT_BINARY_DIR})
+  SET_TARGET_PROPERTIES(tst_fileinfo PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE
+    ${CMAKE_CURRENT_BINARY_DIR})
 ENDIF()
 
   # Base tests
@@ -96,7 +104,6 @@ ENDIF()
   add_sh_test(ncdump tst_lengths)
   add_sh_test(ncdump tst_calendars)
   add_bin_test(ncdump tst_utf8)
-
   add_sh_test(ncdump run_utf8_tests)
   IF(USE_NETCDF4)
     add_sh_test(ncdump run_utf8_nc4_tests)
@@ -124,15 +131,6 @@ ENDIF()
     ENDIF(USE_NETCDF4)
   ENDIF(BUILD_DISKLESS)
 
-  ###
-  # This test fails on Visual Studio builds with bash.
-  # It passes, but technically fails because the scientific
-  # formatting omits a 0.
-  ###
-  IF(EXTRA_TESTS AND NOT MSVC)
-    add_sh_test(ncdump run_back_comp_tests)
-  ENDIF()
-
   IF(USE_NETCDF4)
     add_bin_test(ncdump tst_create_files)
     add_bin_test(ncdump tst_group_data)
@@ -152,11 +150,21 @@ ENDIF()
     add_bin_test_no_prefix(tst_compress)
     add_bin_test_no_prefix(tst_chunking)
 
+
+    ###
+    # This test fails on Visual Studio builds with bash.
+    # It passes, but technically fails because the scientific
+    # formatting omits a 0.
+    ###
+    IF(EXTRA_TESTS AND NOT MSVC)
+      add_sh_test(ncdump run_back_comp_tests)
+    ENDIF()
+
     # Known failure on MSVC; the number of 0's padding
     # is different, but the result is actually correct.
     #IF(NOT MSVC)
-      add_sh_test(ncdump tst_netcdf4)
-      add_bin_test(ncdump tst_h_rdc0)
+    add_sh_test(ncdump tst_netcdf4)
+    add_bin_test(ncdump tst_h_rdc0)
     #ENDIF()
 
     add_bin_test(ncdump tst_unicode)
@@ -168,6 +176,8 @@ ENDIF()
       add_sh_test(ncdump tst_netcdf4_4)
     ENDIF()
 
+
+
     IF(NOT MSVC)
       add_sh_test(ncdump tst_nccopy4)
     ENDIF()
diff --git a/ncdump/Make0 b/ncdump/Make0
index 41d25a1..9d0e7e7 100644
--- a/ncdump/Make0
+++ b/ncdump/Make0
@@ -1,24 +1,33 @@
 # Test c output
-T=tst_dimsizes
+T=tst_fileinfo
 #CMD=valgrind --leak-check=full
-#CMD=gdb --args
+CMD=gdb --args
 
-#MPI=1
-LLP="LD_LIBRARY_PATH=/usr/local/lib"
+#PAR=1
 
-ifndef MPI
-CC=gcc
-CFLAGS=-g -O0 -I.. -I../include 
-LDFLAGS=../liblib/.libs/libnetcdf.a  -L/usr/local/lib -lhdf5_hl -lhdf5 -lz -lm -lcurl
+CFLAGS=-Wall -g -O0 -I.. -I../include
+
+ifdef PAR
+CC=mpicc
+#CC=/usr/local/bin/mpicc
+LDFLAGS=../liblib/.libs/libnetcdf.a -L/usr/local/lib -lhdf5_hl -lhdf5 -lz  -ldl -lcurl -lpnetcdf -lmpich -lm
 else
-CC=/usr/local/bin/mpicc
-LDFLAGS=../liblib/.libs/libnetcdf.a -L/usr/local/lib -lhdf5_hl -lhdf5 -lz  ../liblib/.libs/libnetcdf.a -ldl -lcurl -lpnetcdf -lmpich -lm
+CC=gcc
+#LDFLAGS=../liblib/.libs/libnetcdf.a  -L/usr/local/lib -lhdf5_hl -lhdf5 -lz -lm -lcurl
+LDFLAGS=../liblib/.libs/libnetcdf.a -L/usr/local/lib -lhdf5_hl -lhdf5 -lz  -ldl -lm -lcurl
 endif
 
-all::
-	export ${LLP}; export CFLAGS; export LDFLAGS; \
-	${CC} -o $T.exe ${CFLAGS} ${T}.c ${LDFLAGS}; \
-	${CMD} ./$T.exe
+#	cd .. ; ${MAKE} all
+
+LLP=/usr/local/lib:${LD_LIBRARY_PATH}
+
+all:: cmp
+	export LD_LIBRARY_PATH=${LLP}; export CFLAGS; export LDFLAGS; \
+	${CMD} ./t
+
+cmp::
+	export LD_LIBRARY_PATH=${LLP}; export CFLAGS; export LDFLAGS; \
+	${CC} -o t ${CFLAGS} ${T}.c ${SRC} ${LDFLAGS}; \
 
 cpp::
 	${CC} -E ${CFLAGS} ${T}.c > ${T}.txt
diff --git a/ncdump/Makefile.am b/ncdump/Makefile.am
index 0a1856b..bb7046a 100644
--- a/ncdump/Makefile.am
+++ b/ncdump/Makefile.am
@@ -29,11 +29,17 @@ if BUILD_TESTSETS
 #if !BUILD_DLL
 # These tests are run for both netCDF-4 and non-netCDF-4 builds.
 check_PROGRAMS = rewrite-scalar ctest ctest64 ncdump tst_utf8 bom tst_dimsizes
+
 TESTS = tst_inttags.sh run_tests.sh tst_64bit.sh ctest ctest64 tst_output.sh	\
 tst_lengths.sh tst_calendars.sh tst_utf8 run_utf8_tests.sh      \
 tst_nccopy3.sh tst_charfill.sh tst_iter.sh tst_formatx3.sh tst_bom.sh \
 tst_dimsizes.sh
 
+if ENABLE_FILEINFO
+check_PROGRAMS += tst_fileinfo
+TESTS += tst_fileinfo.sh
+endif
+
 if LARGE_FILE_TESTS
 TESTS += tst_iter.sh
 endif
@@ -114,7 +120,8 @@ tst_nc_test_netcdf4_4_0.cdl tst_mud4.nc tst_mud4.cdl tst_mud4-bc.cdl    \
 tst_ncf213.cdl tst_ncf213.nc tst_h_scalar.cdl tst_h_scalar.nc           \
 tst_mud4_chars.cdl tst_mud4_chars.nc                                    \
 inttags.nc inttags4.nc tst_inttags.cdl tst_inttags4.cdl                 \
-tst_dimsize_classic.nc tst_dimsize_64offset.nc tst_dimsize_64data.nc
+tst_dimsize_classic.nc tst_dimsize_64offset.nc tst_dimsize_64data.nc    \
+nc4_fileinfo.nc hdf5_fileinfo.hdf
 
 # These files all have to be included with the distribution.
 EXTRA_DIST = run_tests.sh tst_64bit.sh tst_output.sh test0.cdl		\
@@ -142,7 +149,7 @@ run_utf8_nc4_tests.sh							\
 tst_formatx3.sh tst_formatx4.sh ref_tst_utf8_4.cdl                      \
 tst_inttags.sh tst_inttags4.sh                                          \
 CMakeLists.txt XGetopt.c tst_bom.sh tst_inmemory_nc3.sh                 \
-tst_dimsizes.sh tst_inmemory_nc4.sh
+tst_dimsizes.sh tst_inmemory_nc4.sh tst_fileinfo.sh
 
 # CDL files and Expected results
 SUBDIRS=cdl expected
diff --git a/ncdump/Makefile.in b/ncdump/Makefile.in
index 4329d51..0d38b40 100644
--- a/ncdump/Makefile.in
+++ b/ncdump/Makefile.in
@@ -111,7 +111,7 @@ bin_PROGRAMS = ncdump$(EXEEXT) nccopy$(EXEEXT)
 @BUILD_TESTSETS_TRUE@	ctest$(EXEEXT) ctest64$(EXEEXT) \
 @BUILD_TESTSETS_TRUE@	ncdump$(EXEEXT) tst_utf8$(EXEEXT) \
 @BUILD_TESTSETS_TRUE@	bom$(EXEEXT) tst_dimsizes$(EXEEXT) \
- at BUILD_TESTSETS_TRUE@	$(am__EXEEXT_1)
+ at BUILD_TESTSETS_TRUE@	$(am__EXEEXT_1) $(am__EXEEXT_2)
 @BUILD_TESTSETS_TRUE at TESTS = tst_inttags.sh run_tests.sh tst_64bit.sh \
 @BUILD_TESTSETS_TRUE@	ctest$(EXEEXT) ctest64$(EXEEXT) \
 @BUILD_TESTSETS_TRUE@	tst_output.sh tst_lengths.sh \
@@ -119,29 +119,32 @@ bin_PROGRAMS = ncdump$(EXEEXT) nccopy$(EXEEXT)
 @BUILD_TESTSETS_TRUE@	run_utf8_tests.sh tst_nccopy3.sh \
 @BUILD_TESTSETS_TRUE@	tst_charfill.sh tst_iter.sh \
 @BUILD_TESTSETS_TRUE@	tst_formatx3.sh tst_bom.sh \
- at BUILD_TESTSETS_TRUE@	tst_dimsizes.sh $(am__append_3) \
- at BUILD_TESTSETS_TRUE@	$(am__append_4) $(am__append_5) \
- at BUILD_TESTSETS_TRUE@	$(am__EXEEXT_2) $(am__append_8) \
- at BUILD_TESTSETS_TRUE@	tst_ncgen4_classic.sh $(am__append_9)
- at BUILD_TESTSETS_TRUE@@LARGE_FILE_TESTS_TRUE at am__append_3 = tst_iter.sh
- at BUILD_DISKLESS_TRUE@@BUILD_TESTSETS_TRUE at am__append_4 = tst_inmemory_nc3.sh
- at BUILD_DISKLESS_TRUE@@BUILD_TESTSETS_TRUE@@USE_NETCDF4_TRUE at am__append_5 = tst_inmemory_nc4.sh
+ at BUILD_TESTSETS_TRUE@	tst_dimsizes.sh $(am__append_4) \
+ at BUILD_TESTSETS_TRUE@	$(am__append_5) $(am__append_6) \
+ at BUILD_TESTSETS_TRUE@	$(am__append_7) $(am__EXEEXT_3) \
+ at BUILD_TESTSETS_TRUE@	$(am__append_10) tst_ncgen4_classic.sh \
+ at BUILD_TESTSETS_TRUE@	$(am__append_11)
+ at BUILD_TESTSETS_TRUE@@ENABLE_FILEINFO_TRUE at am__append_3 = tst_fileinfo
+ at BUILD_TESTSETS_TRUE@@ENABLE_FILEINFO_TRUE at am__append_4 = tst_fileinfo.sh
+ at BUILD_TESTSETS_TRUE@@LARGE_FILE_TESTS_TRUE at am__append_5 = tst_iter.sh
+ at BUILD_DISKLESS_TRUE@@BUILD_TESTSETS_TRUE at am__append_6 = tst_inmemory_nc3.sh
+ at BUILD_DISKLESS_TRUE@@BUILD_TESTSETS_TRUE@@USE_NETCDF4_TRUE at am__append_7 = tst_inmemory_nc4.sh
 
 # NetCDF-4 has some extra tests.
- at BUILD_TESTSETS_TRUE@@USE_NETCDF4_TRUE at am__append_6 = tst_create_files tst_h_rdc0 tst_group_data		\
+ at BUILD_TESTSETS_TRUE@@USE_NETCDF4_TRUE at am__append_8 = tst_create_files tst_h_rdc0 tst_group_data		\
 @BUILD_TESTSETS_TRUE@@USE_NETCDF4_TRUE at tst_enum_data tst_opaque_data tst_string_data tst_vlen_data tst_comp	\
 @BUILD_TESTSETS_TRUE@@USE_NETCDF4_TRUE at tst_comp2 tst_nans tst_special_atts tst_unicode tst_fillbug tst_compress \
 @BUILD_TESTSETS_TRUE@@USE_NETCDF4_TRUE at tst_chunking tst_h_scalar tst_bug324
 
- at BUILD_TESTSETS_TRUE@@USE_NETCDF4_TRUE at am__append_7 = tst_inttags4.sh tst_create_files tst_group_data tst_enum_data tst_opaque_data	\
+ at BUILD_TESTSETS_TRUE@@USE_NETCDF4_TRUE at am__append_9 = tst_inttags4.sh tst_create_files tst_group_data tst_enum_data tst_opaque_data	\
 @BUILD_TESTSETS_TRUE@@USE_NETCDF4_TRUE at tst_string_data tst_vlen_data tst_comp tst_comp2 tst_nans		\
 @BUILD_TESTSETS_TRUE@@USE_NETCDF4_TRUE at tst_special_atts tst_netcdf4.sh tst_h_rdc0 tst_unicode tst_fillbug	\
 @BUILD_TESTSETS_TRUE@@USE_NETCDF4_TRUE at tst_fillbug.sh tst_netcdf4_4.sh tst_compress tst_nccopy4.sh             \
 @BUILD_TESTSETS_TRUE@@USE_NETCDF4_TRUE at tst_grp_spec.sh tst_mud.sh tst_h_scalar tst_h_scalar.sh tst_formatx4.sh \
 @BUILD_TESTSETS_TRUE@@USE_NETCDF4_TRUE at tst_bug324 run_utf8_nc4_tests.sh
 
- at BUILD_TESTSETS_TRUE@@EXTRA_TESTS_TRUE@@USE_NETCDF4_TRUE at am__append_8 = run_back_comp_tests.sh
- at BUILD_TESTSETS_TRUE@@USE_NETCDF4_TRUE at am__append_9 = tst_ncgen4.sh
+ at BUILD_TESTSETS_TRUE@@EXTRA_TESTS_TRUE@@USE_NETCDF4_TRUE at am__append_10 = run_back_comp_tests.sh
+ at BUILD_TESTSETS_TRUE@@USE_NETCDF4_TRUE at am__append_11 = tst_ncgen4.sh
 subdir = ncdump
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
@@ -156,7 +159,8 @@ CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"
- at BUILD_TESTSETS_TRUE@@USE_NETCDF4_TRUE at am__EXEEXT_1 = tst_create_files$(EXEEXT) \
+ at BUILD_TESTSETS_TRUE@@ENABLE_FILEINFO_TRUE at am__EXEEXT_1 = tst_fileinfo$(EXEEXT)
+ at BUILD_TESTSETS_TRUE@@USE_NETCDF4_TRUE at am__EXEEXT_2 = tst_create_files$(EXEEXT) \
 @BUILD_TESTSETS_TRUE@@USE_NETCDF4_TRUE@	tst_h_rdc0$(EXEEXT) \
 @BUILD_TESTSETS_TRUE@@USE_NETCDF4_TRUE@	tst_group_data$(EXEEXT) \
 @BUILD_TESTSETS_TRUE@@USE_NETCDF4_TRUE@	tst_enum_data$(EXEEXT) \
@@ -237,6 +241,10 @@ tst_enum_data_SOURCES = tst_enum_data.c
 tst_enum_data_OBJECTS = tst_enum_data.$(OBJEXT)
 tst_enum_data_LDADD = $(LDADD)
 tst_enum_data_DEPENDENCIES = ${top_builddir}/liblib/libnetcdf.la
+tst_fileinfo_SOURCES = tst_fileinfo.c
+tst_fileinfo_OBJECTS = tst_fileinfo.$(OBJEXT)
+tst_fileinfo_LDADD = $(LDADD)
+tst_fileinfo_DEPENDENCIES = ${top_builddir}/liblib/libnetcdf.la
 tst_fillbug_SOURCES = tst_fillbug.c
 tst_fillbug_OBJECTS = tst_fillbug.$(OBJEXT)
 tst_fillbug_LDADD = $(LDADD)
@@ -318,16 +326,17 @@ am__v_CCLD_1 =
 SOURCES = bom.c ctest.c ctest64.c $(nccopy_SOURCES) $(ncdump_SOURCES) \
 	rewrite-scalar.c tst_bug324.c tst_chunking.c tst_comp.c \
 	tst_comp2.c tst_compress.c tst_create_files.c tst_dimsizes.c \
-	tst_enum_data.c tst_fillbug.c tst_group_data.c tst_h_rdc0.c \
-	tst_h_scalar.c tst_nans.c tst_opaque_data.c tst_special_atts.c \
-	tst_string_data.c tst_unicode.c tst_utf8.c tst_vlen_data.c
-DIST_SOURCES = bom.c ctest.c ctest64.c $(nccopy_SOURCES) \
-	$(ncdump_SOURCES) rewrite-scalar.c tst_bug324.c tst_chunking.c \
-	tst_comp.c tst_comp2.c tst_compress.c tst_create_files.c \
-	tst_dimsizes.c tst_enum_data.c tst_fillbug.c tst_group_data.c \
+	tst_enum_data.c tst_fileinfo.c tst_fillbug.c tst_group_data.c \
 	tst_h_rdc0.c tst_h_scalar.c tst_nans.c tst_opaque_data.c \
 	tst_special_atts.c tst_string_data.c tst_unicode.c tst_utf8.c \
 	tst_vlen_data.c
+DIST_SOURCES = bom.c ctest.c ctest64.c $(nccopy_SOURCES) \
+	$(ncdump_SOURCES) rewrite-scalar.c tst_bug324.c tst_chunking.c \
+	tst_comp.c tst_comp2.c tst_compress.c tst_create_files.c \
+	tst_dimsizes.c tst_enum_data.c tst_fileinfo.c tst_fillbug.c \
+	tst_group_data.c tst_h_rdc0.c tst_h_scalar.c tst_nans.c \
+	tst_opaque_data.c tst_special_atts.c tst_string_data.c \
+	tst_unicode.c tst_utf8.c tst_vlen_data.c
 RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
 	ctags-recursive dvi-recursive html-recursive info-recursive \
 	install-data-recursive install-dvi-recursive \
@@ -378,7 +387,7 @@ am__recursive_targets = \
   $(RECURSIVE_CLEAN_TARGETS) \
   $(am__extra_recursive_targets)
 AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
-	check recheck distdir
+	distdir
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
 # Read a list of newline-separated strings from the standard input,
 # and print each of them once, without duplicates.  Input order is
@@ -420,141 +429,7 @@ am__tty_colors = { \
     std=''; \
   fi; \
 }
-am__recheck_rx = ^[ 	]*:recheck:[ 	]*
-am__global_test_result_rx = ^[ 	]*:global-test-result:[ 	]*
-am__copy_in_global_log_rx = ^[ 	]*:copy-in-global-log:[ 	]*
-# A command that, given a newline-separated list of test names on the
-# standard input, print the name of the tests that are to be re-run
-# upon "make recheck".
-am__list_recheck_tests = $(AWK) '{ \
-  recheck = 1; \
-  while ((rc = (getline line < ($$0 ".trs"))) != 0) \
-    { \
-      if (rc < 0) \
-        { \
-          if ((getline line2 < ($$0 ".log")) < 0) \
-	    recheck = 0; \
-          break; \
-        } \
-      else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
-        { \
-          recheck = 0; \
-          break; \
-        } \
-      else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
-        { \
-          break; \
-        } \
-    }; \
-  if (recheck) \
-    print $$0; \
-  close ($$0 ".trs"); \
-  close ($$0 ".log"); \
-}'
-# A command that, given a newline-separated list of test names on the
-# standard input, create the global log from their .trs and .log files.
-am__create_global_log = $(AWK) ' \
-function fatal(msg) \
-{ \
-  print "fatal: making $@: " msg | "cat >&2"; \
-  exit 1; \
-} \
-function rst_section(header) \
-{ \
-  print header; \
-  len = length(header); \
-  for (i = 1; i <= len; i = i + 1) \
-    printf "="; \
-  printf "\n\n"; \
-} \
-{ \
-  copy_in_global_log = 1; \
-  global_test_result = "RUN"; \
-  while ((rc = (getline line < ($$0 ".trs"))) != 0) \
-    { \
-      if (rc < 0) \
-         fatal("failed to read from " $$0 ".trs"); \
-      if (line ~ /$(am__global_test_result_rx)/) \
-        { \
-          sub("$(am__global_test_result_rx)", "", line); \
-          sub("[ 	]*$$", "", line); \
-          global_test_result = line; \
-        } \
-      else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
-        copy_in_global_log = 0; \
-    }; \
-  if (copy_in_global_log) \
-    { \
-      rst_section(global_test_result ": " $$0); \
-      while ((rc = (getline line < ($$0 ".log"))) != 0) \
-      { \
-        if (rc < 0) \
-          fatal("failed to read from " $$0 ".log"); \
-        print line; \
-      }; \
-      printf "\n"; \
-    }; \
-  close ($$0 ".trs"); \
-  close ($$0 ".log"); \
-}'
-# Restructured Text title.
-am__rst_title = { sed 's/.*/   &   /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
-# Solaris 10 'make', and several other traditional 'make' implementations,
-# pass "-e" to $(SHELL), and POSIX 2008 even requires this.  Work around it
-# by disabling -e (using the XSI extension "set +e") if it's set.
-am__sh_e_setup = case $$- in *e*) set +e;; esac
-# Default flags passed to test drivers.
-am__common_driver_flags = \
-  --color-tests "$$am__color_tests" \
-  --enable-hard-errors "$$am__enable_hard_errors" \
-  --expect-failure "$$am__expect_failure"
-# To be inserted before the command running the test.  Creates the
-# directory for the log if needed.  Stores in $dir the directory
-# containing $f, in $tst the test, in $log the log.  Executes the
-# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
-# passes TESTS_ENVIRONMENT.  Set up options for the wrapper that
-# will run the test scripts (or their associated LOG_COMPILER, if
-# thy have one).
-am__check_pre = \
-$(am__sh_e_setup);					\
-$(am__vpath_adj_setup) $(am__vpath_adj)			\
-$(am__tty_colors);					\
-srcdir=$(srcdir); export srcdir;			\
-case "$@" in						\
-  */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;;	\
-    *) am__odir=.;; 					\
-esac;							\
-test "x$$am__odir" = x"." || test -d "$$am__odir" 	\
-  || $(MKDIR_P) "$$am__odir" || exit $$?;		\
-if test -f "./$$f"; then dir=./;			\
-elif test -f "$$f"; then dir=;				\
-else dir="$(srcdir)/"; fi;				\
-tst=$$dir$$f; log='$@'; 				\
-if test -n '$(DISABLE_HARD_ERRORS)'; then		\
-  am__enable_hard_errors=no; 				\
-else							\
-  am__enable_hard_errors=yes; 				\
-fi; 							\
-case " $(XFAIL_TESTS) " in				\
-  *[\ \	]$$f[\ \	]* | *[\ \	]$$dir$$f[\ \	]*) \
-    am__expect_failure=yes;;				\
-  *)							\
-    am__expect_failure=no;;				\
-esac; 							\
-$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
-# A shell command to get the names of the tests scripts with any registered
-# extension removed (i.e., equivalently, the names of the test logs, with
-# the '.log' extension removed).  The result is saved in the shell variable
-# '$bases'.  This honors runtime overriding of TESTS and TEST_LOGS.  Sadly,
-# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
-# since that might cause problem with VPATH rewrites for suffix-less tests.
-# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
-am__set_TESTS_bases = \
-  bases='$(TEST_LOGS)'; \
-  bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
-  bases=`echo $$bases`
-RECHECK_LOGS = $(TEST_LOGS)
- at BUILD_TESTSETS_TRUE@@USE_NETCDF4_TRUE at am__EXEEXT_2 = tst_inttags4.sh \
+ at BUILD_TESTSETS_TRUE@@USE_NETCDF4_TRUE at am__EXEEXT_3 = tst_inttags4.sh \
 @BUILD_TESTSETS_TRUE@@USE_NETCDF4_TRUE@	tst_create_files$(EXEEXT) \
 @BUILD_TESTSETS_TRUE@@USE_NETCDF4_TRUE@	tst_group_data$(EXEEXT) \
 @BUILD_TESTSETS_TRUE@@USE_NETCDF4_TRUE@	tst_enum_data$(EXEEXT) \
@@ -580,29 +455,9 @@ RECHECK_LOGS = $(TEST_LOGS)
 @BUILD_TESTSETS_TRUE@@USE_NETCDF4_TRUE@	tst_formatx4.sh \
 @BUILD_TESTSETS_TRUE@@USE_NETCDF4_TRUE@	tst_bug324$(EXEEXT) \
 @BUILD_TESTSETS_TRUE@@USE_NETCDF4_TRUE@	run_utf8_nc4_tests.sh
-TEST_SUITE_LOG = test-suite.log
-TEST_EXTENSIONS = @EXEEXT@ .test
-LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
-LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS)
-am__set_b = \
-  case '$@' in \
-    */*) \
-      case '$*' in \
-        */*) b='$*';; \
-          *) b=`echo '$@' | sed 's/\.log$$//'`; \
-       esac;; \
-    *) \
-      b='$*';; \
-  esac
-am__test_logs1 = $(TESTS:=.log)
-am__test_logs2 = $(am__test_logs1:@EXEEXT at .log=.log)
-TEST_LOGS = $(am__test_logs2:.test.log=.log)
-TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
-TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
-	$(TEST_LOG_FLAGS)
 DIST_SUBDIRS = $(SUBDIRS)
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \
-	$(top_srcdir)/lib_flags.am $(top_srcdir)/test-driver
+	$(top_srcdir)/lib_flags.am
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 am__relativize = \
   dir0=`pwd`; \
@@ -845,8 +700,9 @@ CLEANFILES = test0.nc test1.cdl test1.nc test2.cdl ctest1.cdl \
 	tst_ncf213.nc tst_h_scalar.cdl tst_h_scalar.nc \
 	tst_mud4_chars.cdl tst_mud4_chars.nc inttags.nc inttags4.nc \
 	tst_inttags.cdl tst_inttags4.cdl tst_dimsize_classic.nc \
-	tst_dimsize_64offset.nc tst_dimsize_64data.nc results/*.nc \
-	results/*.dmp results/*.dmp2 tmp*.cdl tst_bug324.nc
+	tst_dimsize_64offset.nc tst_dimsize_64data.nc nc4_fileinfo.nc \
+	hdf5_fileinfo.hdf results/*.nc results/*.dmp results/*.dmp2 \
+	tmp*.cdl tst_bug324.nc
 
 # These files all have to be included with the distribution.
 EXTRA_DIST = run_tests.sh tst_64bit.sh tst_output.sh test0.cdl \
@@ -876,9 +732,9 @@ EXTRA_DIST = run_tests.sh tst_64bit.sh tst_output.sh test0.cdl \
 	tst_formatx3.sh tst_formatx4.sh ref_tst_utf8_4.cdl \
 	tst_inttags.sh tst_inttags4.sh CMakeLists.txt XGetopt.c \
 	tst_bom.sh tst_inmemory_nc3.sh tst_dimsizes.sh \
-	tst_inmemory_nc4.sh tst_ncgen_shared.sh tst_ncgen4.sh \
-	tst_ncgen4_classic.sh tst_ncgen4_diff.sh tst_ncgen4_cycle.sh \
-	ref_ctest.c ref_ctest64.c
+	tst_inmemory_nc4.sh tst_fileinfo.sh tst_ncgen_shared.sh \
+	tst_ncgen4.sh tst_ncgen4_classic.sh tst_ncgen4_diff.sh \
+	tst_ncgen4_cycle.sh ref_ctest.c ref_ctest64.c
 
 # CDL files and Expected results
 SUBDIRS = cdl expected
@@ -887,7 +743,7 @@ all: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) all-recursive
 
 .SUFFIXES:
-.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs
+.SUFFIXES: .c .lo .o .obj
 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/lib_flags.am $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
@@ -1033,6 +889,10 @@ tst_enum_data$(EXEEXT): $(tst_enum_data_OBJECTS) $(tst_enum_data_DEPENDENCIES) $
 	@rm -f tst_enum_data$(EXEEXT)
 	$(AM_V_CCLD)$(LINK) $(tst_enum_data_OBJECTS) $(tst_enum_data_LDADD) $(LIBS)
 
+tst_fileinfo$(EXEEXT): $(tst_fileinfo_OBJECTS) $(tst_fileinfo_DEPENDENCIES) $(EXTRA_tst_fileinfo_DEPENDENCIES) 
+	@rm -f tst_fileinfo$(EXEEXT)
+	$(AM_V_CCLD)$(LINK) $(tst_fileinfo_OBJECTS) $(tst_fileinfo_LDADD) $(LIBS)
+
 tst_fillbug$(EXEEXT): $(tst_fillbug_OBJECTS) $(tst_fillbug_DEPENDENCIES) $(EXTRA_tst_fillbug_DEPENDENCIES) 
 	@rm -f tst_fillbug$(EXEEXT)
 	$(AM_V_CCLD)$(LINK) $(tst_fillbug_OBJECTS) $(tst_fillbug_LDADD) $(LIBS)
@@ -1103,6 +963,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/tst_create_files.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/tst_dimsizes.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/tst_enum_data.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/tst_fileinfo.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/tst_fillbug.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/tst_group_data.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/tst_h_rdc0-tst_h_rdc0.Po at am__quote@
@@ -1303,490 +1164,98 @@ cscopelist-am: $(am__tagged_files)
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
-# Recover from deleted '.trs' file; this should ensure that
-# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
-# both 'foo.log' and 'foo.trs'.  Break the recipe in two subshells
-# to avoid problems with "make -n".
-.log.trs:
-	rm -f $< $@
-	$(MAKE) $(AM_MAKEFLAGS) $<
-
-# Leading 'am--fnord' is there to ensure the list of targets does not
-# expand to empty, as could happen e.g. with make check TESTS=''.
-am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
-am--force-recheck:
-	@:
-
-$(TEST_SUITE_LOG): $(TEST_LOGS)
-	@$(am__set_TESTS_bases); \
-	am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
-	redo_bases=`for i in $$bases; do \
-	              am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
-	            done`; \
-	if test -n "$$redo_bases"; then \
-	  redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
-	  redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
-	  if $(am__make_dryrun); then :; else \
-	    rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
-	  fi; \
-	fi; \
-	if test -n "$$am__remaking_logs"; then \
-	  echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
-	       "recursion detected" >&2; \
-	elif test -n "$$redo_logs"; then \
-	  am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
-	fi; \
-	if $(am__make_dryrun); then :; else \
-	  st=0;  \
-	  errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
-	  for i in $$redo_bases; do \
-	    test -f $$i.trs && test -r $$i.trs \
-	      || { echo "$$errmsg $$i.trs" >&2; st=1; }; \
-	    test -f $$i.log && test -r $$i.log \
-	      || { echo "$$errmsg $$i.log" >&2; st=1; }; \
+check-TESTS: $(TESTS)
+	@failed=0; all=0; xfail=0; xpass=0; skip=0; \
+	srcdir=$(srcdir); export srcdir; \
+	list=' $(TESTS) '; \
+	$(am__tty_colors); \
+	if test -n "$$list"; then \
+	  for tst in $$list; do \
+	    if test -f ./$$tst; then dir=./; \
+	    elif test -f $$tst; then dir=; \
+	    else dir="$(srcdir)/"; fi; \
+	    if $(TESTS_ENVIRONMENT) $${dir}$$tst $(AM_TESTS_FD_REDIRECT); then \
+	      all=`expr $$all + 1`; \
+	      case " $(XFAIL_TESTS) " in \
+	      *[\ \	]$$tst[\ \	]*) \
+		xpass=`expr $$xpass + 1`; \
+		failed=`expr $$failed + 1`; \
+		col=$$red; res=XPASS; \
+	      ;; \
+	      *) \
+		col=$$grn; res=PASS; \
+	      ;; \
+	      esac; \
+	    elif test $$? -ne 77; then \
+	      all=`expr $$all + 1`; \
+	      case " $(XFAIL_TESTS) " in \
+	      *[\ \	]$$tst[\ \	]*) \
+		xfail=`expr $$xfail + 1`; \
+		col=$$lgn; res=XFAIL; \
+	      ;; \
+	      *) \
+		failed=`expr $$failed + 1`; \
+		col=$$red; res=FAIL; \
+	      ;; \
+	      esac; \
+	    else \
+	      skip=`expr $$skip + 1`; \
+	      col=$$blu; res=SKIP; \
+	    fi; \
+	    echo "$${col}$$res$${std}: $$tst"; \
 	  done; \
-	  test $$st -eq 0 || exit 1; \
-	fi
-	@$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
-	ws='[ 	]'; \
-	results=`for b in $$bases; do echo $$b.trs; done`; \
-	test -n "$$results" || results=/dev/null; \
-	all=`  grep "^$$ws*:test-result:"           $$results | wc -l`; \
-	pass=` grep "^$$ws*:test-result:$$ws*PASS"  $$results | wc -l`; \
-	fail=` grep "^$$ws*:test-result:$$ws*FAIL"  $$results | wc -l`; \
-	skip=` grep "^$$ws*:test-result:$$ws*SKIP"  $$results | wc -l`; \
-	xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
-	xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
-	error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
-	if test `expr $$fail + $$xpass + $$error` -eq 0; then \
-	  success=true; \
-	else \
-	  success=false; \
-	fi; \
-	br='==================='; br=$$br$$br$$br$$br; \
-	result_count () \
-	{ \
-	    if test x"$$1" = x"--maybe-color"; then \
-	      maybe_colorize=yes; \
-	    elif test x"$$1" = x"--no-color"; then \
-	      maybe_colorize=no; \
+	  if test "$$all" -eq 1; then \
+	    tests="test"; \
+	    All=""; \
+	  else \
+	    tests="tests"; \
+	    All="All "; \
+	  fi; \
+	  if test "$$failed" -eq 0; then \
+	    if test "$$xfail" -eq 0; then \
+	      banner="$$All$$all $$tests passed"; \
 	    else \
-	      echo "$@: invalid 'result_count' usage" >&2; exit 4; \
+	      if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
+	      banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
 	    fi; \
-	    shift; \
-	    desc=$$1 count=$$2; \
-	    if test $$maybe_colorize = yes && test $$count -gt 0; then \
-	      color_start=$$3 color_end=$$std; \
+	  else \
+	    if test "$$xpass" -eq 0; then \
+	      banner="$$failed of $$all $$tests failed"; \
 	    else \
-	      color_start= color_end=; \
+	      if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
+	      banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
 	    fi; \
-	    echo "$${color_start}# $$desc $$count$${color_end}"; \
-	}; \
-	create_testsuite_report () \
-	{ \
-	  result_count $$1 "TOTAL:" $$all   "$$brg"; \
-	  result_count $$1 "PASS: " $$pass  "$$grn"; \
-	  result_count $$1 "SKIP: " $$skip  "$$blu"; \
-	  result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
-	  result_count $$1 "FAIL: " $$fail  "$$red"; \
-	  result_count $$1 "XPASS:" $$xpass "$$red"; \
-	  result_count $$1 "ERROR:" $$error "$$mgn"; \
-	}; \
-	{								\
-	  echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" |	\
-	    $(am__rst_title);						\
-	  create_testsuite_report --no-color;				\
-	  echo;								\
-	  echo ".. contents:: :depth: 2";				\
-	  echo;								\
-	  for b in $$bases; do echo $$b; done				\
-	    | $(am__create_global_log);					\
-	} >$(TEST_SUITE_LOG).tmp || exit 1;				\
-	mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG);			\
-	if $$success; then						\
-	  col="$$grn";							\
-	 else								\
-	  col="$$red";							\
-	  test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG);		\
-	fi;								\
-	echo "$${col}$$br$${std}"; 					\
-	echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}";	\
-	echo "$${col}$$br$${std}"; 					\
-	create_testsuite_report --maybe-color;				\
-	echo "$$col$$br$$std";						\
-	if $$success; then :; else					\
-	  echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}";		\
-	  if test -n "$(PACKAGE_BUGREPORT)"; then			\
-	    echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}";	\
-	  fi;								\
-	  echo "$$col$$br$$std";					\
-	fi;								\
-	$$success || exit 1
-
-check-TESTS:
-	@list='$(RECHECK_LOGS)';           test -z "$$list" || rm -f $$list
-	@list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
-	@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
-	@set +e; $(am__set_TESTS_bases); \
-	log_list=`for i in $$bases; do echo $$i.log; done`; \
-	trs_list=`for i in $$bases; do echo $$i.trs; done`; \
-	log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
-	$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
-	exit $$?;
-recheck: all $(check_PROGRAMS)
-	@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
-	@set +e; $(am__set_TESTS_bases); \
-	bases=`for i in $$bases; do echo $$i; done \
-	         | $(am__list_recheck_tests)` || exit 1; \
-	log_list=`for i in $$bases; do echo $$i.log; done`; \
-	log_list=`echo $$log_list`; \
-	$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
-	        am__force_recheck=am--force-recheck \
-	        TEST_LOGS="$$log_list"; \
-	exit $$?
-tst_inttags.sh.log: tst_inttags.sh
-	@p='tst_inttags.sh'; \
-	b='tst_inttags.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-run_tests.sh.log: run_tests.sh
-	@p='run_tests.sh'; \
-	b='run_tests.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_64bit.sh.log: tst_64bit.sh
-	@p='tst_64bit.sh'; \
-	b='tst_64bit.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-ctest.log: ctest$(EXEEXT)
-	@p='ctest$(EXEEXT)'; \
-	b='ctest'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-ctest64.log: ctest64$(EXEEXT)
-	@p='ctest64$(EXEEXT)'; \
-	b='ctest64'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_output.sh.log: tst_output.sh
-	@p='tst_output.sh'; \
-	b='tst_output.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_lengths.sh.log: tst_lengths.sh
-	@p='tst_lengths.sh'; \
-	b='tst_lengths.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_calendars.sh.log: tst_calendars.sh
-	@p='tst_calendars.sh'; \
-	b='tst_calendars.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_utf8.log: tst_utf8$(EXEEXT)
-	@p='tst_utf8$(EXEEXT)'; \
-	b='tst_utf8'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-run_utf8_tests.sh.log: run_utf8_tests.sh
-	@p='run_utf8_tests.sh'; \
-	b='run_utf8_tests.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_nccopy3.sh.log: tst_nccopy3.sh
-	@p='tst_nccopy3.sh'; \
-	b='tst_nccopy3.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_charfill.sh.log: tst_charfill.sh
-	@p='tst_charfill.sh'; \
-	b='tst_charfill.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_iter.sh.log: tst_iter.sh
-	@p='tst_iter.sh'; \
-	b='tst_iter.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_formatx3.sh.log: tst_formatx3.sh
-	@p='tst_formatx3.sh'; \
-	b='tst_formatx3.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_bom.sh.log: tst_bom.sh
-	@p='tst_bom.sh'; \
-	b='tst_bom.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_dimsizes.sh.log: tst_dimsizes.sh
-	@p='tst_dimsizes.sh'; \
-	b='tst_dimsizes.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_inmemory_nc3.sh.log: tst_inmemory_nc3.sh
-	@p='tst_inmemory_nc3.sh'; \
-	b='tst_inmemory_nc3.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_inmemory_nc4.sh.log: tst_inmemory_nc4.sh
-	@p='tst_inmemory_nc4.sh'; \
-	b='tst_inmemory_nc4.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_inttags4.sh.log: tst_inttags4.sh
-	@p='tst_inttags4.sh'; \
-	b='tst_inttags4.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_create_files.log: tst_create_files$(EXEEXT)
-	@p='tst_create_files$(EXEEXT)'; \
-	b='tst_create_files'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_group_data.log: tst_group_data$(EXEEXT)
-	@p='tst_group_data$(EXEEXT)'; \
-	b='tst_group_data'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_enum_data.log: tst_enum_data$(EXEEXT)
-	@p='tst_enum_data$(EXEEXT)'; \
-	b='tst_enum_data'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_opaque_data.log: tst_opaque_data$(EXEEXT)
-	@p='tst_opaque_data$(EXEEXT)'; \
-	b='tst_opaque_data'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_string_data.log: tst_string_data$(EXEEXT)
-	@p='tst_string_data$(EXEEXT)'; \
-	b='tst_string_data'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_vlen_data.log: tst_vlen_data$(EXEEXT)
-	@p='tst_vlen_data$(EXEEXT)'; \
-	b='tst_vlen_data'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_comp.log: tst_comp$(EXEEXT)
-	@p='tst_comp$(EXEEXT)'; \
-	b='tst_comp'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_comp2.log: tst_comp2$(EXEEXT)
-	@p='tst_comp2$(EXEEXT)'; \
-	b='tst_comp2'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_nans.log: tst_nans$(EXEEXT)
-	@p='tst_nans$(EXEEXT)'; \
-	b='tst_nans'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_special_atts.log: tst_special_atts$(EXEEXT)
-	@p='tst_special_atts$(EXEEXT)'; \
-	b='tst_special_atts'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_netcdf4.sh.log: tst_netcdf4.sh
-	@p='tst_netcdf4.sh'; \
-	b='tst_netcdf4.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_h_rdc0.log: tst_h_rdc0$(EXEEXT)
-	@p='tst_h_rdc0$(EXEEXT)'; \
-	b='tst_h_rdc0'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_unicode.log: tst_unicode$(EXEEXT)
-	@p='tst_unicode$(EXEEXT)'; \
-	b='tst_unicode'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_fillbug.log: tst_fillbug$(EXEEXT)
-	@p='tst_fillbug$(EXEEXT)'; \
-	b='tst_fillbug'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_fillbug.sh.log: tst_fillbug.sh
-	@p='tst_fillbug.sh'; \
-	b='tst_fillbug.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_netcdf4_4.sh.log: tst_netcdf4_4.sh
-	@p='tst_netcdf4_4.sh'; \
-	b='tst_netcdf4_4.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_compress.log: tst_compress$(EXEEXT)
-	@p='tst_compress$(EXEEXT)'; \
-	b='tst_compress'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_nccopy4.sh.log: tst_nccopy4.sh
-	@p='tst_nccopy4.sh'; \
-	b='tst_nccopy4.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_grp_spec.sh.log: tst_grp_spec.sh
-	@p='tst_grp_spec.sh'; \
-	b='tst_grp_spec.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_mud.sh.log: tst_mud.sh
-	@p='tst_mud.sh'; \
-	b='tst_mud.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_h_scalar.log: tst_h_scalar$(EXEEXT)
-	@p='tst_h_scalar$(EXEEXT)'; \
-	b='tst_h_scalar'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_h_scalar.sh.log: tst_h_scalar.sh
-	@p='tst_h_scalar.sh'; \
-	b='tst_h_scalar.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_formatx4.sh.log: tst_formatx4.sh
-	@p='tst_formatx4.sh'; \
-	b='tst_formatx4.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_bug324.log: tst_bug324$(EXEEXT)
-	@p='tst_bug324$(EXEEXT)'; \
-	b='tst_bug324'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-run_utf8_nc4_tests.sh.log: run_utf8_nc4_tests.sh
-	@p='run_utf8_nc4_tests.sh'; \
-	b='run_utf8_nc4_tests.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-run_back_comp_tests.sh.log: run_back_comp_tests.sh
-	@p='run_back_comp_tests.sh'; \
-	b='run_back_comp_tests.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_ncgen4_classic.sh.log: tst_ncgen4_classic.sh
-	@p='tst_ncgen4_classic.sh'; \
-	b='tst_ncgen4_classic.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_ncgen4.sh.log: tst_ncgen4.sh
-	@p='tst_ncgen4.sh'; \
-	b='tst_ncgen4.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-.test.log:
-	@p='$<'; \
-	$(am__set_b); \
-	$(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
- at am__EXEEXT_TRUE@.test$(EXEEXT).log:
- at am__EXEEXT_TRUE@	@p='$<'; \
- at am__EXEEXT_TRUE@	$(am__set_b); \
- at am__EXEEXT_TRUE@	$(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
- at am__EXEEXT_TRUE@	--log-file $$b.log --trs-file $$b.trs \
- at am__EXEEXT_TRUE@	$(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
- at am__EXEEXT_TRUE@	"$$tst" $(AM_TESTS_FD_REDIRECT)
+	  fi; \
+	  dashes="$$banner"; \
+	  skipped=""; \
+	  if test "$$skip" -ne 0; then \
+	    if test "$$skip" -eq 1; then \
+	      skipped="($$skip test was not run)"; \
+	    else \
+	      skipped="($$skip tests were not run)"; \
+	    fi; \
+	    test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
+	      dashes="$$skipped"; \
+	  fi; \
+	  report=""; \
+	  if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
+	    report="Please report to $(PACKAGE_BUGREPORT)"; \
+	    test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
+	      dashes="$$report"; \
+	  fi; \
+	  dashes=`echo "$$dashes" | sed s/./=/g`; \
+	  if test "$$failed" -eq 0; then \
+	    col="$$grn"; \
+	  else \
+	    col="$$red"; \
+	  fi; \
+	  echo "$${col}$$dashes$${std}"; \
+	  echo "$${col}$$banner$${std}"; \
+	  test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \
+	  test -z "$$report" || echo "$${col}$$report$${std}"; \
+	  echo "$${col}$$dashes$${std}"; \
+	  test "$$failed" -eq 0; \
+	else :; fi
 
 distdir: $(DISTFILES)
 	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@@ -1875,9 +1344,6 @@ install-strip:
 	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
 	fi
 mostlyclean-generic:
-	-test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
-	-test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
-	-test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
 
 clean-generic:
 	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
@@ -1980,8 +1446,8 @@ uninstall-man: uninstall-man1
 	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 recheck tags tags-am \
-	uninstall uninstall-am uninstall-binPROGRAMS uninstall-man \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
+	uninstall-am uninstall-binPROGRAMS uninstall-man \
 	uninstall-man1
 
 .PRECIOUS: Makefile
diff --git a/ncdump/cdl.h b/ncdump/cdl.h
index 87c8856..44b8671 100644
--- a/ncdump/cdl.h
+++ b/ncdump/cdl.h
@@ -17,5 +17,6 @@
 #define NC_ATT_SHUFFLE     "_Shuffle"
 #define NC_ATT_STORAGE     "_Storage"
 #define NC_ATT_NOFILL      "_NoFill"
+#define NC_ATT_NETCDF4     "_NetCDF4"
 
 #endif	/*_CDL_H_ */
diff --git a/ncdump/ncdump.c b/ncdump/ncdump.c
index f285f0e..0daf6af 100644
--- a/ncdump/ncdump.c
+++ b/ncdump/ncdump.c
@@ -25,10 +25,6 @@ int opterr;
 int optind;
 #endif
 
-#ifndef HAVE_SSIZE_T
-typedef int ssize_t;
-#endif
-
 #include <stdlib.h>
 #include <string.h>
 #include <ctype.h>
@@ -37,8 +33,8 @@ typedef int ssize_t;
 #ifdef HAVE_LOCALE_H
 #include <locale.h>
 #endif	/* HAVE_LOCALE_H */
-#include <netcdf.h>
-#include <netcdf_mem.h>
+#include "netcdf.h"
+#include "netcdf_mem.h"
 #include "utils.h"
 #include "nccomps.h"
 #include "nctime0.h"		/* new iso time and calendar stuff */
@@ -48,6 +44,11 @@ typedef int ssize_t;
 #include "indent.h"
 #include "isnan.h"
 #include "cdl.h"
+#include "nc4internal.h" /* to get name of the special properties file */
+
+#if !defined(HAVE_SSIZE_T) && !defined(H5_SIZEOF_SSIZE_T)
+typedef int ssize_t;
+#endif
 
 #define XML_VERSION "1.0"
 
@@ -116,6 +117,7 @@ usage(void)
   [-g grp1[,...]]  Data and metadata for group(s) <grp1>,... only\n\
   [-w]             With client-side caching of variables for DAP URLs\n\
   [-x]             Output XML (NcML) instead of CDL\n\
+  [-Xp]            Unconditionally suppress output of the properties attribute\n\
   file             Name of netCDF file (or URL if DAP access enabled)\n"
 
     (void) fprintf(stderr,
@@ -757,6 +759,12 @@ pr_att(
     ncatt_t att;			/* attribute */
 
     NC_CHECK( nc_inq_attname(ncid, varid, ia, att.name) );
+#ifdef ENABLE_FILEINFO
+    if (ncid == getrootid(ncid)
+        && varid == NC_GLOBAL
+        && strcmp(att.name,NCPROPS)==0)
+	return; /* will be printed elsewere */
+#endif
     NC_CHECK( nc_inq_att(ncid, varid, att.name, &att.type, &att.len) );
     att.tinfo = get_typeinfo(att.type);
 
@@ -952,7 +960,6 @@ pr_att_global_format(
     printf (" ;\n");
 }
 
-
 #ifdef USE_NETCDF4
 /*
  * Print special reserved variable attributes, such as _Chunking,
@@ -1054,6 +1061,7 @@ pr_att_specials(
 	    printf(" = \"true\" ;\n");
 	}
     }
+
     /* TODO: handle _Nbit when inquire function is available */
 
     /* TODO: handle _ScaleOffset when inquire is available */
@@ -1062,6 +1070,54 @@ pr_att_specials(
 }
 #endif /* USE_NETCDF4 */
 
+#ifdef ENABLE_FILEINFO /*=>NETCDF4*/
+static void
+pr_att_hidden(
+    int ncid,
+    int kind
+    )
+{
+    int stat;
+    size_t len;
+    char propdata[NCPROPS_LENGTH];
+
+    /* No special variable attributes for classic or 64-bit offset data */
+    if(kind == 1 || kind == 2)
+	return;
+    /* Print out Selected hidden attributes */
+    /* NCPROPS */
+    stat = nc_inq_att(ncid,NC_GLOBAL,NCPROPS,NULL,&len);
+    if(stat == NC_NOERR && len < sizeof(propdata)) {
+        stat = nc_get_att_text(ncid,NC_GLOBAL,NCPROPS,propdata);
+        if(stat == NC_NOERR) {
+            pr_att_name(ncid, "", NCPROPS);
+            /* make sure its null terminated */
+            propdata[NCPROPS_LENGTH-1] = '\0';
+            printf(" = \"%s\" ;\n",propdata);
+        }
+    }
+    /* _SuperblockVersion */
+    stat = nc_inq_att(ncid,NC_GLOBAL,SUPERBLOCKATT,NULL,&len);
+    if(stat == NC_NOERR && len == 1) {
+        int sbversion;
+        stat = nc_get_att_int(ncid,NC_GLOBAL,SUPERBLOCKATT,&sbversion);
+        if(stat == NC_NOERR) {
+            pr_att_name(ncid, "", SUPERBLOCKATT);
+            printf(" = %d ;\n",sbversion);
+        }
+    }
+    /* _IsNetcdf4 */
+    stat = nc_inq_att(ncid,NC_GLOBAL,ISNETCDF4ATT,NULL,&len);
+    if(stat == NC_NOERR && len == 1) {
+        int isnc4;
+        stat = nc_get_att_int(ncid,NC_GLOBAL,ISNETCDF4ATT,&isnc4);
+        if(stat == NC_NOERR) {
+            pr_att_name(ncid, "", ISNETCDF4ATT);
+            printf(" = %d ;\n",isnc4?1:0);
+        }
+    }
+}
+#endif /* ENABLE_FILEINFO */
 
 /*
  * Print a variable attribute for NcML
@@ -1078,6 +1134,15 @@ pr_attx(
     int attvalslen = 0;
 
     NC_CHECK( nc_inq_attname(ncid, varid, ia, att.name) );
+#ifdef ENABLE_FILEINFO
+    if (ncid == getrootid(ncid)
+	&& varid == NC_GLOBAL
+        && strcmp(att.name,NCPROPS)==0
+        && (!formatting_specs.special_atts
+            || !formatting_specs.xopt_props)
+	)
+	return;
+#endif
     NC_CHECK( nc_inq_att(ncid, varid, att.name, &att.type, &att.len) );
 
     /* Put attribute values into a single string, with blanks in between */
@@ -1325,8 +1390,11 @@ print_ud_type(int ncid, nc_type typeid) {
 		    printf(" ;\n");
 		}
             indent_out();
-/* 	    printf("}; // %s\n", type_name); */
+#if 0
+ 	    printf("}; // %s\n", type_name);
+#else
 	    printf("}; // ");
+#endif
 	    print_type_name(ncid, typeid);
 	    printf("\n");
 	}
@@ -1666,7 +1734,6 @@ do_ncdump_rec(int ncid, const char *path)
 #endif /* USE_NETCDF4 */
    }
 
-   /* get global attributes */
    if (ngatts > 0 || formatting_specs.special_atts) {
       printf ("\n");
       indent_out();
@@ -1680,9 +1747,14 @@ do_ncdump_rec(int ncid, const char *path)
    }
    if (is_root && formatting_specs.special_atts) { /* output special attribute
 					   * for format variant */
+#ifdef ENABLE_FILEINFO
+       pr_att_hidden(ncid, kind);
+#endif
        pr_att_global_format(ncid, kind);
    }
 
+   fflush(stdout);
+
    /* output variable data, unless "-h" option specified header only
     * or this group is not in list of groups specified by "-g"
     * option  */
@@ -2019,6 +2091,7 @@ main(int argc, char *argv[])
     bool_t xml_out = false;    /* if true, output NcML instead of CDL */
     bool_t kind_out = false;	/* if true, just output kind of netCDF file */
     bool_t kind_out_extended = false;	/* output inq_format vs inq_format_extended */
+    int Xp_flag = 0;    /* indicate that -Xp flag was set */
 
 #if defined(WIN32) || defined(msdos) || defined(WIN64)
     putenv("PRINTF_EXPONENT_DIGITS=2"); /* Enforce unix/linux style exponent formatting. */
@@ -2132,6 +2205,9 @@ main(int argc, char *argv[])
 	    case 'm':
 	      formatting_specs.xopt_inmemory = 1;
 	      break;
+	    case 'p': /* suppress the properties attribute */
+	      Xp_flag = 1; /* record that this flag was set */
+	      break;
 	    default:
 	      error("invalid value for -X option: %s", optarg);
 	      break;
@@ -2142,6 +2218,16 @@ main(int argc, char *argv[])
 	  exit(EXIT_FAILURE);
       }
 
+    /* Decide xopt_props */
+    if(formatting_specs.special_atts && Xp_flag == 1)
+        formatting_specs.xopt_props = 0;
+    else if(formatting_specs.special_atts && Xp_flag == 0)
+        formatting_specs.xopt_props = 1;
+    else if(!formatting_specs.special_atts)
+	formatting_specs.xopt_props = 0;
+    else
+	formatting_specs.xopt_props = 0;
+
     set_max_len(max_len);
 
     argc -= optind;
diff --git a/ncdump/ncdump.h b/ncdump/ncdump.h
index 3378b81..4773441 100644
--- a/ncdump/ncdump.h
+++ b/ncdump/ncdump.h
@@ -43,7 +43,7 @@ typedef struct {			/* specification for how to format dump */
 				 * for optimization characteristics:
 				 * _Compression, _Chunking,
 				 * _Endianness, _Format, _Checksum,
-				 * _NoFill */
+				 * _NoFill, _NetCDF4 */
 
     Nclang data_lang;		/* Specifies index conventions used in data
 				 * comments, either LANG_C (C, 0-based,
@@ -78,6 +78,7 @@ typedef struct {			/* specification for how to format dump */
     int nc_mode;                /* mode as reported by inq_format_extended */
 
     int xopt_inmemory;      /* Use in-memory option; testing only */
+    int xopt_props ;      /* 1=>Unconditionally Suppress properties attribute */
 } fspec_t;
 
 #endif	/*_NCDUMP_H_ */
diff --git a/ncdump/ref_tst_ncf213.cdl b/ncdump/ref_tst_ncf213.cdl
index 72f7891..e298e74 100644
--- a/ncdump/ref_tst_ncf213.cdl
+++ b/ncdump/ref_tst_ncf213.cdl
@@ -44,5 +44,8 @@ variables:
 		var5:_NoFill = "true" ;
 
 // global attributes:
+ 		:_NCProperties = "version=1|netcdflibversion=0.0.0|hdf5libversion=0.0.0" ;
+		:_SuperblockVersion = 0 ;
+		:_IsNetcdf4 = 1 ;
 		:_Format = "netCDF-4" ;
 }
diff --git a/ncdump/ref_tst_special_atts.cdl b/ncdump/ref_tst_special_atts.cdl
index d759d25..200ead0 100644
--- a/ncdump/ref_tst_special_atts.cdl
+++ b/ncdump/ref_tst_special_atts.cdl
@@ -45,6 +45,9 @@ variables:
 		var5:_NoFill = "true" ;
 
 // global attributes:
+                :_NCProperties = "version=1|netcdflibversion=0.0.0|hdf5libversion=0.0.0" ;
+		:_SuperblockVersion = 0 ;
+		:_IsNetcdf4 = 1 ;
 		:_Format = "netCDF-4" ;
 data:
 }
diff --git a/ncdump/tst_fileinfo.c b/ncdump/tst_fileinfo.c
new file mode 100644
index 0000000..452862d
--- /dev/null
+++ b/ncdump/tst_fileinfo.c
@@ -0,0 +1,157 @@
+/* This is part of the netCDF package. Copyright 2008 University
+   Corporation for Atmospheric Research/Unidata See COPYRIGHT file for
+   conditions of use. See www.unidata.ucar.edu for more info.
+*/
+   
+/*
+Test _NCProperties and other special attributes
+*/
+
+#include "config.h"
+#ifdef HAVE_UNISTD_H
+#include "unistd.h"
+#endif
+
+#include <hdf5.h>
+#include "nc_tests.h"
+#include "netcdf.h"
+#include "nc4internal.h"
+
+#define NC4FILE "nc4_fileinfo.nc"
+#define HDFFILE "hdf5_fileinfo.hdf"
+#define INT_ATT_NAME "int_attr"
+#define INT_VAR_NAME "int_var"
+#define GROUPNAME "subgroup"
+#define DIMNAME "time"
+
+int
+main(int argc, char **argv)
+{
+    printf("\n*** Testing 'Fileinfo attributes.\n");
+
+    {
+	hid_t fileid;
+	hid_t fcplid;
+	hid_t scalar_spaceid;
+    
+        printf("*** creating test file using HDF5 directly %s...", HDFFILE);
+
+        /* Create scalar dataspace */
+        if((scalar_spaceid = H5Screate(H5S_SCALAR)) < 0) ERR;
+
+        /* Set creation ordering for file, so we can revise its contents later */
+        if((fcplid = H5Pcreate(H5P_FILE_CREATE)) < 0) ERR;
+        if(H5Pset_link_creation_order(fcplid, H5P_CRT_ORDER_TRACKED) < 0) ERR;
+        if(H5Pset_attr_creation_order(fcplid, H5P_CRT_ORDER_TRACKED) < 0) ERR;
+
+        /* Create new file, using default properties */
+        if((fileid = H5Fcreate(HDFFILE, H5F_ACC_TRUNC, fcplid, H5P_DEFAULT)) < 0) ERR;
+        /* Close file creation property list */
+        if(H5Pclose(fcplid) < 0) ERR;
+
+        /* Add attributes to root group */
+        {
+            hid_t scalar_spaceid = -1;
+            hid_t attid = -1;
+
+            /* Create scalar dataspace */
+            if((scalar_spaceid = H5Screate(H5S_SCALAR)) < 0) ERR;
+        
+            /* Create attribute with native integer datatype on object */
+            if((attid = H5Acreate2(fileid, INT_ATT_NAME, H5T_NATIVE_INT, scalar_spaceid, H5P_DEFAULT, H5P_DEFAULT)) < 0) ERR;
+            if(H5Aclose(attid) < 0) ERR;
+
+            /* Clean up objects created */
+            if(H5Sclose(scalar_spaceid) < 0) ERR;
+        }
+
+        /* Close rest */
+        if(H5Sclose(scalar_spaceid) < 0) ERR;
+        if(H5Fclose(fileid) < 0) ERR;
+    }
+
+    {
+	int root, grpid, varid, stat, natts;
+	int data = 17;
+	const char* sdata = "text";
+	char ncprops[8192];
+	size_t len;
+	int dimid;
+
+        printf("*** creating netcdf-4 test file using netCDF %s...", NC4FILE);
+			
+	if(nc_create(NC4FILE,NC_WRITE|NC_CLOBBER|NC_NETCDF4,&root)!=0) ERR;
+	/* Create global attribute */
+	if(nc_put_att_int(root,NC_GLOBAL,INT_ATT_NAME,NC_INT,1,&data)!=0) ERR;
+	/* Create global variable */
+	if(nc_def_var(root,INT_VAR_NAME,NC_INT,0,NULL,&varid)!=0) ERR;
+	/* Create attribute on var */
+	if(nc_put_att_int(root,varid,INT_ATT_NAME,NC_INT,1,&data)!=0) ERR;
+	/* Create global subgroup */
+	if(nc_def_grp(root,GROUPNAME,&grpid)!=0) ERR;
+	/* Create global attribute in the group */
+	if(nc_put_att_int(grpid,NC_GLOBAL,INT_ATT_NAME,NC_INT,1,&data)!=0) ERR;
+	/* Create _NCProperties as var attr and as subgroup attribute */
+	if(nc_put_att_text(grpid,NC_GLOBAL,NCPROPS,strlen(sdata),sdata)!=0) ERR;
+	if(nc_put_att_text(root,varid,NCPROPS,strlen(sdata),sdata)!=0) ERR;
+	/* Create var + dimension to cause e.g. dimscales to appear */
+	if(nc_def_dim(root,DIMNAME,(size_t)4,&dimid)!=0) ERR;
+	if(nc_def_var(root,DIMNAME,NC_INT,1,&dimid,&varid)!=0) ERR; /* same name */
+	/* Close, then re-open */
+	if(nc_close(root)) ERR;
+	if(nc_open(NC4FILE,NC_WRITE|NC_NETCDF4,&root)!=0) ERR;
+
+	/* Is all invisible attributes actually invisible vis-a-vis nc_inq? */
+        if(nc_inq(root,NULL,NULL,&natts,NULL)!=0) ERR;
+	if(natts != 1) ERR;
+
+	/* Now, fiddle with the NCPROPS attribute */
+
+	/* Get its value */
+	if(nc_inq_att(root,NC_GLOBAL,NCPROPS,NULL,&len)!=0) ERR;
+	if(nc_get_att_text(root,NC_GLOBAL,NCPROPS,ncprops)!=0) ERR;
+
+	/*Overwrite _NCProperties root attribute; should fail */
+	stat = nc_put_att_text(root,NC_GLOBAL,NCPROPS,strlen(sdata),sdata);
+	if(stat == NC_NOERR) ERR;
+
+	/* Delete; should fail */
+	stat = nc_del_att(root,NC_GLOBAL,NCPROPS);
+        if(stat != NC_ENOTATT) ERR;
+
+	/* Ditto _SuperblockVersion */
+
+	/* Get its value */
+	if(nc_inq_att(root,NC_GLOBAL,SUPERBLOCKATT,NULL,&len)!=0) ERR;
+	if(len != 1) ERR;
+	if(nc_get_att_int(root,NC_GLOBAL,SUPERBLOCKATT,&data)!=0) ERR;
+
+	/*Overwrite; should fail */
+	stat = nc_put_att_int(root,NC_GLOBAL,NCPROPS,NC_INT,1,&data);
+	if(stat == NC_NOERR) ERR;
+
+	/* Delete; should fail */
+	stat = nc_del_att(root,NC_GLOBAL,SUPERBLOCKATT);
+        if(stat == NC_NOERR) ERR;
+
+	/* Ditto _IsNetcdf4 */
+
+	/* Get its value */
+	if(nc_inq_att(root,NC_GLOBAL,ISNETCDF4ATT,NULL,&len)!=0) ERR;
+	if(len != 1) ERR;
+	if(nc_get_att_int(root,NC_GLOBAL,ISNETCDF4ATT,&data)!=0) ERR;
+
+	/*Overwrite; should fail */
+	stat = nc_put_att_int(root,NC_GLOBAL,ISNETCDF4ATT,NC_INT,1,&data);
+	if(stat == NC_NOERR) ERR;
+
+	/* Delete; should fail */
+	stat = nc_del_att(root,NC_GLOBAL,ISNETCDF4ATT);
+        if(stat == NC_NOERR) ERR;
+
+	if(nc_close(root)!=0) ERR;
+    }        
+
+    SUMMARIZE_ERR;
+    FINAL_RESULTS;
+}
diff --git a/ncdump/tst_fileinfo.sh b/ncdump/tst_fileinfo.sh
new file mode 100755
index 0000000..f1f2254
--- /dev/null
+++ b/ncdump/tst_fileinfo.sh
@@ -0,0 +1,59 @@
+#!/bin/sh
+if test "x$SETX" = x1 ; then echo "file=$0"; set -x ; fi
+set -e
+echo ""
+
+if test "x$builddir" = "x"; then builddir=`pwd`; fi
+if test "x$srcdir" = "x"; then srcdir=`dirname $0`; fi
+
+# Make buildir absolute
+cd $builddir
+builddir=`pwd`
+
+# Make srcdir be absolute
+cd $srcdir
+srcdir=`pwd`
+
+cd $builddir
+
+export verbose
+export srcdir
+export builddir
+
+EXIT=0
+
+NCF=$srcdir/nc4_fileinfo.nc
+HDF=$srcdir/hdf5_fileinfo.hdf
+NF=ref_tst_compounds4.nc
+
+# Do a false negative test 
+rm -f ./tmp
+if $builddir/ncdump -s $builddir/$NF | fgrep '_IsNetcdf4 = 0' > ./tmp ; then
+   echo "Pass: False negative for file: $NF"
+else
+   echo "FAIL: False negative for file: $NF"
+fi
+rm -f ./tmp
+
+if ./tst_fileinfo > /dev/null ; then
+   # look at the _IsNetcdf4 flag
+   N_IS=`${builddir}/ncdump -s $NCF | fgrep '_IsNetcdf4' | tr -d ' ;'`
+   N_IS=`echo $N_IS | cut -d= -f2`
+   H_IS=`${builddir}/ncdump -s $HDF | fgrep '_IsNetcdf4' | tr -d ' ;'`
+   H_IS=`echo $H_IS | cut -d= -f2`
+   if test "x$N_IS" = 'x0' ;then
+     echo "FAIL: $NCF is marked as not netcdf-4"
+   fi
+   if test "x$H_IS" = 'x1' ;then
+     echo "FAIL: $HDF is marked as netcdf-4"
+   fi
+else
+echo "FAIL: tst_fileinfo"
+EXIT=1
+fi
+
+rm -f $NCF
+rm -f $HDF
+
+exit $EXIT
+
diff --git a/ncdump/tst_lengths.sh b/ncdump/tst_lengths.sh
index 9fe1cff..d61fa1f 100755
--- a/ncdump/tst_lengths.sh
+++ b/ncdump/tst_lengths.sh
@@ -1,5 +1,21 @@
 #!/bin/sh
 if test "x$SETX" = x1 ; then echo "file=$0"; set -x ; fi
+
+if test "x$srcdir" = x ; then
+srcdir=`pwd`
+fi
+
+# It is unreasonable to test actual lengths of files
+# (even netcdf-3 files).
+#However, the files created in this script are used in later ones
+
+../ncgen/ncgen -b ${srcdir}/small.cdl
+../ncgen/ncgen -b ${srcdir}/small2.cdl
+
+exit
+
+
+
 # This shell script tests lengths of small netcdf files and tests 
 # that rewriting a numeric value doesn't change file length
 # $Id: tst_lengths.sh,v 1.10 2008/08/07 00:07:52 ed Exp $
@@ -34,9 +50,6 @@ if test "x$SETX" = x1 ; then echo "file=$0"; set -x ; fi
 # echo "netcdf small {variables: byte t; data: t = 1;}" > small.cdl
 set -e
 
-if test "x$srcdir" = x ; then
-srcdir=`pwd`
-fi
 
 echo ""
 echo "*** testing length of classic file"
diff --git a/ncdump/tst_netcdf4.sh b/ncdump/tst_netcdf4.sh
index 36ba2d7..5c7dafe 100755
--- a/ncdump/tst_netcdf4.sh
+++ b/ncdump/tst_netcdf4.sh
@@ -82,7 +82,12 @@ if test -f ./tst_unicode -o -f ./tst_unicode.exe ; then
   #diff -b tst_unicode.cdl $srcdir/ref_tst_unicode.cdl
 fi
 ./tst_special_atts
-./ncdump -c -s tst_special_atts.nc | sed 's/e+0/e+/g' > tst_special_atts.cdl
+./ncdump -c -s tst_special_atts.nc \
+    | sed 's/e+0/e+/g' \
+    | sed -e 's/netcdflibversion=.*[|]/netcdflibversion=0.0.0|/' \
+    | sed -e 's/hdf5libversion=.*"/hdf5libversion=0.0.0"/' \
+    | sed -e 's|_SuperblockVersion = [0-9]|_SuperblockVersion = 0|' \
+    | cat > tst_special_atts.cdl
 echo "*** comparing tst_special_atts.cdl with ref_tst_special_atts.cdl..."
 diff -b tst_special_atts.cdl $srcdir/ref_tst_special_atts.cdl
 
diff --git a/ncdump/tst_netcdf4_4.sh b/ncdump/tst_netcdf4_4.sh
index b76da76..82cfad6 100755
--- a/ncdump/tst_netcdf4_4.sh
+++ b/ncdump/tst_netcdf4_4.sh
@@ -84,7 +84,11 @@ else # Non-MINGW Platforms
     # Exercise Jira NCF-213 bug fix
 #    rm -f tst_ncf213.cdl tst_ncf213.nc
     ../ncgen/ncgen -b -o tst_ncf213.nc $srcdir/ref_tst_ncf213.cdl
-    ./ncdump -s -h tst_ncf213.nc >tst_ncf213.cdl
+    ./ncdump -s -h tst_ncf213.nc \
+    | sed -e 's/netcdflibversion=.*[|]/netcdflibversion=0.0.0|/' \
+    | sed -e 's/hdf5libversion=.*"/hdf5libversion=0.0.0"/' \
+    | sed -e 's|_SuperblockVersion = [0-9]|_SuperblockVersion = 0|' \
+    | cat  >tst_ncf213.cdl
     # Now compare
     ok=1;
     if diff -b $srcdir/ref_tst_ncf213.cdl tst_ncf213.cdl ; then ok=1; else ok=0; fi
diff --git a/ncdump/utils.c b/ncdump/utils.c
index 3a8e75a..412ea2d 100644
--- a/ncdump/utils.c
+++ b/ncdump/utils.c
@@ -745,3 +745,20 @@ nc_inq_grps_full(int rootid, int *numgrps, int *grpids)
     nc_free_giter(giter);
     return stat;
 }
+
+#ifdef ENABLE_FILEINFO
+int
+getrootid(int grpid)
+{
+    int current = grpid;
+    int parent = current;
+    /* see if root id */
+    for(;;) {
+        int stat = nc_inq_grp_parent(current,&parent);
+        if(stat) break;
+	current = parent;
+    }
+    return current;
+}
+#endif
+
diff --git a/ncdump/utils.h b/ncdump/utils.h
index 0f7c756..9a25e47 100644
--- a/ncdump/utils.h
+++ b/ncdump/utils.h
@@ -150,6 +150,7 @@ extern int nc_next_giter(ncgiter_t *iterp, int *grpid);
  * Release memory allocated for group iterator.
  */
 extern void nc_free_giter(ncgiter_t *iterp);
+extern int getrootid(int grpid);
 
 #ifdef __cplusplus
 }
diff --git a/ncgen/CMakeLists.txt b/ncgen/CMakeLists.txt
index 41a8d6b..65077d9 100644
--- a/ncgen/CMakeLists.txt
+++ b/ncgen/CMakeLists.txt
@@ -1,4 +1,4 @@
-SET(ncgen_FILES generate.c main.c cdata.c bindata.c genchar.c cvt.c data.c debug.c escapes.c genc.c genbin.c generr.c genlib.c getfill.c odom.c offsets.c semantics.c ncgeny.c dump.c util.c bytebuffer.c list.c genf77.c f77data.c genj.c jdata.c nc_iter.c ConvertUTF.c  )
+SET(ncgen_FILES generate.c main.c cdata.c bindata.c genchar.c cvt.c data.c debug.c escapes.c genc.c genbin.c generr.c genlib.c getfill.c odom.c offsets.c semantics.c ncgeny.c dump.c util.c bytebuffer.c list.c genf77.c f77data.c genj.c jdata.c nc_iter.c ConvertUTF.c ncgen.h )
 
 IF(USE_X_GETOPT)
   SET(ncgen_FILES ${ncgen_FILES} XGetopt.c)
@@ -56,6 +56,7 @@ ADD_CUSTOM_COMMAND(
   COMMAND flex -Pncg -B ncgen.l
   COMMAND rm -f ncgenl.c
   COMMAND mv lex.ncg.c ncgenl.c
+
   COMMAND bison -pncg -t -d ncgen.y
   COMMAND rm -f ncgeny.c ncgeny.h
   COMMAND mv ncgen.tab.c ncgeny.c
diff --git a/ncgen/Makefile.am b/ncgen/Makefile.am
index 6c36e2e..d6ed0e8 100644
--- a/ncgen/Makefile.am
+++ b/ncgen/Makefile.am
@@ -43,7 +43,7 @@ CLEANFILES = c0.nc c0_64.nc c0_4.nc c0_4c.nc ref_camrun.c \
 # autoconf will forcibly delete files of the name *.tab.*
 
 makeparser::
-	flex -L -Pncg -8 ncgen.l
+	flex -Pncg -8 ncgen.l
 	rm -f ncgenl.c
 	sed -e s/lex.ncg.c/ncgenl.c/g <lex.ncg.c >ncgenl.c
 	bison -pncg -t -d ncgen.y
diff --git a/ncgen/Makefile.in b/ncgen/Makefile.in
index e19e7e1..3f410d0 100644
--- a/ncgen/Makefile.in
+++ b/ncgen/Makefile.in
@@ -250,163 +250,8 @@ am__tty_colors = { \
     std=''; \
   fi; \
 }
-am__recheck_rx = ^[ 	]*:recheck:[ 	]*
-am__global_test_result_rx = ^[ 	]*:global-test-result:[ 	]*
-am__copy_in_global_log_rx = ^[ 	]*:copy-in-global-log:[ 	]*
-# A command that, given a newline-separated list of test names on the
-# standard input, print the name of the tests that are to be re-run
-# upon "make recheck".
-am__list_recheck_tests = $(AWK) '{ \
-  recheck = 1; \
-  while ((rc = (getline line < ($$0 ".trs"))) != 0) \
-    { \
-      if (rc < 0) \
-        { \
-          if ((getline line2 < ($$0 ".log")) < 0) \
-	    recheck = 0; \
-          break; \
-        } \
-      else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
-        { \
-          recheck = 0; \
-          break; \
-        } \
-      else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
-        { \
-          break; \
-        } \
-    }; \
-  if (recheck) \
-    print $$0; \
-  close ($$0 ".trs"); \
-  close ($$0 ".log"); \
-}'
-# A command that, given a newline-separated list of test names on the
-# standard input, create the global log from their .trs and .log files.
-am__create_global_log = $(AWK) ' \
-function fatal(msg) \
-{ \
-  print "fatal: making $@: " msg | "cat >&2"; \
-  exit 1; \
-} \
-function rst_section(header) \
-{ \
-  print header; \
-  len = length(header); \
-  for (i = 1; i <= len; i = i + 1) \
-    printf "="; \
-  printf "\n\n"; \
-} \
-{ \
-  copy_in_global_log = 1; \
-  global_test_result = "RUN"; \
-  while ((rc = (getline line < ($$0 ".trs"))) != 0) \
-    { \
-      if (rc < 0) \
-         fatal("failed to read from " $$0 ".trs"); \
-      if (line ~ /$(am__global_test_result_rx)/) \
-        { \
-          sub("$(am__global_test_result_rx)", "", line); \
-          sub("[ 	]*$$", "", line); \
-          global_test_result = line; \
-        } \
-      else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
-        copy_in_global_log = 0; \
-    }; \
-  if (copy_in_global_log) \
-    { \
-      rst_section(global_test_result ": " $$0); \
-      while ((rc = (getline line < ($$0 ".log"))) != 0) \
-      { \
-        if (rc < 0) \
-          fatal("failed to read from " $$0 ".log"); \
-        print line; \
-      }; \
-      printf "\n"; \
-    }; \
-  close ($$0 ".trs"); \
-  close ($$0 ".log"); \
-}'
-# Restructured Text title.
-am__rst_title = { sed 's/.*/   &   /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
-# Solaris 10 'make', and several other traditional 'make' implementations,
-# pass "-e" to $(SHELL), and POSIX 2008 even requires this.  Work around it
-# by disabling -e (using the XSI extension "set +e") if it's set.
-am__sh_e_setup = case $$- in *e*) set +e;; esac
-# Default flags passed to test drivers.
-am__common_driver_flags = \
-  --color-tests "$$am__color_tests" \
-  --enable-hard-errors "$$am__enable_hard_errors" \
-  --expect-failure "$$am__expect_failure"
-# To be inserted before the command running the test.  Creates the
-# directory for the log if needed.  Stores in $dir the directory
-# containing $f, in $tst the test, in $log the log.  Executes the
-# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
-# passes TESTS_ENVIRONMENT.  Set up options for the wrapper that
-# will run the test scripts (or their associated LOG_COMPILER, if
-# thy have one).
-am__check_pre = \
-$(am__sh_e_setup);					\
-$(am__vpath_adj_setup) $(am__vpath_adj)			\
-$(am__tty_colors);					\
-srcdir=$(srcdir); export srcdir;			\
-case "$@" in						\
-  */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;;	\
-    *) am__odir=.;; 					\
-esac;							\
-test "x$$am__odir" = x"." || test -d "$$am__odir" 	\
-  || $(MKDIR_P) "$$am__odir" || exit $$?;		\
-if test -f "./$$f"; then dir=./;			\
-elif test -f "$$f"; then dir=;				\
-else dir="$(srcdir)/"; fi;				\
-tst=$$dir$$f; log='$@'; 				\
-if test -n '$(DISABLE_HARD_ERRORS)'; then		\
-  am__enable_hard_errors=no; 				\
-else							\
-  am__enable_hard_errors=yes; 				\
-fi; 							\
-case " $(XFAIL_TESTS) " in				\
-  *[\ \	]$$f[\ \	]* | *[\ \	]$$dir$$f[\ \	]*) \
-    am__expect_failure=yes;;				\
-  *)							\
-    am__expect_failure=no;;				\
-esac; 							\
-$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
-# A shell command to get the names of the tests scripts with any registered
-# extension removed (i.e., equivalently, the names of the test logs, with
-# the '.log' extension removed).  The result is saved in the shell variable
-# '$bases'.  This honors runtime overriding of TESTS and TEST_LOGS.  Sadly,
-# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
-# since that might cause problem with VPATH rewrites for suffix-less tests.
-# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
-am__set_TESTS_bases = \
-  bases='$(TEST_LOGS)'; \
-  bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
-  bases=`echo $$bases`
-RECHECK_LOGS = $(TEST_LOGS)
-AM_RECURSIVE_TARGETS = check recheck
-TEST_SUITE_LOG = test-suite.log
-TEST_EXTENSIONS = @EXEEXT@ .test
-LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
-LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS)
-am__set_b = \
-  case '$@' in \
-    */*) \
-      case '$*' in \
-        */*) b='$*';; \
-          *) b=`echo '$@' | sed 's/\.log$$//'`; \
-       esac;; \
-    *) \
-      b='$*';; \
-  esac
-am__test_logs1 = $(TESTS:=.log)
-am__test_logs2 = $(am__test_logs1:@EXEEXT at .log=.log)
-TEST_LOGS = $(am__test_logs2:.test.log=.log)
-TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
-TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
-	$(TEST_LOG_FLAGS)
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \
-	$(top_srcdir)/lib_flags.am $(top_srcdir)/test-driver
+	$(top_srcdir)/lib_flags.am
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
@@ -612,7 +457,7 @@ CLEANFILES = c0.nc c0_64.nc c0_4.nc c0_4c.nc ref_camrun.c \
 all: all-am
 
 .SUFFIXES:
-.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs
+.SUFFIXES: .c .lo .o .obj
 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/lib_flags.am $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
@@ -857,175 +702,98 @@ cscopelist-am: $(am__tagged_files)
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
-# Recover from deleted '.trs' file; this should ensure that
-# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
-# both 'foo.log' and 'foo.trs'.  Break the recipe in two subshells
-# to avoid problems with "make -n".
-.log.trs:
-	rm -f $< $@
-	$(MAKE) $(AM_MAKEFLAGS) $<
-
-# Leading 'am--fnord' is there to ensure the list of targets does not
-# expand to empty, as could happen e.g. with make check TESTS=''.
-am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
-am--force-recheck:
-	@:
-
-$(TEST_SUITE_LOG): $(TEST_LOGS)
-	@$(am__set_TESTS_bases); \
-	am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
-	redo_bases=`for i in $$bases; do \
-	              am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
-	            done`; \
-	if test -n "$$redo_bases"; then \
-	  redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
-	  redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
-	  if $(am__make_dryrun); then :; else \
-	    rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
-	  fi; \
-	fi; \
-	if test -n "$$am__remaking_logs"; then \
-	  echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
-	       "recursion detected" >&2; \
-	elif test -n "$$redo_logs"; then \
-	  am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
-	fi; \
-	if $(am__make_dryrun); then :; else \
-	  st=0;  \
-	  errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
-	  for i in $$redo_bases; do \
-	    test -f $$i.trs && test -r $$i.trs \
-	      || { echo "$$errmsg $$i.trs" >&2; st=1; }; \
-	    test -f $$i.log && test -r $$i.log \
-	      || { echo "$$errmsg $$i.log" >&2; st=1; }; \
+check-TESTS: $(TESTS)
+	@failed=0; all=0; xfail=0; xpass=0; skip=0; \
+	srcdir=$(srcdir); export srcdir; \
+	list=' $(TESTS) '; \
+	$(am__tty_colors); \
+	if test -n "$$list"; then \
+	  for tst in $$list; do \
+	    if test -f ./$$tst; then dir=./; \
+	    elif test -f $$tst; then dir=; \
+	    else dir="$(srcdir)/"; fi; \
+	    if $(TESTS_ENVIRONMENT) $${dir}$$tst $(AM_TESTS_FD_REDIRECT); then \
+	      all=`expr $$all + 1`; \
+	      case " $(XFAIL_TESTS) " in \
+	      *[\ \	]$$tst[\ \	]*) \
+		xpass=`expr $$xpass + 1`; \
+		failed=`expr $$failed + 1`; \
+		col=$$red; res=XPASS; \
+	      ;; \
+	      *) \
+		col=$$grn; res=PASS; \
+	      ;; \
+	      esac; \
+	    elif test $$? -ne 77; then \
+	      all=`expr $$all + 1`; \
+	      case " $(XFAIL_TESTS) " in \
+	      *[\ \	]$$tst[\ \	]*) \
+		xfail=`expr $$xfail + 1`; \
+		col=$$lgn; res=XFAIL; \
+	      ;; \
+	      *) \
+		failed=`expr $$failed + 1`; \
+		col=$$red; res=FAIL; \
+	      ;; \
+	      esac; \
+	    else \
+	      skip=`expr $$skip + 1`; \
+	      col=$$blu; res=SKIP; \
+	    fi; \
+	    echo "$${col}$$res$${std}: $$tst"; \
 	  done; \
-	  test $$st -eq 0 || exit 1; \
-	fi
-	@$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
-	ws='[ 	]'; \
-	results=`for b in $$bases; do echo $$b.trs; done`; \
-	test -n "$$results" || results=/dev/null; \
-	all=`  grep "^$$ws*:test-result:"           $$results | wc -l`; \
-	pass=` grep "^$$ws*:test-result:$$ws*PASS"  $$results | wc -l`; \
-	fail=` grep "^$$ws*:test-result:$$ws*FAIL"  $$results | wc -l`; \
-	skip=` grep "^$$ws*:test-result:$$ws*SKIP"  $$results | wc -l`; \
-	xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
-	xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
-	error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
-	if test `expr $$fail + $$xpass + $$error` -eq 0; then \
-	  success=true; \
-	else \
-	  success=false; \
-	fi; \
-	br='==================='; br=$$br$$br$$br$$br; \
-	result_count () \
-	{ \
-	    if test x"$$1" = x"--maybe-color"; then \
-	      maybe_colorize=yes; \
-	    elif test x"$$1" = x"--no-color"; then \
-	      maybe_colorize=no; \
+	  if test "$$all" -eq 1; then \
+	    tests="test"; \
+	    All=""; \
+	  else \
+	    tests="tests"; \
+	    All="All "; \
+	  fi; \
+	  if test "$$failed" -eq 0; then \
+	    if test "$$xfail" -eq 0; then \
+	      banner="$$All$$all $$tests passed"; \
+	    else \
+	      if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
+	      banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
+	    fi; \
+	  else \
+	    if test "$$xpass" -eq 0; then \
+	      banner="$$failed of $$all $$tests failed"; \
 	    else \
-	      echo "$@: invalid 'result_count' usage" >&2; exit 4; \
+	      if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
+	      banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
 	    fi; \
-	    shift; \
-	    desc=$$1 count=$$2; \
-	    if test $$maybe_colorize = yes && test $$count -gt 0; then \
-	      color_start=$$3 color_end=$$std; \
+	  fi; \
+	  dashes="$$banner"; \
+	  skipped=""; \
+	  if test "$$skip" -ne 0; then \
+	    if test "$$skip" -eq 1; then \
+	      skipped="($$skip test was not run)"; \
 	    else \
-	      color_start= color_end=; \
+	      skipped="($$skip tests were not run)"; \
 	    fi; \
-	    echo "$${color_start}# $$desc $$count$${color_end}"; \
-	}; \
-	create_testsuite_report () \
-	{ \
-	  result_count $$1 "TOTAL:" $$all   "$$brg"; \
-	  result_count $$1 "PASS: " $$pass  "$$grn"; \
-	  result_count $$1 "SKIP: " $$skip  "$$blu"; \
-	  result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
-	  result_count $$1 "FAIL: " $$fail  "$$red"; \
-	  result_count $$1 "XPASS:" $$xpass "$$red"; \
-	  result_count $$1 "ERROR:" $$error "$$mgn"; \
-	}; \
-	{								\
-	  echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" |	\
-	    $(am__rst_title);						\
-	  create_testsuite_report --no-color;				\
-	  echo;								\
-	  echo ".. contents:: :depth: 2";				\
-	  echo;								\
-	  for b in $$bases; do echo $$b; done				\
-	    | $(am__create_global_log);					\
-	} >$(TEST_SUITE_LOG).tmp || exit 1;				\
-	mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG);			\
-	if $$success; then						\
-	  col="$$grn";							\
-	 else								\
-	  col="$$red";							\
-	  test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG);		\
-	fi;								\
-	echo "$${col}$$br$${std}"; 					\
-	echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}";	\
-	echo "$${col}$$br$${std}"; 					\
-	create_testsuite_report --maybe-color;				\
-	echo "$$col$$br$$std";						\
-	if $$success; then :; else					\
-	  echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}";		\
-	  if test -n "$(PACKAGE_BUGREPORT)"; then			\
-	    echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}";	\
-	  fi;								\
-	  echo "$$col$$br$$std";					\
-	fi;								\
-	$$success || exit 1
-
-check-TESTS:
-	@list='$(RECHECK_LOGS)';           test -z "$$list" || rm -f $$list
-	@list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
-	@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
-	@set +e; $(am__set_TESTS_bases); \
-	log_list=`for i in $$bases; do echo $$i.log; done`; \
-	trs_list=`for i in $$bases; do echo $$i.trs; done`; \
-	log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
-	$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
-	exit $$?;
-recheck: all 
-	@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
-	@set +e; $(am__set_TESTS_bases); \
-	bases=`for i in $$bases; do echo $$i; done \
-	         | $(am__list_recheck_tests)` || exit 1; \
-	log_list=`for i in $$bases; do echo $$i.log; done`; \
-	log_list=`echo $$log_list`; \
-	$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
-	        am__force_recheck=am--force-recheck \
-	        TEST_LOGS="$$log_list"; \
-	exit $$?
-run_tests.sh.log: run_tests.sh
-	@p='run_tests.sh'; \
-	b='run_tests.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-run_nc4_tests.sh.log: run_nc4_tests.sh
-	@p='run_nc4_tests.sh'; \
-	b='run_nc4_tests.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-.test.log:
-	@p='$<'; \
-	$(am__set_b); \
-	$(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
- at am__EXEEXT_TRUE@.test$(EXEEXT).log:
- at am__EXEEXT_TRUE@	@p='$<'; \
- at am__EXEEXT_TRUE@	$(am__set_b); \
- at am__EXEEXT_TRUE@	$(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
- at am__EXEEXT_TRUE@	--log-file $$b.log --trs-file $$b.trs \
- at am__EXEEXT_TRUE@	$(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
- at am__EXEEXT_TRUE@	"$$tst" $(AM_TESTS_FD_REDIRECT)
+	    test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
+	      dashes="$$skipped"; \
+	  fi; \
+	  report=""; \
+	  if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
+	    report="Please report to $(PACKAGE_BUGREPORT)"; \
+	    test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
+	      dashes="$$report"; \
+	  fi; \
+	  dashes=`echo "$$dashes" | sed s/./=/g`; \
+	  if test "$$failed" -eq 0; then \
+	    col="$$grn"; \
+	  else \
+	    col="$$red"; \
+	  fi; \
+	  echo "$${col}$$dashes$${std}"; \
+	  echo "$${col}$$banner$${std}"; \
+	  test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \
+	  test -z "$$report" || echo "$${col}$$report$${std}"; \
+	  echo "$${col}$$dashes$${std}"; \
+	  test "$$failed" -eq 0; \
+	else :; fi
 
 distdir: $(DISTFILES)
 	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@@ -1085,9 +853,6 @@ install-strip:
 	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
 	fi
 mostlyclean-generic:
-	-test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
-	-test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
-	-test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
 
 clean-generic:
 	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
@@ -1185,9 +950,8 @@ uninstall-man: uninstall-man1
 	install-strip installcheck installcheck-am installdirs \
 	maintainer-clean maintainer-clean-generic mostlyclean \
 	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
-	pdf pdf-am ps ps-am recheck tags tags-am uninstall \
-	uninstall-am uninstall-binPROGRAMS uninstall-man \
-	uninstall-man1
+	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
+	uninstall-binPROGRAMS uninstall-man uninstall-man1
 
 .PRECIOUS: Makefile
 
@@ -1198,7 +962,7 @@ uninstall-man: uninstall-man1
 # autoconf will forcibly delete files of the name *.tab.*
 
 makeparser::
-	flex -L -Pncg -8 ncgen.l
+	flex -Pncg -8 ncgen.l
 	rm -f ncgenl.c
 	sed -e s/lex.ncg.c/ncgenl.c/g <lex.ncg.c >ncgenl.c
 	bison -pncg -t -d ncgen.y
diff --git a/ncgen/cvt.c b/ncgen/cvt.c
index 3391eb8..e7d1646 100644
--- a/ncgen/cvt.c
+++ b/ncgen/cvt.c
@@ -570,7 +570,7 @@ case CASE(NC_NIL,NC_STRING):
 #ifdef IGNORE
 /* Force an Opaque or string to conform to a given length*/
 void
-setprimlength(Constant* prim, unsigned long len)
+setprimlength(NCConstant* prim, unsigned long len)
 {
     ASSERT(isprimplus(prim->nctype));
     if(prim->nctype == NC_STRING) {
diff --git a/ncgen/data.h b/ncgen/data.h
index 58502f3..2ba073d 100644
--- a/ncgen/data.h
+++ b/ncgen/data.h
@@ -177,9 +177,6 @@ void gen_charattr(Datalist*, Bytebuffer*);
 void gen_charvlen(Datalist*, Bytebuffer*);
 void gen_chararray(struct Dimset*, int, Datalist*, Bytebuffer*, Datalist* fillsrc);
 
-/* Mnemonic */
-#define UNKNOWN ((size_t)0)
-
 typedef enum ListClass {
     LISTDATA, LISTATTR, LISTVLEN, LISTCOMPOUND, LISTFIELDARRAY
 } ListClass;
diff --git a/ncgen/genc.c b/ncgen/genc.c
index 42fe04f..f733085 100644
--- a/ncgen/genc.c
+++ b/ncgen/genc.c
@@ -414,7 +414,7 @@ genc_defineglobalspecials(void)
     if(usingclassic) return;
     if(!/*Main.*/format_attribute) return;
     /* Watch out, this is a global Attribute */
-    format = kind_string(/*Main.*/format_flag);
+    format = kind_string(globalspecials._Format);
     bbprintf0(stmt,"%sstat = nc_put_att_text(ncid, NC_GLOBAL, \"_Format\", 1, \"%s\");\n",
 	          indented(1),
 		  format);
diff --git a/ncgen/genlib.h b/ncgen/genlib.h
index b5974d0..9450b0d 100644
--- a/ncgen/genlib.h
+++ b/ncgen/genlib.h
@@ -152,7 +152,6 @@ extern void jflush(void);
 
 /* from: main.c */
 extern int k_flag;    /* -k value from command line*/
-extern int format_flag;   /* _Format attribute value (same range as -k flag) */
 extern int format_attribute; /* 1 if format came from _FORMAT attribute */
 extern int enhanced_flag; /* 1 => netcdf-4 constructs appear in the parse */
 extern int cdf5_flag; /* 1 => cdf-5 unsigned types in the parse */
@@ -160,6 +159,7 @@ extern int specials_flag; /* 1 => special attributes are present */
 extern int usingclassic;   /* 1 => k_flag == 1|2|5 */
 extern int k_flag;
 extern int ncloglevel;
+extern GlobalSpecialData globalspecials;
 
 /* Global data */
 
@@ -199,6 +199,6 @@ extern void* emalloc (size_t);
 extern void* ecalloc (size_t);
 extern void* erealloc(void*,size_t);
 
-extern char* specialname(int flag);
+extern const char* specialname(int tag);
 
 #endif /*!NC_GENLIB_H*/
diff --git a/ncgen/includes.h b/ncgen/includes.h
index b5b7653..f028b6c 100644
--- a/ncgen/includes.h
+++ b/ncgen/includes.h
@@ -46,6 +46,8 @@
 #include "genlib.h"
 #include "util.h"
 #include "debug.h"
+#include "nc.h"
+#include "nc4internal.h"
 
 extern int specialconstants;
 
diff --git a/ncgen/main.c b/ncgen/main.c
index 40fb998..31c03d3 100644
--- a/ncgen/main.c
+++ b/ncgen/main.c
@@ -38,7 +38,6 @@ int header_only;
 
 /* flags for tracking what output format to use */
 int k_flag;    /* > 0  => -k was specified on command line*/
-int format_flag;   /* _Format attribute value (same range as -k flag) */
 int format_attribute; /* 1=>format came from format attribute */
 int enhanced_flag; /* 1 => netcdf-4 */
 int cdf5_flag; /* 1 => cdf5 | maybe netcdf-4 */
@@ -48,6 +47,8 @@ int cmode_modifier;
 int diskless;
 int ncloglevel;
 
+GlobalSpecialData globalspecials;
+
 char* binary_ext = ".nc";
 
 size_t nciterbuffersize;
@@ -231,7 +232,6 @@ main(
     nciterbuffersize = 0;
 
     k_flag = 0;
-    format_flag = 0;
     format_attribute = 0;
     enhanced_flag = 0;
     cdf5_flag = 0;
@@ -242,6 +242,7 @@ main(
 #else
     ncloglevel = -1;
 #endif
+    memset(&globalspecials,0,sizeof(GlobalSpecialData));
 
 #if _CRAYMPP && 0
     /* initialize CRAY MPP parallel-I/O library */
@@ -512,7 +513,7 @@ main(
     }
 
     if(k_flag == 0)
-      k_flag = format_flag;
+      k_flag = globalspecials._Format;
 
     if(cdf5_flag && !enhanced_flag && k_flag == 0)
       k_flag = 5;
diff --git a/ncgen/ncgen.h b/ncgen/ncgen.h
index 5566e98..eb3ea9b 100644
--- a/ncgen/ncgen.h
+++ b/ncgen/ncgen.h
@@ -4,7 +4,7 @@
  *   Copyright 1993, UCAR/Unidata
  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
  *   $Header: /upc/share/CVS/netcdf-3/ncgen/ncgen.h,v 1.18 2010/06/01 15:34:53 ed Exp $
- *********************************************************************/
+*********************************************************************/
 
 #ifdef _MSC_VER
 #include <float.h>
@@ -71,7 +71,7 @@ typedef nc_type nc_subclass;
 
 /*
 Define data structure
-to hold special attribute values
+xto hold special attribute values
 for a given variable.
 Global values are kept as
 various C global variables
@@ -79,6 +79,7 @@ various C global variables
 
 /* Define a bit set for indicating which*/
 /* specials were explicitly specified*/
+/* See also: ncgen.y.tag2name */
 #define _STORAGE_FLAG       0x001
 #define _CHUNKSIZES_FLAG    0x002
 #define _FLETCHER32_FLAG    0x004
@@ -87,7 +88,17 @@ various C global variables
 #define _ENDIAN_FLAG        0x020
 #define _NOFILL_FLAG        0x040
 #define _FILLVALUE_FLAG     0x080
-#define _FORMAT_FLAG        0x100
+#define _NCPROPS_FLAG       0x100
+#define _ISNETCDF4_FLAG     0x200
+#define _SUPERBLOCK_FLAG    0x400
+#define _FORMAT_FLAG        0x800
+
+
+extern struct Specialtoken {
+    char* name;
+    int   token;
+    int   tag;
+} specials[];
 
 /* Define an enumeration of supported languages */
 typedef enum Language {
@@ -120,6 +131,13 @@ typedef struct Specialdata {
     int           _Fill ;        /* 0 => false, 1 => true WATCHOUT: this is inverse of NOFILL*/
 } Specialdata;
 
+typedef struct GlobalSpecialdata {
+    int           _Format ;      /* kflag */
+    const char*   _NCProperties ;
+    int           _IsNetcdf4 ;   /* 0 => false, 1 => true */
+    int           _Superblock  ; /* HDF5 file superblock version */
+} GlobalSpecialData;
+
 /* Track a set of dimensions*/
 /* (Note: the netcdf type system is deficient here)*/
 typedef struct Dimset {
@@ -143,7 +161,7 @@ typedef struct Typeinfo {
 	nc_type         typecode;
         unsigned long   offset;   /* fields in struct*/
         unsigned long   alignment;/* fields in struct*/
-        NCConstant        econst;   /* for enum values*/
+        NCConstant      econst;   /* for enum values*/
         Dimset          dimset;     /* for NC_VAR/NC_FIELD/NC_ATT*/
         size_t   size;     /* for opaque, compound, etc.*/
         size_t   nelems;   /* size in terms of # of datalist constants
@@ -190,10 +208,10 @@ typedef struct Symbol {  /* symbol table entry*/
         /* use more than one part*/
         Typeinfo  typ; /* type info for e.g. var, att, etc.*/
         Varinfo   var;
-        Attrinfo  att;        
+        Attrinfo  att;
         Diminfo   dim;
         Groupinfo grp;
- 	Reference ref; /* symbol is really a referene to another symbol*/ 
+ 	Reference ref; /* symbol is really a referene to another symbol*/
 	/* Misc pieces of info*/
 	int             lineno;  /* at point of creation*/
 	int		touched; /* for sorting*/
diff --git a/ncgen/ncgen.l b/ncgen/ncgen.l
index 689c1ec..3b40244 100644
--- a/ncgen/ncgen.l
+++ b/ncgen/ncgen.l
@@ -34,6 +34,10 @@
 
 /* Fill value used by ncdump from version 2.4 and later.  Should match
    definition of FILL_STRING in ../ncdump/vardata.h */
+
+#include "ncgen.h"
+#include "ncgeny.h"
+
 #define FILL_STRING "_"
 #define XDR_INT32_MIN (-2147483647-1)
 #define XDR_INT32_MAX 2147483647
@@ -115,19 +119,19 @@ static int tagmatch(nc_type nct, int tag);
 static int nct2lexeme(nc_type nct);
 static int collecttag(char* text, char** stagp);
 
-static struct Specialtoken {
-    char* name;
-    int   token;
-} specials[] = {
-{"_FillValue",_FILLVALUE},
-{"_Format",_FORMAT},
-{"_Storage",_STORAGE},
-{"_ChunkSizes",_CHUNKSIZES},
-{"_Fletcher32",_FLETCHER32},
-{"_DeflateLevel",_DEFLATELEVEL},
-{"_Shuffle",_SHUFFLE},
-{"_Endianness",_ENDIANNESS},
-{"_NoFill",_NOFILL},
+struct Specialtoken specials[] = {
+{"_FillValue",_FILLVALUE,_FILLVALUE_FLAG},
+{"_Format",_FORMAT,_FORMAT_FLAG},
+{"_Storage",_STORAGE,_STORAGE_FLAG},
+{"_ChunkSizes",_CHUNKSIZES,_CHUNKSIZES_FLAG},
+{"_Fletcher32",_FLETCHER32,_FLETCHER32_FLAG},
+{"_DeflateLevel",_DEFLATELEVEL,_DEFLATE_FLAG},
+{"_Shuffle",_SHUFFLE,_SHUFFLE_FLAG},
+{"_Endianness",_ENDIANNESS,_ENDIAN_FLAG},
+{"_NoFill",_NOFILL,_NOFILL_FLAG},
+{"_NCProperties",_NCPROPS,_NCPROPS_FLAG},
+{"_IsNetcdf4",_ISNETCDF4,_ISNETCDF4_FLAG},
+{"_SuperblockVersion",_SUPERBLOCK,_SUPERBLOCK_FLAG},
 {NULL,0} /* null terminate */
 };
 
@@ -206,7 +210,7 @@ NUMBER       [+-]?[0-9][0-9]*[Uu]?([BbSs]|[Ll]|[Ll][Ll])?
 DBLNUMBER    [+-]?[0-9]*\.[0-9]*{exp}?[LlDd]?|[+-]?[0-9]*{exp}[LlDd]?
 FLTNUMBER    [+-]?[0-9]*\.[0-9]*{exp}?[Ff]|[+-]?[0-9]*{exp}[Ff]
 
-SPECIAL "_FillValue"|"_Format"|"_Storage"|"_ChunkSizes"|"_Fletcher32"|"_DeflateLevel"|"_Shuffle"|"_Endianness"|"_NoFill"
+SPECIAL "_FillValue"|"_Format"|"_Storage"|"_ChunkSizes"|"_Fletcher32"|"_DeflateLevel"|"_Shuffle"|"_Endianness"|"_NoFill"|"_NCProperties"|"_IsNetcdf4"|"_SuperblockVersion"
 
 USASCII   [\x01-\x7F]
 
diff --git a/ncgen/ncgen.y b/ncgen/ncgen.y
index 7a6b1b4..fcc9e7a 100644
--- a/ncgen/ncgen.y
+++ b/ncgen/ncgen.y
@@ -14,6 +14,8 @@ static char SccsId[] = "$Id: ncgen.y,v 1.42 2010/05/18 21:32:46 dmh Exp $";
 */
 #include        "includes.h"
 #include        "offsets.h"
+#include        "ncgeny.h"
+#include        "ncgen.h"
 
 /* Following are in ncdump (for now)*/
 /* Need some (unused) definitions to get it to compile */
@@ -69,6 +71,8 @@ char* primtypenames[PRIMNO] = {
 "string"
 };
 
+static int GLOBAL_SPECIAL = _NCPROPS_FLAG | _ISNETCDF4_FLAG | _SUPERBLOCK_FLAG | _FORMAT_FLAG ;
+
 /*Defined in ncgen.l*/
 extern int lineno;              /* line number for error messages */
 extern Bytebuffer* lextext;           /* name or string with escapes removed */
@@ -112,6 +116,7 @@ static Symbol* makespecial(int tag, Symbol* vsym, Symbol* tsym, void* data, int
 static int containsfills(Datalist* list);
 static void datalistextend(Datalist* dl, NCConstant* con);
 static void vercheck(int ncid);
+static long long extractint(NCConstant con);
 
 int yylex(void);
 
@@ -185,6 +190,9 @@ NCConstant       constant;
         _ENDIANNESS
         _NOFILL
         _FLETCHER32
+	_NCPROPS
+	_ISNETCDF4
+	_SUPERBLOCK
 	DATASETID
 
 %type <sym> ident typename primtype dimd varspec
@@ -438,9 +446,9 @@ dimdeclist:     dimdecl
                 ;
 
 dimdecl:
-	  dimd '=' UINT64_CONST
+	  dimd '=' constint
               {
-		$1->dim.declsize = (size_t)uint64_val;
+		$1->dim.declsize = (size_t)extractint($3);
 #ifdef GENDEBUG1
 fprintf(stderr,"dimension: %s = %llu\n",$1->name,(unsigned long long)$1->dim.declsize);
 #endif
@@ -688,7 +696,13 @@ type_var_ref:
 attrdecllist: /*empty*/ {} | attrdecl ';' attrdecllist {} ;
 
 attrdecl:
-	  ':' ident '=' datalist
+	  ':' _NCPROPS '=' conststring
+	    {$$ = makespecial(_NCPROPS_FLAG,NULL,NULL,(void*)&$4,ATTRGLOBAL);}
+	| ':' _ISNETCDF4 '=' constbool
+	    {$$ = makespecial(_ISNETCDF4_FLAG,NULL,NULL,(void*)&$4,ATTRGLOBAL);}
+	| ':' _SUPERBLOCK '=' constint
+	    {$$ = makespecial(_SUPERBLOCK_FLAG,NULL,NULL,(void*)&$4,ATTRGLOBAL);}
+	| ':' ident '=' datalist
 	    { $$=makeattribute($2,NULL,NULL,$4,ATTRGLOBAL);}
 	| typeref type_var_ref ':' ident '=' datalist
 	    {Symbol* tsym = $1; Symbol* vsym = $2; Symbol* asym = $4;
@@ -1099,24 +1113,6 @@ basetypefor(nc_type nctype)
     return primsymbols[nctype];
 }
 
-char*
-specialname(int flag)
-{
-    switch (flag) {
-    case _FILLVALUE_FLAG: return "_FillValue";
-    case _FORMAT_FLAG: return "_Format";
-    case _STORAGE_FLAG: return "_Storage";
-    case _CHUNKSIZES_FLAG: return "_ChunkSizes";
-    case _FLETCHER32_FLAG: return "_Fletcher32";
-    case _DEFLATE_FLAG: return "_DeflateLevel";
-    case _SHUFFLE_FLAG: return "_Shuffle";
-    case _ENDIAN_FLAG: return "_Endianness";
-    case _NOFILL_FLAG: return "_NoFill";
-    default: break;
-    }
-    return "<unknown>";
-}
-
 static int
 truefalse(NCConstant* con, int tag)
 {
@@ -1153,7 +1149,7 @@ makespecial(int tag, Symbol* vsym, Symbol* tsym, void* data, int isconst)
     char* sdata = NULL;
     int idata =  -1;
 
-    if(tag == _FORMAT_FLAG) {
+    if((GLOBAL_SPECIAL & tag) != 0) {
         if(vsym != NULL) {
             derror("_Format: must be global attribute");
             vsym = NULL;
@@ -1180,6 +1176,7 @@ makespecial(int tag, Symbol* vsym, Symbol* tsym, void* data, int isconst)
     switch (tag) {
     case _FLETCHER32_FLAG:
     case _SHUFFLE_FLAG:
+    case _ISNETCDF4_FLAG:
     case _NOFILL_FLAG:
 	iconst.nctype = (con->nctype == NC_STRING?NC_STRING:NC_INT);
 	convert1(con,&iconst);
@@ -1187,6 +1184,7 @@ makespecial(int tag, Symbol* vsym, Symbol* tsym, void* data, int isconst)
 	break;
     case _FORMAT_FLAG:
     case _STORAGE_FLAG:
+    case _NCPROPS_FLAG:
     case _ENDIAN_FLAG:
 	iconst.nctype = NC_STRING;
 	convert1(con,&iconst);
@@ -1195,6 +1193,7 @@ makespecial(int tag, Symbol* vsym, Symbol* tsym, void* data, int isconst)
 	else
 	    derror("%s: illegal value",specialname(tag));
 	break;
+    case _SUPERBLOCK_FLAG:
     case _DEFLATE_FLAG:
 	iconst.nctype = NC_INT;
 	convert1(con,&iconst);
@@ -1214,12 +1213,12 @@ makespecial(int tag, Symbol* vsym, Symbol* tsym, void* data, int isconst)
 	/* Watch out: this is a global attribute */
 	struct Kvalues* kvalue;
 	int found = 0;
-
 	/* Use the table in main.c */
         for(kvalue = legalkinds; kvalue->name; kvalue++) {
           if(sdata) {
             if(strcmp(sdata, kvalue->name) == 0) {
-              /*Main.*/format_flag = kvalue->k_flag;
+              globalspecials._Format = kvalue->k_flag;
+	      /*Main.*/format_attribute = 1;
               found = 1;
               break;
             }
@@ -1227,13 +1226,17 @@ makespecial(int tag, Symbol* vsym, Symbol* tsym, void* data, int isconst)
 	}
 	if(!found)
 	    derror("_Format: illegal value: %s",sdata);
-	/*Main.*/format_attribute = 1;
+    } else if((GLOBAL_SPECIAL & tag) != 0) {
+	if(tag == _ISNETCDF4_FLAG)
+	    globalspecials._IsNetcdf4 = tf;
+	else if(tag == _SUPERBLOCK_FLAG)
+	    globalspecials._Superblock = idata;
+	else if(tag == _NCPROPS_FLAG)
+	    globalspecials._NCProperties = strdup(sdata);
     } else {
         Specialdata* special;
-
         /* Set up special info */
         special = &vsym->var.special;
-
         if(tag == _FILLVALUE_FLAG) {
             special->_Fillvalue = list;
             /* fillvalue must be a single value*/
@@ -1293,7 +1296,7 @@ makespecial(int tag, Symbol* vsym, Symbol* tsym, void* data, int isconst)
                 special->_Fill = (1 - tf); /* negate */
                 special->flags |= _NOFILL_FLAG;
                 break;
-            case _CHUNKSIZES_FLAG: {
+          case _CHUNKSIZES_FLAG: {
                 int i;
                 special->nchunks = list->length;
                 special->_ChunkSizes = (size_t*)emalloc(sizeof(size_t)*special->nchunks);
@@ -1327,17 +1330,18 @@ makeattribute(Symbol* asym,
 {
     asym->objectclass = NC_ATT;
     asym->data = data;
-    addtogroup(asym);
     switch (kind) {
     case ATTRVAR:
         asym->att.var = vsym;
         asym->typ.basetype = tsym;
         listpush(attdefs,(void*)asym);
+        addtogroup(asym);
 	break;
     case ATTRGLOBAL:
         asym->att.var = NULL; /* NULL => NC_GLOBAL*/
         asym->typ.basetype = tsym;
         listpush(gattdefs,(void*)asym);
+        addtogroup(asym);
 	break;
     default: PANIC1("unexpected attribute type: %d",kind);
     }
@@ -1348,6 +1352,24 @@ makeattribute(Symbol* asym,
     return asym;
 }
 
+static long long
+extractint(NCConstant con)
+{
+    switch (con.nctype) {
+    case NC_BYTE: return (long long)(con.value.int8v);
+    case NC_SHORT: return (long long)(con.value.int16v);
+    case NC_INT: return (long long)(con.value.int32v);
+    case NC_UBYTE: return (long long)(con.value.uint8v);
+    case NC_USHORT: return (long long)(con.value.uint16v);
+    case NC_UINT: return (long long)(con.value.uint32v);
+    case NC_INT64: return (long long)(con.value.int64v);
+    default:
+	derror("Not a signed integer type: %d",con.nctype);
+	break;
+    }
+    return 0;
+}
+
 static int
 containsfills(Datalist* list)
 {
@@ -1387,6 +1409,17 @@ vercheck(int tid)
     }
 }
 
+const char*
+specialname(int tag)
+{
+    struct Specialtoken* spp = specials;
+    for(;spp->name;spp++) {
+	if(spp->tag == tag)
+	    return spp->name;
+    }
+    return "<unknown>";
+}
+
 /*
 Since the arguments are all simple constants,
 we can evaluate the function immediately
diff --git a/ncgen/ncgenl.c b/ncgen/ncgenl.c
index 3b8187a..e1d4941 100644
--- a/ncgen/ncgenl.c
+++ b/ncgen/ncgenl.c
@@ -388,7 +388,7 @@ struct yy_trans_info
 	flex_int32_t yy_verify;
 	flex_int32_t yy_nxt;
 	};
-static yyconst flex_int16_t yy_accept[384] =
+static yyconst flex_int16_t yy_accept[417] =
     {   0,
         0,    0,   45,   45,    0,    0,   49,   47,    1,   43,
        47,   47,   47,   47,   37,   31,   35,   35,   34,   34,
@@ -403,35 +403,39 @@ static yyconst flex_int16_t yy_accept[384] =
 
        34,   34,   34,   34,   34,   34,   34,   34,   34,   34,
        34,   34,   34,   34,   34,   34,   34,   34,   34,   34,
-       34,   34,    0,    0,   45,    0,   46,   33,   39,    0,
-        0,    0,    0,   37,    0,    0,   37,    2,   31,    0,
-        0,    0,    0,    0,    0,    0,    4,    0,    0,   34,
-       34,   34,   34,   34,   34,   30,   27,   34,   34,   34,
+       34,   34,   34,    0,    0,   45,    0,   46,   33,   39,
+        0,    0,    0,    0,   37,    0,    0,   37,    2,   31,
+        0,    0,    0,    0,    0,    0,    0,    4,    0,    0,
+       34,   34,   34,   34,   34,   34,   30,   27,   34,   34,
        34,   34,   34,   34,   34,   34,   34,   34,   34,   34,
-       34,   34,   34,   34,   34,   34,   14,   34,   27,   34,
        34,   34,   34,   34,   34,   34,   34,   34,   34,   34,
-       34,    0,   42,    0,    0,   37,    0,   31,    0,    0,
-
-        0,    0,    0,    0,    0,    4,   36,   36,    0,   34,
-       34,   28,   34,   34,   29,   34,   34,   34,   34,   34,
-       34,   34,   34,   34,   34,   10,    9,   34,   34,   34,
-       34,    6,   34,   34,   34,   34,   14,   34,   34,   34,
-        8,   34,   34,   34,   34,   15,   34,   34,   34,   34,
-        0,    0,   28,    0,   31,    0,    0,    0,    0,    0,
-        0,    0,   34,   34,   34,   34,   34,   34,   34,   34,
+       14,   34,   27,   34,   34,   34,   34,   34,   34,   34,
+       34,   34,   34,   34,   34,    0,   42,    0,    0,   37,
+
+        0,   31,    0,    0,    0,    0,    0,    0,    0,    4,
+       36,   36,    0,   34,   34,   28,   34,   34,   29,   34,
+       34,   34,   34,   34,   34,   34,   34,   34,   34,   34,
+       34,   34,   10,    9,   34,   34,   34,   34,    6,   34,
+       34,   34,   34,   14,   34,   34,   34,    8,   34,   34,
+       34,   34,   15,   34,   34,   34,   34,    0,    0,   28,
+        0,   31,    0,    0,    0,    0,    0,    0,    0,   34,
+       34,   34,   34,   34,   34,   34,   34,   34,   34,   34,
        34,   34,   34,   34,   34,   34,   34,   23,   34,   34,
        34,   16,   34,   34,   34,   34,   12,   34,   34,   11,
-       34,   34,   15,   34,   34,   34,   40,   41,    0,    0,
 
+       34,   34,   15,   34,   34,   34,   40,   41,    0,    0,
         0,    0,   34,   34,   34,   25,   34,   34,   34,   34,
-       34,   34,   34,   34,   34,   34,   34,   34,   18,   24,
-       34,    7,    5,   20,   17,   34,   34,   13,   34,    0,
-        0,   34,   34,   34,   34,   34,   34,   34,   34,   34,
-       32,   34,   34,   34,   34,   34,   34,   34,   34,    0,
-       34,   26,   34,   34,   34,   34,   34,   34,    5,   34,
-       34,   34,   34,   26,   26,   19,   34,   34,   34,   34,
-       34,   34,   34,   34,   34,   34,   34,   34,   22,   34,
-       21,   34,    0
+       34,   34,   34,   34,   34,   34,   34,   34,   34,   34,
+       34,   18,   24,   34,    7,    5,   20,   17,   34,   34,
+       13,   34,    0,    0,   34,   34,   34,   34,   34,   34,
+       34,   34,   34,   32,   34,   34,   34,   34,   34,   34,
+       34,   34,   34,   34,   34,    0,   34,   26,   34,   34,
+       34,   34,   34,   34,   34,   34,   34,    5,   34,   34,
+       34,   34,   26,   26,   19,   34,   34,   34,   34,   34,
+       34,   34,   34,   34,   34,   34,   34,   34,   34,   34,
+
+       34,   34,   22,   34,   34,   34,   21,   34,   34,   34,
+       34,   34,   34,   34,   34,    0
     } ;
 
 static yyconst flex_int32_t yy_ec[256] =
@@ -443,387 +447,415 @@ static yyconst flex_int32_t yy_ec[256] =
         5,    8,    9,    5,   10,   11,   12,   13,   14,   15,
        16,   17,   14,   18,   14,   19,   19,   20,    5,    5,
         5,    5,    5,   21,   22,   23,   24,   25,   26,   27,
-       28,   28,   29,   28,   28,   30,   31,   32,   28,   28,
-       28,   28,   33,   34,   35,   36,   28,   37,   28,   28,
-        5,   38,    5,    5,   39,    5,   40,   41,   42,   43,
-
-       44,   45,   46,   47,   48,   28,   49,   50,   51,   52,
-       53,   54,   55,   56,   57,   58,   59,   60,   28,   37,
-       61,   62,   63,    5,    5,    5,    1,   64,   64,   64,
-       64,   64,   64,   64,   64,   64,   64,   64,   64,   64,
-       64,   64,   64,   64,   64,   64,   64,   64,   64,   64,
-       64,   64,   64,   64,   64,   64,   64,   64,   64,   64,
-       64,   64,   64,   64,   64,   64,   64,   64,   64,   64,
-       64,   64,   64,   64,   64,   64,   64,   64,   64,   64,
-       64,   64,   64,   64,   64,   64,   64,   64,   64,   64,
-       64,   65,   65,   65,   65,   65,   65,   65,   65,   65,
+       28,   28,   29,   28,   28,   30,   31,   32,   28,   33,
+       28,   28,   34,   35,   36,   37,   28,   38,   28,   28,
+        5,   39,    5,    5,   40,    5,   41,   42,   43,   44,
 
+       45,   46,   47,   48,   49,   28,   50,   51,   52,   53,
+       54,   55,   56,   57,   58,   59,   60,   61,   28,   38,
+       62,   63,   64,    5,    5,    5,    1,   65,   65,   65,
        65,   65,   65,   65,   65,   65,   65,   65,   65,   65,
-       65,   65,   65,   65,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,   66,   66,   66,   66,   66,   66,   66,
-       66,   66,   66,   66,   66,   66,   66,   66,   66,   67,
-       67,   67,   67,   67,   67,   67,   67,    1,    1,    1,
+       65,   65,   65,   65,   65,   65,   65,   65,   65,   65,
+       65,   65,   65,   65,   65,   65,   65,   65,   65,   65,
+       65,   65,   65,   65,   65,   65,   65,   65,   65,   65,
+       65,   65,   65,   65,   65,   65,   65,   65,   65,   65,
+       65,   65,   65,   65,   65,   65,   65,   65,   65,   65,
+       65,   66,   66,   66,   66,   66,   66,   66,   66,   66,
+
+       66,   66,   66,   66,   66,   66,   66,   66,   66,   66,
+       66,   66,   66,   66,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,   67,   67,   67,   67,   67,   67,   67,
+       67,   67,   67,   67,   67,   67,   67,   67,   67,   68,
+       68,   68,   68,   68,   68,   68,   68,    1,    1,    1,
         1,    1,    1,    1,    1
     } ;
 
-static yyconst flex_int32_t yy_meta[68] =
+static yyconst flex_int32_t yy_meta[69] =
     {   0,
         1,    1,    2,    1,    1,    1,    3,    4,    5,    5,
         6,    7,    8,    8,    8,    8,    8,    8,    8,    1,
         5,    9,    9,    9,    9,   10,    9,   11,   12,   13,
-       11,   11,   13,   11,   11,   11,   11,   11,   11,    9,
-        9,    9,    9,   10,    9,   11,   11,   11,   11,   13,
-       11,   11,   11,   11,   11,   11,   13,   11,   11,   11,
-       11,   11,   14,    1,   11,   11,   11
+       11,   11,   11,   13,   11,   11,   11,   11,   11,   11,
+        9,    9,    9,    9,   10,    9,   11,   11,   11,   11,
+       13,   11,   11,   11,   11,   11,   11,   13,   11,   11,
+       11,   11,   11,   14,    1,   11,   11,   11
     } ;
 
-static yyconst flex_int16_t yy_base[402] =
+static yyconst flex_int16_t yy_base[435] =
     {   0,
-        0,    0,  345,  343,  285,  283,  344, 2153,   66, 2153,
-       63,  301,   60,   61,   93,   83,  140,  300,   50,   60,
-      191,   64,   95,  154,  102,  198,  198,  180,  195,  228,
-      284,  188,  213,  221,  232,  252,  237,  245,  267,  263,
-      297,  275,  267,  263,  258,  313,  308,    0, 2153,   78,
-       86, 2153,  313,  302,  342,    0,  271,  356,  255,    0,
-     2153,  367, 2153, 2153,    0,  340,  374,  242,  220,  218,
-      240, 2153,   53,  141,    0,  329,  393,  210,  208,  207,
-      370,   75,  400,  373,  396,  381,  386,  417,  404,  427,
-      420,  430,  434,  437,  460,  452,  473,  476,  483,  486,
-
-      497,  494,  506,  509,  516,  532,  528,  539,  549,  542,
-      546,  552,  582,  572,  565,  586,  589,  605,  608,  626,
-      620,  639,  203,  188,  242,  237, 2153,    0, 2153,  237,
-      683,  236,  665,  694,  195,  712,  732,    0,  650,  491,
-      748,  175,  173,  171,  170,  168,  146,  164,  163,  700,
-      704,  722,  734,  747,  740,  743,  752,  755,  764,  787,
-      790,  777,  796,  803,  799,  808,  833,  838,  822,  841,
-      845,  852,  856,  863,  875,  878,  908,  889,  893,  915,
-      896,  882,  912,  926,  932,  929,  945,  948,  968,  952,
-      982,  131, 2153, 1008,    0, 2153,   48,  989, 1023,  129,
-
-      125,  124,  123,  122,  121,  293,   92, 2153,  114,  993,
-     1006, 1012, 1015, 1027, 1019, 1030, 1024, 1037, 1050, 1061,
-     1067, 1070, 1074, 1085, 1082, 1091, 1104, 1107, 1123, 1115,
-     1126, 1130, 1140, 1145, 1137, 1148, 1162, 1183, 1179, 1171,
-     1186, 1196, 1193, 1209, 1226, 1239, 1233, 1229, 1246, 1249,
-      165,  158, 2153,  100, 1243, 1313,   82,   81,   80,   77,
-       75,   71, 1259, 1293, 1289, 1263, 1303, 1296, 1300, 1306,
-     1312, 1315, 1345, 1336, 1349, 1352, 1361, 2153, 1366, 1369,
-     1386, 1383, 1399, 1402, 1409, 1417, 1392, 1422, 1425, 1406,
-     1439, 1432, 1443, 1447, 1458, 1462, 2153, 2153,   84,   64,
-
-       36,   35, 1473, 1455, 1477, 1480, 1492, 1498, 1495, 1503,
-     1510, 1533, 1516, 1528, 1541, 1546, 1549, 1571, 1558, 2153,
-     1564, 1567, 1580, 2153, 1583, 1597, 1602, 1588, 1606,   39,
-       30, 1613, 1621, 1632, 1651, 1636, 1647, 1643, 1654, 1662,
-     1658, 1667, 1692, 1688, 1684, 1700, 1704, 1697, 1708,   28,
-     1723, 1734, 1753, 1742, 1746, 1749, 1758, 1765, 1768, 1784,
-     1799, 1802, 1789,   36, 1806, 1809, 1814, 1819, 1832, 1839,
-     1844, 1850, 1858, 1855, 1870, 1862, 1875, 1894, 2153, 1900,
-     2153, 1905, 2153, 1972, 1986, 2000, 2014, 2023, 2032, 2041,
-     2054, 2068, 2081, 2095, 2105, 2111, 2119, 2121, 2127, 2133,
-
-     2139
+        0,    0,  325,  321,  264,  255,  318, 2347,   67, 2347,
+       64,  269,   61,   62,   95,   77,  136,  259,   51,   61,
+      188,   97,  118,  150,   65,  195,  233,  153,  183,  222,
+      241,  202,  207,  213,  238,  246,  243,  257,  268,  264,
+      298,  276,  221,  219,  218,  270,  236,    0, 2347,   79,
+       87, 2347,  244,  238,  344,    0,  206,  358,  190,    0,
+     2347,  370, 2347, 2347,    0,  342,  377,  177,  175,  174,
+      200, 2347,   54,  377,    0,  254,  397,  171,  170,  169,
+      358,   85,  404,  373,  376,  398,  391,  406,  412,  417,
+      421,  428,  432,  451,  454,  443,  473,  476,  486,  489,
+
+      494,  499,  511,  508,  520,  530,  546,  542,  550,  553,
+      556,  560,  563,  566,  586,  598,  602,  605,  608,  623,
+      612,  644,  647,  168,  167,  222,  217, 2347,    0, 2347,
+      221,  680,  219,  703,  710,  179,  728,  749,    0,  691,
+      666,  765,  159,  158,  135,  130,  128,  651,  125,  123,
+      739,  716,  721,  751,  764,  770,  757,  775,  783,  760,
+      794,  800,  806,  809,  813,  824,  820,  844,  839,  830,
+      854,  850,  862,  869,  874,  886,  904,  893,  908,  917,
+      947,  934,  912,  964,  943,  954,  900,  930,  950,  967,
+      980,  984,  989, 1004, 1010,  118, 2347,  735,    0, 2347,
+
+       50, 1015, 1047,  117,  115,  112,  110,  108,  104,  904,
+       72, 2347,  103, 1028, 1034, 1041, 1045, 1049, 1052, 1058,
+     1075, 1071, 1082, 1093, 1088, 1101, 1106, 1113, 1097, 1132,
+     1118, 1137, 1067, 1123, 1148, 1157, 1144, 1162, 1127, 1167,
+     1153, 1192, 1197, 1179, 1202, 1209, 1183, 1213, 1223, 1218,
+     1234, 1227, 1260, 1249, 1267, 1264, 1270,  160,  154, 2347,
+      107, 1275, 1340,   93,   91,   77,   73,   72,   70, 1284,
+     1310, 1314, 1327, 1330, 1317, 1323, 1333, 1349, 1363, 1366,
+     1353, 1369, 1374, 1399, 1383, 1387, 1404, 2347, 1417, 1413,
+     1437, 1420, 1423, 1434, 1453, 1467, 1430, 1456, 1443, 1474,
+
+     1477, 1489, 1486, 1498, 1492, 1507, 2347, 2347,   85,   65,
+       59,   36, 1532, 1523, 1511, 1528, 1545, 1548, 1542, 1553,
+     1563, 1578, 1566, 1584, 1598, 1589, 1603, 1620, 1633, 1610,
+     1640, 1629, 2347, 1645, 1651, 1654, 2347, 1659, 1664, 1676,
+     1671, 1685,   39,   27, 1694, 1702, 1710, 1690, 1715, 1720,
+     1727, 1724, 1734, 1745, 1759, 1765, 1769, 1776, 1779, 1784,
+     1795, 1799, 1802, 1809, 1819,   24, 1814, 1832, 1849, 1840,
+     1853, 1845, 1858, 1865, 1884, 1870, 1875, 1889, 1895, 1900,
+     1905, 1919,   36, 1908, 1914, 1925, 1939, 1930, 1944, 1963,
+     1977, 1956, 1960, 1951, 1981, 1974, 1994, 1998, 2019, 1986,
+
+     2007, 2030, 2347, 2033, 2037, 2040, 2347, 2044, 2051, 2075,
+     2082, 2086, 2089, 2092, 2098, 2347, 2166, 2180, 2194, 2208,
+     2217, 2226, 2235, 2248, 2262, 2275, 2289, 2299, 2305, 2313,
+     2315, 2321, 2327, 2333
     } ;
 
-static yyconst flex_int16_t yy_def[402] =
+static yyconst flex_int16_t yy_def[435] =
     {   0,
-      383,    1,  384,  384,  385,  385,  383,  383,  383,  383,
-      386,  387,  383,  388,  383,  389,  383,   17,  390,  390,
-      390,  390,  390,  390,  390,  383,  390,  390,  390,  390,
-       21,  390,  390,  390,  390,  390,  390,  390,  390,  390,
-      390,  390,  383,  383,  383,  391,  391,  392,  383,  383,
-      386,  383,  386,  383,  393,   15,   17,  383,  383,   15,
-      383,  383,  383,  383,  394,  395,  383,  383,  383,  383,
-       17,  383,  383,  383,  396,  390,  383,  383,  383,  383,
-      390,   21,   21,  390,  390,  390,  390,  390,  390,  390,
-      390,  390,  390,  390,  390,  390,  390,  390,  390,  390,
-
-      390,  390,  390,  390,  390,  390,  390,  390,  390,  390,
-      390,  390,  390,  390,  390,  390,  390,  390,  390,  390,
-      390,  390,  383,  383,  391,  391,  383,  392,  383,  383,
-      383,  397,  383,  383,  383,  383,  383,  394,  395,  398,
-      383,  383,  383,  383,  383,  383,  399,  383,  383,  390,
-      390,  390,  390,  390,  390,  390,  390,  390,  390,  390,
-      390,  390,  390,  390,  390,  390,  390,  390,  390,  390,
-      390,  390,  390,  390,  390,  390,  390,  390,  390,  390,
-      390,  390,  390,  390,  390,  390,  390,  390,  390,  390,
-      390,  383,  383,  383,  400,  383,  383,  401,  383,  383,
-
-      383,  383,  383,  383,  383,  399,  383,  383,  383,  390,
-      390,  390,  390,  390,  390,  390,  390,  390,  390,  390,
-      390,  390,  390,  390,  390,  390,  390,  390,  390,  390,
-      390,  390,  390,  390,  390,  390,  390,  390,  390,  390,
-      390,  390,  390,  390,  390,  390,  390,  390,  390,  390,
-      383,  383,  383,  383,  401,  383,  383,  383,  383,  383,
-      383,  383,  390,  390,  390,  390,  390,  390,  390,  390,
-      390,  390,  390,  390,  390,  390,  390,  383,  390,  390,
-      390,  390,  390,  390,  390,  390,  390,  390,  390,  390,
-      390,  390,  390,  390,  390,  390,  383,  383,  383,  383,
-
-      383,  383,  390,  390,  390,  390,  390,  390,  390,  390,
-      390,  390,  390,  390,  390,  390,  390,  390,  390,  383,
-      390,  390,  390,  383,  390,  390,  390,  390,  390,  383,
-      383,  390,  390,  390,  390,  390,  390,  390,  390,  390,
-      390,  390,  390,  390,  390,  390,  390,  390,  390,  383,
-      390,  390,  390,  390,  390,  390,  390,  390,  390,  390,
-      390,  390,  390,  383,  390,  390,  390,  390,  390,  390,
-      390,  390,  390,  390,  390,  390,  390,  390,  383,  390,
-      383,  390,    0,  383,  383,  383,  383,  383,  383,  383,
-      383,  383,  383,  383,  383,  383,  383,  383,  383,  383,
-
-      383
+      416,    1,  417,  417,  418,  418,  416,  416,  416,  416,
+      419,  420,  416,  421,  416,  422,  416,   17,  423,  423,
+      423,  423,  423,  423,  423,  416,  423,  423,  423,  423,
+       21,  423,  423,  423,  423,  423,  423,  423,  423,  423,
+      423,  423,  416,  416,  416,  424,  424,  425,  416,  416,
+      419,  416,  419,  416,  426,   15,   17,  416,  416,   15,
+      416,  416,  416,  416,  427,  428,  416,  416,  416,  416,
+       17,  416,  416,  416,  429,  423,  416,  416,  416,  416,
+      423,   21,   21,  423,  423,  423,  423,  423,  423,  423,
+      423,  423,  423,  423,  423,  423,  423,  423,  423,  423,
+
+      423,  423,  423,  423,  423,  423,  423,  423,  423,  423,
+      423,  423,  423,  423,  423,  423,  423,  423,  423,  423,
+      423,  423,  423,  416,  416,  424,  424,  416,  425,  416,
+      416,  416,  430,  416,  416,  416,  416,  416,  427,  428,
+      431,  416,  416,  416,  416,  416,  416,  432,  416,  416,
+      423,  423,  423,  423,  423,  423,  423,  423,  423,  423,
+      423,  423,  423,  423,  423,  423,  423,  423,  423,  423,
+      423,  423,  423,  423,  423,  423,  423,  423,  423,  423,
+      423,  423,  423,  423,  423,  423,  423,  423,  423,  423,
+      423,  423,  423,  423,  423,  416,  416,  416,  433,  416,
+
+      416,  434,  416,  416,  416,  416,  416,  416,  416,  432,
+      416,  416,  416,  423,  423,  423,  423,  423,  423,  423,
+      423,  423,  423,  423,  423,  423,  423,  423,  423,  423,
+      423,  423,  423,  423,  423,  423,  423,  423,  423,  423,
+      423,  423,  423,  423,  423,  423,  423,  423,  423,  423,
+      423,  423,  423,  423,  423,  423,  423,  416,  416,  416,
+      416,  434,  416,  416,  416,  416,  416,  416,  416,  423,
+      423,  423,  423,  423,  423,  423,  423,  423,  423,  423,
+      423,  423,  423,  423,  423,  423,  423,  416,  423,  423,
+      423,  423,  423,  423,  423,  423,  423,  423,  423,  423,
+
+      423,  423,  423,  423,  423,  423,  416,  416,  416,  416,
+      416,  416,  423,  423,  423,  423,  423,  423,  423,  423,
+      423,  423,  423,  423,  423,  423,  423,  423,  423,  423,
+      423,  423,  416,  423,  423,  423,  416,  423,  423,  423,
+      423,  423,  416,  416,  423,  423,  423,  423,  423,  423,
+      423,  423,  423,  423,  423,  423,  423,  423,  423,  423,
+      423,  423,  423,  423,  423,  416,  423,  423,  423,  423,
+      423,  423,  423,  423,  423,  423,  423,  423,  423,  423,
+      423,  423,  416,  423,  423,  423,  423,  423,  423,  423,
+      423,  423,  423,  423,  423,  423,  423,  423,  423,  423,
+
+      423,  423,  416,  423,  423,  423,  416,  423,  423,  423,
+      423,  423,  423,  423,  423,    0,  416,  416,  416,  416,
+      416,  416,  416,  416,  416,  416,  416,  416,  416,  416,
+      416,  416,  416,  416
     } ;
 
-static yyconst flex_int16_t yy_nxt[2221] =
+static yyconst flex_int16_t yy_nxt[2416] =
     {   0,
         8,    9,   10,    9,    8,   11,   12,    8,   13,   14,
        15,   16,   17,   18,   18,   18,   18,   18,   18,    8,
         8,   19,   19,   19,   20,   21,   22,   19,   23,   19,
-       19,   24,   19,   19,   25,   19,   19,   26,   27,   19,
-       28,   29,   30,   31,   32,   33,   19,   34,   19,   35,
-       19,   36,   37,   19,   19,   38,   39,   40,   41,   42,
-       19,   19,    8,    8,   43,   44,   45,   50,   52,   50,
-       56,   56,   57,   57,   57,   57,   57,   57,   57,   50,
-      253,   50,   72,   76,   76,   58,   58,   77,  364,   59,
-       64,   52,  253,  255,   65,  254,  350,   77,  198,  331,
-
-       53,   77,   72,   58,   58,   60,   60,   60,   60,   60,
-       60,   60,   81,   84,   78,   79,   80,   61,   62,   63,
-       67,  208,   61,   53,   78,   79,   80,  255,   78,   79,
-       80,  330,   77,   90,  139,   61,   62,   63,  302,   77,
-      198,  208,   61,  301,  300,  255,   85,   68,   69,   70,
-       56,  299,   71,   71,   71,   71,   71,   71,   71,   78,
-       79,   80,   72,   72,  298,   58,   78,   79,   80,   73,
-       73,  297,   72,   72,   74,  207,   75,   76,  208,   86,
-       72,   72,   87,   58,   66,  262,  139,  261,  260,   73,
-       73,   77,  198,   88,   91,  207,   72,   72,   74,   82,
-
-       82,   89,  208,   83,   83,   83,   83,   83,   83,   83,
-       91,   91,   91,   91,   91,   91,   91,   77,   78,   79,
-       80,   92,   93,   94,   95,   77,  209,   76,   77,   96,
-       97,  205,   77,   66,  204,   77,  203,  105,  139,  197,
-       98,   99,  193,  193,   78,   79,   80,  100,  383,  126,
-       77,  192,   78,   79,   80,   78,   79,   80,   77,   78,
-       79,   80,   78,   79,   80,   77,   91,  101,  106,   77,
-      149,  148,  107,   76,   77,  102,  383,   78,   79,   80,
-      103,  146,   77,  145,  108,   78,   79,   80,  113,   77,
-      112,  109,   78,   79,   80,  110,   78,   79,   80,  111,
-
-       77,   78,   79,   80,   77,   66,  135,  383,  129,   78,
-       79,   80,   77,  114,  122,  383,   78,   79,   80,  127,
-      126,  124,  207,  116,  115,  208,  123,   78,   79,   80,
-       91,   78,   79,   80,   77,  104,  383,  117,   55,   78,
-       79,   80,  207,  383,  118,   49,  119,   49,  120,  208,
-       47,  140,   47,  121,  131,  131,  131,  131,  131,  131,
-      383,   78,   79,   80,  133,  133,   77,  383,  134,  134,
-      134,  134,  134,  134,  134,  136,  136,  141,  132,  137,
-      137,  137,  137,  137,  137,  137,   66,   66,   66,   66,
-       66,   66,   66,   78,   79,   80,   76,   76,   76,   76,
-
-       76,  383,  383,  383,  142,  143,  144,   77,   76,   76,
-       77,  383,   76,  383,  155,  156,  383,  383,   77,  383,
-      383,  383,  383,   77,  151,  153,  152,  383,  150,  151,
-       76,  383,  383,   77,   78,   79,   80,   78,   79,   80,
-      154,   77,  151,  383,  152,   78,   79,   80,  157,  151,
-       78,   79,   80,  156,   77,   76,  158,   77,  383,  383,
-       78,   79,   80,  383,   77,  383,  383,   77,   78,   79,
-       80,   77,  383,  383,   77,  383,  159,  160,  383,  383,
-      383,   78,   79,   80,   78,   79,   80,  383,  161,   77,
-      383,   78,   79,   80,   78,   79,   80,   77,   78,   79,
-
-       80,   78,   79,   80,  165,  383,  383,  162,  383,  163,
-       77,  383,  164,   77,  383,  383,   78,   79,   80,  166,
-       77,  383,  169,   77,   78,   79,   80,  383,  199,  383,
-      167,   77,  383,  168,   77,  383,  170,   78,   79,   80,
-       78,   79,   80,   77,  172,  383,   77,   78,   79,   80,
-       78,   79,   80,   77,  171,  200,  201,  202,   78,   79,
-       80,   78,   79,   80,  173,   77,  383,  174,  175,   77,
-       78,   79,   80,   78,   79,   80,   77,  383,  383,   77,
-       78,   79,   80,   77,  176,  177,   77,  383,  383,   77,
-      178,  181,   78,   79,   80,  156,   78,   79,   80,  180,
-
-      179,  383,   77,   78,   79,   80,   78,   79,   80,   77,
-       78,   79,   80,   78,   79,   80,   78,   79,   80,   77,
-      184,  182,  383,   77,  183,  383,   77,  383,  383,   78,
-       79,   80,  383,  383,  383,  383,   78,   79,   80,  185,
-      383,  383,   77,  383,  383,   77,   78,   79,   80,  186,
-       78,   79,   80,   78,   79,   80,  187,   77,  383,  383,
-      188,  140,  383,   77,  383,  383,  190,  383,  383,   78,
-       79,   80,   78,   79,   80,  189,   77,  134,  134,  134,
-      134,  134,  134,  134,   78,   79,   80,  141,  383,  193,
-       78,   79,   80,  383,  191,  194,  194,  194,  194,  194,
-
-      194,  383,  383,   78,   79,   80,  134,  134,  134,  134,
-      134,  134,  134,  383,  142,  143,  144,  383,  196,  383,
-       63,  383,  383,  196,  137,  137,  137,  137,  137,  137,
-      137,  383,  383,  383,  383,  383,  196,   77,   63,  383,
-      210,   77,  383,  196,  137,  137,  137,  137,  137,  137,
-      137,  139,  139,  139,  139,  139,   61,  383,   63,   77,
-      383,   61,  383,  214,   78,   79,   80,  139,   78,   79,
-       80,   77,  383,  211,   61,  383,   63,   77,  383,  383,
-       77,   61,  383,  216,   77,  139,   78,   79,   80,   77,
-      383,  212,   77,  383,  213,  383,  215,  383,   78,   79,
-
-       80,   77,  383,  383,   78,   79,   80,   78,   79,   80,
-      139,   78,   79,   80,   77,  383,   78,   79,   80,   78,
-       79,   80,  217,  383,   77,  223,  220,   77,   78,   79,
-       80,  218,  219,   77,  383,  383,   77,  383,  383,  221,
-       77,   78,   79,   80,  383,   77,  383,  383,  383,  383,
-      383,   78,   79,   80,   78,   79,   80,  383,  222,   77,
-       78,   79,   80,   78,   79,   80,  224,   78,   79,   80,
-       77,  383,   78,   79,   80,   77,  383,  227,   77,  383,
-      383,  226,   77,  383,  229,  225,   78,   79,   80,   77,
-      383,  383,  383,   77,  228,  230,  231,   78,   79,   80,
-
-       77,  383,   78,   79,   80,   78,   79,   80,  383,   78,
-       79,   80,   77,  232,  233,   77,   78,   79,   80,   77,
-       78,   79,   80,  383,  383,  235,   77,   78,   79,   80,
-       77,  241,  383,   77,  237,  383,  234,  215,  238,   78,
-       79,   80,   78,   79,   80,   77,   78,   79,   80,   77,
-      240,  236,   77,   78,   79,   80,  239,   78,   79,   80,
-       78,   79,   80,   77,  383,  383,   77,  242,  383,   77,
-      383,  383,   78,   79,   80,  244,   78,   79,   80,   78,
-       79,   80,   77,  383,  243,   77,  245,  383,  383,   77,
-       78,   79,   80,   78,   79,   80,   78,   79,   80,  247,
-
-      140,  383,  246,  383,  249,   77,  383,  383,  383,   78,
-       79,   80,   78,   79,   80,  248,   78,   79,   80,   77,
-      251,  251,  251,  251,  251,  251,  256,  383,  383,  250,
-       77,  383,   78,   79,   80,  198,  198,  198,  198,  198,
-      198,  198,  263,   77,  383,  383,   78,   79,   80,   77,
-      383,  266,   77,  257,  258,  259,   77,   78,   79,   80,
-      267,   77,  383,  264,   77,  383,  265,   77,  383,  383,
-       78,   79,   80,  383,   77,  268,   78,   79,   80,   78,
-       79,   80,  383,   78,   79,   80,  269,   77,   78,   79,
-       80,   78,   79,   80,   78,   79,   80,  270,   77,  383,
-
-      383,   78,   79,   80,   77,  383,  383,   77,  383,  383,
-      271,   77,  383,  383,   78,   79,   80,  383,  383,   77,
-      273,  274,   77,  383,  272,   78,   79,   80,   77,  275,
-      383,   78,   79,   80,   78,   79,   80,  276,   78,   79,
-       80,   77,  278,  383,   77,  383,   78,   79,   80,   78,
-       79,   80,   77,  282,  383,   78,   79,   80,  383,  277,
-       77,  383,  383,   77,  383,  383,  279,   77,   78,   79,
-       80,   78,   79,   80,   77,  280,  383,   77,  383,   78,
-       79,   80,   77,  383,  383,   77,  383,   78,   79,   80,
-       78,   79,   80,  283,   78,   79,   80,  241,  281,   77,
-
-      383,   78,   79,   80,   78,   79,   80,  284,   77,   78,
-       79,   80,   78,   79,   80,  383,   77,  383,  383,  383,
-       77,  285,  383,   77,  383,  383,   78,   79,   80,  286,
-       77,  383,  383,   77,  288,   78,   79,   80,  383,  383,
-      383,  383,  383,   78,   79,   80,   77,   78,   79,   80,
-       78,   79,   80,  287,  140,  383,  291,   78,   79,   80,
-       78,   79,   80,   77,  383,  289,   77,  383,  383,  290,
-       77,  383,  383,   78,   79,   80,   77,  383,  293,  294,
-      256,  383,  292,   77,  383,  383,   77,  383,  296,  306,
-       78,   79,   80,   78,   79,   80,   77,   78,   79,   80,
-
-       77,  295,  303,   78,   79,   80,  383,  257,  258,  259,
-       78,   79,   80,   78,   79,   80,  255,  255,  255,  255,
-      255,  304,  383,   78,   79,   80,   77,   78,   79,   80,
-       77,  307,  255,   77,  383,  383,  305,   77,  383,  309,
-       77,  383,  383,   77,  308,  310,  383,  311,  383,   77,
-      255,  383,   77,   78,   79,   80,  312,   78,   79,   80,
-       78,   79,   80,  383,   78,   79,   80,   78,   79,   80,
-       78,   79,   80,   77,  383,  255,   78,   79,   80,   78,
-       79,   80,   77,  383,  313,  314,   77,  383,  383,   77,
-      383,  316,  383,  315,  383,  383,  383,  383,   77,  383,
-
-       78,   79,   80,   77,  383,  320,   77,  383,  383,   78,
-       79,   80,  319,   78,   79,   80,   78,   79,   80,  317,
-       77,  383,  318,   77,  383,   78,   79,   80,  306,   77,
-       78,   79,   80,   78,   79,   80,   77,  383,  383,   77,
-      383,  383,  321,   77,  324,  383,   77,   78,   79,   80,
-       78,   79,   80,  306,   77,  325,   78,   79,   80,   77,
-      322,  383,   77,   78,   79,   80,   78,   79,   80,   77,
-       78,   79,   80,   78,   79,   80,   77,  326,  383,  323,
-       77,   78,   79,   80,   77,  383,   78,   79,   80,   78,
-       79,   80,   77,  383,  327,   77,   78,   79,   80,   77,
-
-      383,  332,  329,   78,   79,   80,  333,   78,   79,   80,
-       77,   78,   79,   80,   77,  328,  383,   77,  383,   78,
-       79,   80,   78,   79,   80,  335,   78,   79,   80,   77,
-      336,  383,   77,  383,  334,   77,  383,   78,   79,   80,
-       77,   78,   79,   80,   78,   79,   80,   77,  383,  339,
-      383,  383,  337,   77,  338,  383,   78,   79,   80,   78,
-       79,   80,   78,   79,   80,   77,  383,   78,   79,   80,
-       77,  383,  383,  341,   78,   79,   80,  341,   77,  340,
-       78,   79,   80,   77,  383,  383,   77,  383,  383,  383,
-      342,  343,   78,   79,   80,   77,  383,   78,   79,   80,
-
-      344,   77,  383,  383,   77,   78,   79,   80,   77,  383,
-       78,   79,   80,   78,   79,   80,  383,   77,  345,  237,
-       77,  383,   78,   79,   80,   77,  383,  383,   78,   79,
-       80,   78,   79,   80,   77,   78,   79,   80,  346,   77,
-      347,  383,  383,   77,   78,   79,   80,   78,   79,   80,
-       77,  383,   78,   79,   80,  349,  383,  383,   77,  348,
-      383,   78,   79,   80,  351,  212,   78,   79,   80,   77,
-       78,   79,   80,   77,  383,  383,  353,   78,   79,   80,
-       77,  383,  383,  354,   77,   78,   79,   80,   77,  383,
-      355,   77,  352,  383,  356,   77,   78,   79,   80,   77,
-
-       78,   79,   80,  357,   77,  358,  383,   78,   79,   80,
-      341,   78,   79,   80,  383,   78,   79,   80,   78,   79,
-       80,   77,   78,   79,   80,   77,   78,   79,   80,   77,
-      359,   78,   79,   80,   77,  341,  360,   77,  383,  383,
-      362,   77,  383,  383,  383,   77,  383,  383,   78,   79,
-       80,  363,   78,   79,   80,  361,   78,   79,   80,  293,
-       77,   78,   79,   80,   78,   79,   80,  365,   78,   79,
-       80,   77,   78,   79,   80,  368,  383,  366,  212,   77,
-      383,  383,  383,   77,  383,  383,   77,   78,   79,   80,
-       77,  383,  369,  383,  383,   77,  383,  383,   78,   79,
-
-       80,  383,   77,  367,  383,   77,   78,   79,   80,  383,
-       78,   79,   80,   78,   79,   80,  370,   78,   79,   80,
-      371,   77,   78,   79,   80,  383,   77,  383,  383,   78,
-       79,   80,   78,   79,   80,  372,   77,  383,  383,   77,
-      383,  383,  359,   77,  366,  373,   77,  383,   78,   79,
-       80,   77,  383,   78,   79,   80,   77,  374,  383,  377,
-      383,  383,  375,   78,   79,   80,   78,   79,   80,   77,
-       78,   79,   80,   78,   79,   80,   77,  379,   78,   79,
-       80,   77,  341,   78,   79,   80,  383,   77,  376,  341,
-      383,  383,   77,  383,  383,   77,   78,   79,   80,   77,
-
-      383,  383,  383,   78,   79,   80,  378,   77,   78,   79,
-       80,  341,   77,  381,   78,   79,   80,  383,  341,   78,
-       79,   80,   78,   79,   80,  383,   78,   79,   80,  380,
-      383,   77,  383,  383,   78,   79,   80,   77,  383,   78,
-       79,   80,   77,  382,  383,  383,  383,  383,  383,  383,
-      383,  383,  383,  383,  341,  383,  383,  383,   78,   79,
-       80,  383,  383,  383,   78,   79,   80,  383,  383,   78,
-       79,   80,   46,   46,   46,   46,   46,   46,   46,   46,
-       46,   46,   46,   46,   46,   46,   48,   48,   48,   48,
+       19,   24,   19,   19,   19,   25,   19,   19,   26,   27,
+       19,   28,   29,   30,   31,   32,   33,   19,   34,   19,
+       35,   19,   36,   37,   19,   19,   38,   39,   40,   41,
+       42,   19,   19,    8,    8,   43,   44,   45,   50,   52,
+       50,   56,   56,   57,   57,   57,   57,   57,   57,   57,
+       50,  260,   50,   72,   64,  383,   58,   58,   65,   77,
+       59,  262,   52,   76,   76,  260,   90,  366,  261,   77,
+
+      202,  212,   53,   77,   72,   58,   58,   60,   60,   60,
+       60,   60,   60,   60,   81,   67,   78,   79,   80,   61,
+       62,   63,  212,  344,   61,   53,   78,   79,   80,  262,
+       78,   79,   80,  343,  140,   77,  312,  202,   61,   62,
+       63,  311,   68,   69,   70,   61,   56,   84,   71,   71,
+       71,   71,   71,   71,   71,  310,   77,  262,   72,  309,
+      308,   58,   78,   79,   80,   73,  307,   76,   66,   72,
+       85,   74,  269,   75,  140,   86,  268,   72,   87,  267,
+       58,  202,   91,   78,   79,   80,   73,  213,   77,   76,
+       88,   77,  209,   72,   66,   74,   82,   82,   89,  208,
+
+       83,   83,   83,   83,   83,   83,   83,   91,   91,   91,
+       91,   91,   91,   91,   99,   78,   79,   80,   78,   79,
+       80,   77,  207,  140,  201,  197,   77,  197,  416,  127,
+      100,  196,   91,  150,  149,   76,  101,  416,  147,  146,
+       77,   66,  136,  416,  130,   77,  416,  128,   78,   79,
+       80,   77,  106,   78,   79,   80,   92,   93,   94,   95,
+       77,   96,  102,  107,   97,  108,   98,   78,   79,   80,
+      103,   77,   78,   79,   80,  104,   77,  127,   78,   79,
+       80,   77,  125,  124,   77,   91,  110,   78,   79,   80,
+      111,  109,   77,  105,  112,   77,  416,  113,   78,   79,
+
+       80,  114,   77,   78,   79,   80,   77,   55,   78,   79,
+       80,   78,   79,   80,   77,  115,  123,  416,   49,   78,
+       79,   80,   78,   79,   80,  117,  116,   49,   47,   78,
+       79,   80,   47,   78,   79,   80,   77,  416,  416,  118,
+      416,   78,   79,   80,  416,  416,  119,  416,  120,  416,
+      121,  416,  416,  141,  416,  122,  132,  132,  132,  132,
+      132,  132,  416,   78,   79,   80,  134,  134,  416,  416,
+      135,  135,  135,  135,  135,  135,  135,  416,  137,  137,
+      142,  133,  138,  138,  138,  138,  138,  138,  138,   66,
+       66,   66,   66,   66,   66,   66,   77,  416,  416,   72,
+
+       76,   76,   76,   76,   76,  416,   73,  143,  144,  145,
+       72,   77,   76,   76,   77,  416,   76,  151,   72,  416,
+      157,  155,  416,   78,   79,   80,  154,   73,  152,   77,
+      153,  416,  156,  152,   72,   76,   77,  158,   78,   79,
+       80,   78,   79,   80,   77,  416,  159,  152,  416,  153,
+       77,  416,  416,  416,  152,   77,   78,   79,   80,   77,
+       76,  416,  157,   78,   79,   80,   77,  416,  416,  416,
+       77,   78,   79,   80,  416,  160,  161,   78,   79,   80,
+      416,   77,   78,   79,   80,  416,   78,   79,   80,   77,
+      416,  416,   77,   78,   79,   80,  167,   78,   79,   80,
+
+      166,  416,  163,  162,  164,  416,  416,  165,   78,   79,
+       80,   77,  416,  416,   77,  416,   78,   79,   80,   78,
+       79,   80,  416,  169,   77,  416,  168,   77,  416,  173,
+      416,  416,   77,  416,  170,  171,  416,   77,   78,   79,
+       80,   78,   79,   80,  172,  174,   77,  416,  416,   77,
+      416,   78,   79,   80,   78,   79,   80,  175,   77,   78,
+       79,   80,  176,  416,   78,   79,   80,  177,   77,  416,
+      416,  416,  416,   78,   79,   80,   78,   79,   80,  178,
+       77,  416,  416,  179,   77,   78,   79,   80,   77,  416,
+      416,   77,  416,  416,   77,   78,   79,   80,   77,  180,
+
+      181,   77,  182,  185,   77,  183,  186,   78,   79,   80,
+      157,   78,   79,   80,  184,   78,   79,   80,   78,   79,
+       80,   78,   79,   80,   77,   78,   79,   80,   78,   79,
+       80,   78,   79,   80,  416,  416,   77,  416,  416,  187,
+       77,  416,  416,   77,  416,  416,   77,  416,  416,  416,
+       77,   78,   79,   80,  188,  416,  189,  416,  416,  416,
+      191,   77,  193,   78,   79,   80,  190,   78,   79,   80,
+       78,   79,   80,   78,   79,   80,  192,   78,   79,   80,
+      211,  416,   77,  416,  212,   77,  197,  416,   78,   79,
+       80,  194,  198,  198,  198,  198,  198,  198,  416,  416,
+
+      416,  211,  141,  195,  203,  416,  416,  416,  212,   78,
+       79,   80,   78,   79,   80,  135,  135,  135,  135,  135,
+      135,  135,  135,  135,  135,  135,  135,  135,  135,  142,
+      416,  204,  205,  206,  200,  416,   63,  416,  416,  200,
+      138,  138,  138,  138,  138,  138,  138,  258,  258,  258,
+      258,  258,  258,  200,   77,   63,  143,  144,  145,   77,
+      200,  138,  138,  138,  138,  138,  138,  138,  140,  140,
+      140,  140,  140,   61,  416,   63,  416,   77,   61,  416,
+      214,   78,   79,   80,  140,  416,   78,   79,   80,   77,
+      416,  215,   61,  218,   63,   77,  416,  416,   77,   61,
+
+      416,  416,   77,  140,   78,   79,   80,  416,   77,  216,
+      416,  220,  217,   77,  416,  416,   78,   79,   80,  221,
+      219,   77,   78,   79,   80,   78,   79,   80,  140,   78,
+       79,   80,   77,  416,  416,   78,   79,   80,   77,  222,
+       78,   79,   80,  223,   77,  416,  416,   77,   78,   79,
+       80,   77,  228,  225,  416,  227,  224,  416,   77,   78,
+       79,   80,   77,  416,  416,   78,   79,   80,   77,  226,
+      229,   78,   79,   80,   78,   79,   80,   77,   78,   79,
+       80,  416,   77,  231,  416,   78,   79,   80,   77,   78,
+       79,   80,   77,  416,  233,   78,   79,   80,  230,  416,
+
+       77,  416,  416,  416,   78,   79,   80,   77,  232,   78,
+       79,   80,   77,  416,  236,   78,   79,   80,  234,   78,
+       79,   80,  416,  235,   77,  416,  416,   78,   79,   80,
+      237,   77,  416,  211,   78,   79,   80,  212,   77,   78,
+       79,   80,   77,  416,  239,  238,   77,  416,  240,  416,
+       77,   78,   79,   80,  211,   77,  249,  219,   78,   79,
+       80,  212,  416,  416,  242,   78,   79,   80,   77,   78,
+       79,   80,   77,   78,   79,   80,  241,   78,   79,   80,
+      244,   77,   78,   79,   80,   77,  416,  245,   77,  250,
+      416,  243,   77,  416,  251,   78,   79,   80,  247,   78,
+
+       79,   80,   77,  416,  248,   77,  246,  416,   78,   79,
+       80,  416,   78,   79,   80,   78,   79,   80,   77,   78,
+       79,   80,   77,  416,  416,  252,  141,   77,  416,   78,
+       79,   80,   78,   79,   80,  416,  254,  255,  253,  416,
+      416,  416,   77,  416,  416,   78,   79,   80,   77,   78,
+       79,   80,  416,  263,   78,   79,   80,  256,  257,  202,
+      202,  202,  202,  202,  202,  202,   77,  416,  416,   78,
+       79,   80,   77,  273,  416,   78,   79,   80,  270,   77,
+      264,  265,  266,   77,  416,  416,  416,   77,  274,  416,
+       77,  416,  271,   78,   79,   80,   77,  272,  416,   78,
+
+       79,   80,  416,  416,  416,   77,   78,   79,   80,   77,
+       78,   79,   80,   77,   78,   79,   80,   78,   79,   80,
+       77,  276,  416,   78,   79,   80,   77,  275,  416,  416,
+      277,   77,   78,   79,   80,   77,   78,   79,   80,   77,
+       78,   79,   80,  278,   77,  283,  279,   78,   79,   80,
+      281,   77,  280,   78,   79,   80,   77,  416,   78,   79,
+       80,   77,   78,   79,   80,   77,   78,   79,   80,  282,
+       77,   78,   79,   80,  285,   77,  288,  284,   78,   79,
+       80,  286,   77,   78,   79,   80,   77,  416,   78,   79,
+       80,   77,   78,   79,   80,   77,  289,   78,   79,   80,
+
+       77,  287,   78,   79,   80,   77,  416,  291,  292,   78,
+       79,   80,  290,   78,   79,   80,  416,   77,   78,   79,
+       80,   77,   78,   79,   80,  248,  294,   78,   79,   80,
+       77,  416,   78,   79,   80,   77,  416,  416,  416,  416,
+       77,  416,  296,  293,   78,   79,   80,   77,   78,   79,
+       80,   77,  295,  416,  416,  416,   77,   78,   79,   80,
+      298,   77,   78,   79,   80,   77,  416,   78,   79,   80,
+      416,  300,   77,  416,   78,   79,   80,  301,   78,   79,
+       80,  297,  416,   78,   79,   80,  141,   77,   78,   79,
+       80,  299,   78,   79,   80,  303,  416,  416,   77,   78,
+
+       79,   80,   77,  416,  302,   77,  416,  416,   77,  416,
+      306,  416,  416,  263,   78,   79,   80,  416,  304,  416,
+      305,  416,   77,  416,  416,   78,   79,   80,  313,   78,
+       79,   80,   78,   79,   80,   78,   79,   80,  314,  416,
+      264,  265,  266,  262,  262,  262,  262,  262,   77,   78,
+       79,   80,   77,  316,  416,   77,  416,  416,  317,  262,
+      416,   77,  315,  319,  416,   77,  318,  416,   77,  416,
+      416,   77,  416,  320,  416,   78,   79,   80,  262,   78,
+       79,   80,   78,   79,   80,  321,  416,   77,   78,   79,
+       80,   77,   78,   79,   80,   78,   79,   80,   78,   79,
+
+       80,   77,  416,  262,   77,  322,  323,   77,  416,  416,
+      416,  324,   77,  416,   78,   79,   80,  416,   78,   79,
+       80,   77,  325,  328,  326,   77,  416,  416,   78,   79,
+       80,   78,   79,   80,   78,   79,   80,   77,  416,   78,
+       79,   80,   77,  329,  327,  416,  416,  416,   78,   79,
+       80,   77,   78,   79,   80,   77,  333,  332,   77,  416,
+      316,   77,  337,  330,   78,   79,   80,  334,   77,   78,
+       79,   80,   77,  416,  331,   77,  416,  416,   78,   79,
+       80,   77,   78,   79,   80,   78,   79,   80,   78,   79,
+       80,   77,  416,  338,   77,   78,   79,   80,  316,   78,
+
+       79,   80,   78,   79,   80,   77,  416,  416,   78,   79,
+       80,  335,   77,  416,  336,   77,  416,  416,   78,   79,
+       80,   78,   79,   80,   77,  416,  416,   77,  416,  416,
+       77,  416,   78,   79,   80,  339,   77,  416,  416,   78,
+       79,   80,   78,   79,   80,   77,  340,  416,  342,   77,
+      341,   78,   79,   80,   78,   79,   80,   78,   79,   80,
+      345,   77,  416,   78,   79,   80,   77,  416,  416,  347,
+       77,  416,   78,   79,   80,  346,   78,   79,   80,  348,
+       77,  349,  416,   77,  416,  416,   77,  416,   78,   79,
+       80,   77,  416,   78,   79,   80,  416,   78,   79,   80,
+
+      350,   77,  416,  352,   77,  351,  416,   78,   79,   80,
+       78,   79,   80,   78,   79,   80,   77,  416,   78,   79,
+       80,  416,   77,  416,  354,  353,  355,   77,   78,   79,
+       80,   78,   79,   80,  416,  416,   77,  416,  416,  354,
+      416,   77,  416,   78,   79,   80,  416,  416,   77,   78,
+       79,   80,  356,  357,   78,   79,   80,  416,   77,  416,
+      416,  416,  360,   78,   79,   80,  358,   77,   78,   79,
+       80,   77,  416,  416,  359,   78,   79,   80,   77,  416,
+      416,  416,  416,   77,  416,   78,   79,   80,  361,   77,
+      416,  416,   77,  416,   78,   79,   80,   77,   78,   79,
+
+       80,  244,   77,  416,  416,   78,   79,   80,  363,   77,
+       78,   79,   80,  362,   77,  369,   78,   79,   80,   78,
+       79,   80,  416,   77,   78,   79,   80,  416,   77,   78,
+       79,   80,   77,  416,  364,  365,   78,   79,   80,  416,
+       77,   78,   79,   80,  416,  416,  367,  216,   77,  416,
+       78,   79,   80,   77,  416,   78,   79,   80,   77,   78,
+       79,   80,   77,  370,  371,   77,  416,   78,   79,   80,
+      416,  368,   77,  416,  373,   78,   79,   80,  374,  372,
+       78,   79,   80,   77,  416,   78,   79,   80,  416,   78,
+       79,   80,   78,   79,   80,  416,  416,   77,  416,   78,
+
+       79,   80,  375,   77,  416,  416,  416,   77,  416,  376,
+       78,   79,   80,  354,   77,  416,  416,   77,  416,  416,
+      354,  416,   77,  416,   78,   79,   80,  378,  416,  377,
+       78,   79,   80,   77,   78,   79,   80,   77,  416,  416,
+       77,   78,   79,   80,   78,   79,   80,   77,  379,   78,
+       79,   80,   77,  381,  416,  380,  416,   77,  303,  384,
+       78,   79,   80,  382,   78,   79,   80,   78,   79,   80,
+       77,  416,  416,  385,   78,   79,   80,  216,   77,   78,
+       79,   80,  387,   77,   78,   79,   80,   77,  416,  388,
+      416,   77,  416,  416,  416,  416,   77,   78,   79,   80,
+
+      416,  416,  386,   77,  416,   78,   79,   80,   77,  416,
+       78,   79,   80,   77,   78,   79,   80,  389,   78,   79,
+       80,  390,   77,   78,   79,   80,  392,   77,  393,  391,
+       78,   79,   80,   77,  416,   78,   79,   80,   77,  416,
+       78,   79,   80,   77,  378,  416,   77,  394,  385,   78,
+       79,   80,   77,  416,   78,   79,   80,   77,  416,  416,
+       78,   79,   80,   77,  416,   78,   79,   80,   77,  396,
+       78,   79,   80,   78,   79,   80,  395,   77,  399,   78,
+       79,   80,   77,  397,   78,   79,   80,  398,  354,   77,
+       78,   79,   80,  354,   77,   78,   79,   80,   77,  416,
+
+      403,   77,  401,  416,   78,   79,   80,  416,  402,   78,
+       79,   80,   77,  416,  400,   77,   78,   79,   80,   77,
+      416,   78,   79,   80,   77,   78,   79,   80,   78,   79,
+       80,  354,   77,  354,  405,  416,   77,  416,  416,   78,
+       79,   80,   78,   79,   80,   77,   78,   79,   80,  407,
+      416,   78,   79,   80,  404,  354,  406,   77,  416,   78,
+       79,   80,  416,   78,   79,   80,  416,  416,   77,  416,
+      416,   77,   78,   79,   80,   77,  410,  408,   77,  416,
+      416,  409,   77,  416,   78,   79,   80,  416,  416,   77,
+      416,  416,  416,  416,  354,   78,   79,   80,   78,   79,
+
+       80,  416,   78,   79,   80,   78,   79,   80,  354,   78,
+       79,   80,  416,   77,  416,  416,   78,   79,   80,  411,
+       77,  416,  416,  416,   77,  416,  416,   77,  416,  416,
+       77,  416,  416,  416,  416,  416,   77,  414,  412,  416,
+       78,   79,   80,  413,  416,  415,  416,   78,   79,   80,
+      354,   78,   79,   80,   78,   79,   80,   78,   79,   80,
+      416,  416,  416,   78,   79,   80,   46,   46,   46,   46,
+       46,   46,   46,   46,   46,   46,   46,   46,   46,   46,
        48,   48,   48,   48,   48,   48,   48,   48,   48,   48,
-
-       51,   51,   51,   51,   51,   51,   51,   51,   51,   51,
-       51,   51,   51,   51,   54,   54,   54,   54,   54,   54,
-       54,   54,   54,   54,   54,   54,   54,   54,   57,  383,
-       57,  383,   57,  383,   57,   66,  383,  383,   66,  383,
-       66,   66,   66,   66,   66,   76,   76,  383,   76,   76,
-       76,   76,   76,   76,  125,  125,  125,  125,  125,  125,
-      125,  125,  125,  125,  125,  125,  125,  125,  128,  128,
-      128,  128,  128,  128,  128,  128,  128,  128,  128,  128,
-      128,  130,  383,  130,  130,  130,  130,  130,  130,  130,
-      130,  130,  130,  130,  130,  138,  383,  138,  138,  138,
-
-      138,  138,  138,  138,  138,  138,  138,  138,  138,  139,
-      139,  139,  139,  139,  139,  139,  139,  139,  147,  147,
-      147,  195,  383,  383,  383,  383,  195,  195,  195,  198,
-      198,  198,  198,  198,  206,  206,  206,  383,  383,  206,
-      252,  252,  252,  255,  255,  255,  255,  255,  255,  255,
-      255,  255,    7,  383,  383,  383,  383,  383,  383,  383,
-      383,  383,  383,  383,  383,  383,  383,  383,  383,  383,
-      383,  383,  383,  383,  383,  383,  383,  383,  383,  383,
-      383,  383,  383,  383,  383,  383,  383,  383,  383,  383,
-      383,  383,  383,  383,  383,  383,  383,  383,  383,  383,
-
-      383,  383,  383,  383,  383,  383,  383,  383,  383,  383,
-      383,  383,  383,  383,  383,  383,  383,  383,  383,  383
+       48,   48,   48,   48,   51,   51,   51,   51,   51,   51,
+
+       51,   51,   51,   51,   51,   51,   51,   51,   54,   54,
+       54,   54,   54,   54,   54,   54,   54,   54,   54,   54,
+       54,   54,   57,  416,   57,  416,   57,  416,   57,   66,
+      416,  416,   66,  416,   66,   66,   66,   66,   66,   76,
+       76,  416,   76,   76,   76,   76,   76,   76,  126,  126,
+      126,  126,  126,  126,  126,  126,  126,  126,  126,  126,
+      126,  126,  129,  129,  129,  129,  129,  129,  129,  129,
+      129,  129,  129,  129,  129,  131,  416,  131,  131,  131,
+      131,  131,  131,  131,  131,  131,  131,  131,  131,  139,
+      416,  139,  139,  139,  139,  139,  139,  139,  139,  139,
+
+      139,  139,  139,  140,  140,  140,  140,  140,  140,  140,
+      140,  140,  148,  148,  148,  199,  416,  416,  416,  416,
+      199,  199,  199,  202,  202,  202,  202,  202,  210,  210,
+      210,  416,  416,  210,  259,  259,  259,  262,  262,  262,
+      262,  262,  262,  262,  262,  262,    7,  416,  416,  416,
+      416,  416,  416,  416,  416,  416,  416,  416,  416,  416,
+      416,  416,  416,  416,  416,  416,  416,  416,  416,  416,
+      416,  416,  416,  416,  416,  416,  416,  416,  416,  416,
+      416,  416,  416,  416,  416,  416,  416,  416,  416,  416,
+      416,  416,  416,  416,  416,  416,  416,  416,  416,  416,
+
+      416,  416,  416,  416,  416,  416,  416,  416,  416,  416,
+      416,  416,  416,  416,  416
     } ;
 
-static yyconst flex_int16_t yy_chk[2221] =
+static yyconst flex_int16_t yy_chk[2416] =
     {   0,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
@@ -831,244 +863,266 @@ static yyconst flex_int16_t yy_chk[2221] =
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    9,   11,    9,
-       13,   14,   13,   13,   13,   13,   13,   13,   13,   50,
-      364,   50,   73,   82,   82,   13,   14,   19,  350,   14,
-       16,   51,  197,  331,   16,  197,  330,   20,  302,  301,
-
-       11,   22,   73,   13,   14,   15,   15,   15,   15,   15,
-       15,   15,   20,   22,   19,   19,   19,   15,   15,   15,
-       16,  207,   15,   51,   20,   20,   20,  300,   22,   22,
-       22,  299,   23,   25,  262,   15,   15,   15,  261,   25,
-      260,  207,   15,  259,  258,  257,   23,   16,   16,   16,
-       17,  254,   17,   17,   17,   17,   17,   17,   17,   23,
-       23,   23,   17,   74,  252,   17,   25,   25,   25,   17,
-       74,  251,   17,   74,   17,  147,   17,  209,  147,   24,
-       17,   74,   24,   17,  205,  204,  203,  202,  201,   17,
-       74,   24,  200,   24,  192,  147,   17,   74,   17,   21,
-
-       21,   24,  147,   21,   21,   21,   21,   21,   21,   21,
-       26,   26,   26,   26,   26,   26,   26,   28,   24,   24,
-       24,   27,   27,   27,   27,   32,  149,  148,   21,   27,
-       27,  146,   29,  145,  144,   27,  143,   32,  142,  135,
-       28,   29,  132,  130,   28,   28,   28,   29,  126,  125,
-       33,  124,   32,   32,   32,   21,   21,   21,   34,   29,
-       29,   29,   27,   27,   27,   30,  123,   30,   33,   35,
-       80,   79,   34,   78,   37,   30,   71,   33,   33,   33,
-       30,   70,   38,   69,   35,   34,   34,   34,   38,   36,
-       37,   36,   30,   30,   30,   36,   35,   35,   35,   36,
-
-       40,   37,   37,   37,   39,   68,   59,   57,   54,   38,
-       38,   38,   42,   39,   42,   53,   36,   36,   36,   47,
-       46,   45,  206,   40,   39,  206,   44,   40,   40,   40,
-       43,   39,   39,   39,   41,   31,   18,   41,   12,   42,
-       42,   42,  206,    7,   41,    6,   41,    5,   41,  206,
-        4,   66,    3,   41,   55,   55,   55,   55,   55,   55,
-        0,   41,   41,   41,   58,   58,   76,    0,   58,   58,
-       58,   58,   58,   58,   58,   62,   62,   66,   55,   62,
-       62,   62,   62,   62,   62,   62,   67,   67,   67,   67,
-       67,   67,   67,   76,   76,   76,   77,   77,   77,   77,
-
-       77,    0,    0,    0,   66,   66,   66,   81,   83,   83,
-       84,    0,   77,    0,   86,   87,    0,    0,   86,    0,
-        0,    0,    0,   87,   83,   84,   83,    0,   81,   83,
-       77,    0,    0,   85,   81,   81,   81,   84,   84,   84,
-       85,   89,   83,    0,   83,   86,   86,   86,   88,   83,
-       87,   87,   87,   89,   88,   77,   90,   91,    0,    0,
-       85,   85,   85,    0,   90,    0,    0,   92,   89,   89,
-       89,   93,    0,    0,   94,    0,   92,   93,    0,    0,
-        0,   88,   88,   88,   91,   91,   91,    0,   94,   96,
-        0,   90,   90,   90,   92,   92,   92,   95,   93,   93,
-
-       93,   94,   94,   94,   96,    0,    0,   95,    0,   95,
-       97,    0,   95,   98,    0,    0,   96,   96,   96,   97,
-       99,    0,   99,  100,   95,   95,   95,    0,  140,    0,
-       97,  102,    0,   98,  101,    0,  100,   97,   97,   97,
-       98,   98,   98,  103,  102,    0,  104,   99,   99,   99,
-      100,  100,  100,  105,  101,  140,  140,  140,  102,  102,
-      102,  101,  101,  101,  103,  107,    0,  104,  105,  106,
-      103,  103,  103,  104,  104,  104,  108,    0,    0,  110,
-      105,  105,  105,  111,  106,  107,  109,    0,    0,  112,
-      108,  112,  107,  107,  107,  111,  106,  106,  106,  110,
-
-      109,    0,  115,  108,  108,  108,  110,  110,  110,  114,
-      111,  111,  111,  109,  109,  109,  112,  112,  112,  113,
-      115,  113,    0,  116,  114,    0,  117,    0,    0,  115,
-      115,  115,    0,    0,    0,    0,  114,  114,  114,  116,
-        0,    0,  118,    0,    0,  119,  113,  113,  113,  117,
-      116,  116,  116,  117,  117,  117,  118,  121,    0,    0,
-      119,  139,    0,  120,    0,    0,  121,    0,    0,  118,
-      118,  118,  119,  119,  119,  120,  122,  133,  133,  133,
-      133,  133,  133,  133,  121,  121,  121,  139,    0,  131,
-      120,  120,  120,    0,  122,  131,  131,  131,  131,  131,
-
-      131,    0,    0,  122,  122,  122,  134,  134,  134,  134,
-      134,  134,  134,    0,  139,  139,  139,    0,  134,    0,
-      134,    0,    0,  134,  136,  136,  136,  136,  136,  136,
-      136,    0,    0,    0,    0,    0,  134,  150,  134,    0,
-      150,  151,    0,  134,  137,  137,  137,  137,  137,  137,
-      137,  141,  141,  141,  141,  141,  137,    0,  137,  152,
-        0,  137,    0,  155,  150,  150,  150,  141,  151,  151,
-      151,  153,    0,  153,  137,    0,  137,  155,    0,    0,
-      156,  137,    0,  158,  154,  141,  152,  152,  152,  157,
-        0,  154,  158,    0,  154,    0,  157,    0,  153,  153,
-
-      153,  159,    0,    0,  155,  155,  155,  156,  156,  156,
-      141,  154,  154,  154,  162,    0,  157,  157,  157,  158,
-      158,  158,  159,    0,  160,  165,  162,  161,  159,  159,
-      159,  160,  161,  163,    0,    0,  165,    0,    0,  163,
-      164,  162,  162,  162,    0,  166,    0,    0,    0,    0,
-        0,  160,  160,  160,  161,  161,  161,    0,  164,  169,
-      163,  163,  163,  165,  165,  165,  166,  164,  164,  164,
-      167,    0,  166,  166,  166,  168,    0,  169,  170,    0,
-        0,  168,  171,    0,  171,  167,  169,  169,  169,  172,
-        0,    0,    0,  173,  170,  172,  173,  167,  167,  167,
-
-      174,    0,  168,  168,  168,  170,  170,  170,    0,  171,
-      171,  171,  175,  174,  175,  176,  172,  172,  172,  182,
-      173,  173,  173,    0,    0,  177,  178,  174,  174,  174,
-      179,  182,    0,  181,  178,    0,  176,  179,  180,  175,
-      175,  175,  176,  176,  176,  177,  182,  182,  182,  183,
-      181,  177,  180,  178,  178,  178,  180,  179,  179,  179,
-      181,  181,  181,  184,    0,    0,  186,  183,    0,  185,
-        0,    0,  177,  177,  177,  185,  183,  183,  183,  180,
-      180,  180,  187,    0,  184,  188,  186,    0,    0,  190,
-      184,  184,  184,  186,  186,  186,  185,  185,  185,  188,
-
-      198,    0,  187,    0,  190,  189,    0,    0,    0,  187,
-      187,  187,  188,  188,  188,  189,  190,  190,  190,  191,
-      194,  194,  194,  194,  194,  194,  198,    0,    0,  191,
-      210,    0,  189,  189,  189,  199,  199,  199,  199,  199,
-      199,  199,  210,  211,    0,    0,  191,  191,  191,  212,
-        0,  214,  213,  198,  198,  198,  215,  210,  210,  210,
-      216,  217,    0,  211,  214,    0,  213,  216,    0,    0,
-      211,  211,  211,    0,  218,  217,  212,  212,  212,  213,
-      213,  213,    0,  215,  215,  215,  218,  219,  217,  217,
-      217,  214,  214,  214,  216,  216,  216,  219,  220,    0,
-
-        0,  218,  218,  218,  221,    0,    0,  222,    0,    0,
-      220,  223,    0,    0,  219,  219,  219,    0,    0,  225,
-      222,  223,  224,    0,  221,  220,  220,  220,  226,  224,
-        0,  221,  221,  221,  222,  222,  222,  225,  223,  223,
-      223,  227,  229,    0,  228,    0,  225,  225,  225,  224,
-      224,  224,  230,  235,    0,  226,  226,  226,    0,  228,
-      229,    0,    0,  231,    0,    0,  230,  232,  227,  227,
-      227,  228,  228,  228,  235,  231,    0,  233,    0,  230,
-      230,  230,  234,    0,    0,  236,    0,  229,  229,  229,
-      231,  231,  231,  236,  232,  232,  232,  233,  234,  237,
-
-        0,  235,  235,  235,  233,  233,  233,  238,  240,  234,
-      234,  234,  236,  236,  236,    0,  239,    0,    0,    0,
-      238,  239,    0,  241,    0,    0,  237,  237,  237,  240,
-      243,    0,    0,  242,  243,  240,  240,  240,    0,    0,
-        0,    0,    0,  239,  239,  239,  244,  238,  238,  238,
-      241,  241,  241,  242,  255,    0,  246,  243,  243,  243,
-      242,  242,  242,  245,    0,  244,  248,    0,    0,  245,
-      247,    0,    0,  244,  244,  244,  246,    0,  247,  248,
-      255,    0,  246,  249,    0,    0,  250,    0,  250,  266,
-      245,  245,  245,  248,  248,  248,  263,  247,  247,  247,
-
-      266,  249,  263,  246,  246,  246,    0,  255,  255,  255,
-      249,  249,  249,  250,  250,  250,  256,  256,  256,  256,
-      256,  264,    0,  263,  263,  263,  265,  266,  266,  266,
-      264,  267,  256,  268,    0,    0,  265,  269,    0,  269,
-      267,    0,    0,  270,  268,  270,    0,  271,    0,  271,
-      256,    0,  272,  265,  265,  265,  272,  264,  264,  264,
-      268,  268,  268,    0,  269,  269,  269,  267,  267,  267,
-      270,  270,  270,  274,    0,  256,  271,  271,  271,  272,
-      272,  272,  273,    0,  273,  274,  275,    0,    0,  276,
-        0,  276,    0,  275,    0,    0,    0,    0,  277,    0,
-
-      274,  274,  274,  279,    0,  281,  280,    0,    0,  273,
-      273,  273,  280,  275,  275,  275,  276,  276,  276,  277,
-      282,    0,  279,  281,    0,  277,  277,  277,  284,  287,
-      279,  279,  279,  280,  280,  280,  283,    0,    0,  284,
-        0,    0,  283,  290,  289,    0,  285,  282,  282,  282,
-      281,  281,  281,  285,  286,  291,  287,  287,  287,  288,
-      286,    0,  289,  283,  283,  283,  284,  284,  284,  292,
-      290,  290,  290,  285,  285,  285,  291,  292,    0,  288,
-      293,  286,  286,  286,  294,    0,  288,  288,  288,  289,
-      289,  289,  304,    0,  294,  295,  292,  292,  292,  296,
-
-        0,  303,  296,  291,  291,  291,  304,  293,  293,  293,
-      303,  294,  294,  294,  305,  295,    0,  306,    0,  304,
-      304,  304,  295,  295,  295,  307,  296,  296,  296,  307,
-      308,    0,  309,    0,  305,  308,    0,  303,  303,  303,
-      310,  305,  305,  305,  306,  306,  306,  311,    0,  311,
-        0,    0,  309,  313,  310,    0,  307,  307,  307,  309,
-      309,  309,  308,  308,  308,  314,    0,  310,  310,  310,
-      312,    0,    0,  313,  311,  311,  311,  314,  315,  312,
-      313,  313,  313,  316,    0,    0,  317,    0,    0,    0,
-      315,  316,  314,  314,  314,  319,    0,  312,  312,  312,
-
-      317,  321,    0,    0,  322,  315,  315,  315,  318,    0,
-      316,  316,  316,  317,  317,  317,    0,  323,  318,  321,
-      325,    0,  319,  319,  319,  328,    0,    0,  321,  321,
-      321,  322,  322,  322,  326,  318,  318,  318,  323,  327,
-      326,    0,    0,  329,  323,  323,  323,  325,  325,  325,
-      332,    0,  328,  328,  328,  329,    0,    0,  333,  327,
-        0,  326,  326,  326,  332,  333,  327,  327,  327,  334,
-      329,  329,  329,  336,    0,    0,  335,  332,  332,  332,
-      338,    0,    0,  336,  337,  333,  333,  333,  335,    0,
-      337,  339,  334,    0,  338,  341,  334,  334,  334,  340,
-
-      336,  336,  336,  339,  342,  340,    0,  338,  338,  338,
-      342,  337,  337,  337,    0,  335,  335,  335,  339,  339,
-      339,  345,  341,  341,  341,  344,  340,  340,  340,  343,
-      344,  342,  342,  342,  348,  343,  345,  346,    0,    0,
-      348,  347,    0,    0,    0,  349,    0,    0,  345,  345,
-      345,  349,  344,  344,  344,  346,  343,  343,  343,  347,
-      351,  348,  348,  348,  346,  346,  346,  351,  347,  347,
-      347,  352,  349,  349,  349,  355,    0,  353,  352,  354,
-        0,    0,    0,  355,    0,    0,  356,  351,  351,  351,
-      353,    0,  356,    0,    0,  357,    0,    0,  352,  352,
-
-      352,    0,  358,  354,    0,  359,  354,  354,  354,    0,
-      355,  355,  355,  356,  356,  356,  357,  353,  353,  353,
-      358,  360,  357,  357,  357,    0,  363,    0,    0,  358,
-      358,  358,  359,  359,  359,  360,  361,    0,    0,  362,
-        0,    0,  361,  365,  362,  363,  366,    0,  360,  360,
-      360,  367,    0,  363,  363,  363,  368,  367,    0,  371,
-        0,    0,  368,  361,  361,  361,  362,  362,  362,  369,
-      365,  365,  365,  366,  366,  366,  370,  373,  367,  367,
-      367,  371,  370,  368,  368,  368,    0,  372,  369,  377,
-        0,    0,  374,    0,    0,  373,  369,  369,  369,  376,
-
-        0,    0,    0,  370,  370,  370,  372,  375,  371,  371,
-      371,  374,  377,  378,  372,  372,  372,    0,  376,  374,
-      374,  374,  373,  373,  373,    0,  376,  376,  376,  375,
-        0,  378,    0,    0,  375,  375,  375,  380,    0,  377,
-      377,  377,  382,  380,    0,    0,    0,    0,    0,    0,
-        0,    0,    0,    0,  382,    0,    0,    0,  378,  378,
-      378,    0,    0,    0,  380,  380,  380,    0,    0,  382,
-      382,  382,  384,  384,  384,  384,  384,  384,  384,  384,
-      384,  384,  384,  384,  384,  384,  385,  385,  385,  385,
-      385,  385,  385,  385,  385,  385,  385,  385,  385,  385,
-
-      386,  386,  386,  386,  386,  386,  386,  386,  386,  386,
-      386,  386,  386,  386,  387,  387,  387,  387,  387,  387,
-      387,  387,  387,  387,  387,  387,  387,  387,  388,    0,
-      388,    0,  388,    0,  388,  389,    0,    0,  389,    0,
-      389,  389,  389,  389,  389,  390,  390,    0,  390,  390,
-      390,  390,  390,  390,  391,  391,  391,  391,  391,  391,
-      391,  391,  391,  391,  391,  391,  391,  391,  392,  392,
-      392,  392,  392,  392,  392,  392,  392,  392,  392,  392,
-      392,  393,    0,  393,  393,  393,  393,  393,  393,  393,
-      393,  393,  393,  393,  393,  394,    0,  394,  394,  394,
-
-      394,  394,  394,  394,  394,  394,  394,  394,  394,  395,
-      395,  395,  395,  395,  395,  395,  395,  395,  396,  396,
-      396,  397,    0,    0,    0,    0,  397,  397,  397,  398,
-      398,  398,  398,  398,  399,  399,  399,    0,    0,  399,
-      400,  400,  400,  401,  401,  401,  401,  401,  401,  401,
-      401,  401,  383,  383,  383,  383,  383,  383,  383,  383,
-      383,  383,  383,  383,  383,  383,  383,  383,  383,  383,
-      383,  383,  383,  383,  383,  383,  383,  383,  383,  383,
-      383,  383,  383,  383,  383,  383,  383,  383,  383,  383,
-      383,  383,  383,  383,  383,  383,  383,  383,  383,  383,
-
-      383,  383,  383,  383,  383,  383,  383,  383,  383,  383,
-      383,  383,  383,  383,  383,  383,  383,  383,  383,  383
+        1,    1,    1,    1,    1,    1,    1,    1,    9,   11,
+        9,   13,   14,   13,   13,   13,   13,   13,   13,   13,
+       50,  383,   50,   73,   16,  366,   13,   14,   16,   19,
+       14,  344,   51,   82,   82,  201,   25,  343,  201,   20,
+
+      312,  211,   11,   25,   73,   13,   14,   15,   15,   15,
+       15,   15,   15,   15,   20,   16,   19,   19,   19,   15,
+       15,   15,  211,  311,   15,   51,   20,   20,   20,  310,
+       25,   25,   25,  309,  269,   22,  268,  267,   15,   15,
+       15,  266,   16,   16,   16,   15,   17,   22,   17,   17,
+       17,   17,   17,   17,   17,  265,   23,  264,   17,  261,
+      259,   17,   22,   22,   22,   17,  258,  213,  209,   17,
+       23,   17,  208,   17,  207,   24,  206,   17,   24,  205,
+       17,  204,  196,   23,   23,   23,   17,  150,   24,  149,
+       24,   28,  147,   17,  146,   17,   21,   21,   24,  145,
+
+       21,   21,   21,   21,   21,   21,   21,   26,   26,   26,
+       26,   26,   26,   26,   28,   24,   24,   24,   28,   28,
+       28,   29,  144,  143,  136,  133,   21,  131,  127,  126,
+       29,  125,  124,   80,   79,   78,   29,   71,   70,   69,
+       32,   68,   59,   57,   54,   33,   53,   47,   29,   29,
+       29,   34,   32,   21,   21,   21,   27,   27,   27,   27,
+       30,   27,   30,   33,   27,   34,   27,   32,   32,   32,
+       30,   27,   33,   33,   33,   30,   35,   46,   34,   34,
+       34,   37,   45,   44,   36,   43,   36,   30,   30,   30,
+       36,   35,   76,   31,   36,   38,   18,   37,   27,   27,
+
+       27,   38,   40,   35,   35,   35,   39,   12,   37,   37,
+       37,   36,   36,   36,   42,   39,   42,    7,    6,   76,
+       76,   76,   38,   38,   38,   40,   39,    5,    4,   40,
+       40,   40,    3,   39,   39,   39,   41,    0,    0,   41,
+        0,   42,   42,   42,    0,    0,   41,    0,   41,    0,
+       41,    0,    0,   66,    0,   41,   55,   55,   55,   55,
+       55,   55,    0,   41,   41,   41,   58,   58,    0,    0,
+       58,   58,   58,   58,   58,   58,   58,    0,   62,   62,
+       66,   55,   62,   62,   62,   62,   62,   62,   62,   67,
+       67,   67,   67,   67,   67,   67,   81,    0,    0,   74,
+
+       77,   77,   77,   77,   77,    0,   74,   66,   66,   66,
+       74,   84,   83,   83,   85,    0,   77,   81,   74,    0,
+       87,   85,    0,   81,   81,   81,   84,   74,   83,   87,
+       83,    0,   86,   83,   74,   77,   86,   88,   84,   84,
+       84,   85,   85,   85,   88,    0,   90,   83,    0,   83,
+       89,    0,    0,    0,   83,   90,   87,   87,   87,   91,
+       77,    0,   89,   86,   86,   86,   92,    0,    0,    0,
+       93,   88,   88,   88,    0,   92,   93,   89,   89,   89,
+        0,   96,   90,   90,   90,    0,   91,   91,   91,   94,
+        0,    0,   95,   92,   92,   92,   97,   93,   93,   93,
+
+       96,    0,   95,   94,   95,    0,    0,   95,   96,   96,
+       96,   97,    0,    0,   98,    0,   94,   94,   94,   95,
+       95,   95,    0,   98,   99,    0,   97,  100,    0,  100,
+        0,    0,  101,    0,   98,   98,    0,  102,   97,   97,
+       97,   98,   98,   98,   99,  101,  104,    0,    0,  103,
+        0,   99,   99,   99,  100,  100,  100,  102,  105,  101,
+      101,  101,  103,    0,  102,  102,  102,  104,  106,    0,
+        0,    0,    0,  104,  104,  104,  103,  103,  103,  105,
+      108,    0,    0,  106,  107,  105,  105,  105,  109,    0,
+        0,  110,    0,    0,  111,  106,  106,  106,  112,  107,
+
+      108,  113,  109,  113,  114,  110,  114,  108,  108,  108,
+      112,  107,  107,  107,  111,  109,  109,  109,  110,  110,
+      110,  111,  111,  111,  115,  112,  112,  112,  113,  113,
+      113,  114,  114,  114,    0,    0,  116,    0,    0,  115,
+      117,    0,    0,  118,    0,    0,  119,    0,    0,    0,
+      121,  115,  115,  115,  116,    0,  117,    0,    0,    0,
+      119,  120,  121,  116,  116,  116,  118,  117,  117,  117,
+      118,  118,  118,  119,  119,  119,  120,  121,  121,  121,
+      148,    0,  122,    0,  148,  123,  132,    0,  120,  120,
+      120,  122,  132,  132,  132,  132,  132,  132,    0,    0,
+
+        0,  148,  140,  123,  141,    0,    0,    0,  148,  122,
+      122,  122,  123,  123,  123,  134,  134,  134,  134,  134,
+      134,  134,  135,  135,  135,  135,  135,  135,  135,  140,
+        0,  141,  141,  141,  135,    0,  135,    0,    0,  135,
+      137,  137,  137,  137,  137,  137,  137,  198,  198,  198,
+      198,  198,  198,  135,  152,  135,  140,  140,  140,  153,
+      135,  138,  138,  138,  138,  138,  138,  138,  142,  142,
+      142,  142,  142,  138,    0,  138,    0,  151,  138,    0,
+      151,  152,  152,  152,  142,    0,  153,  153,  153,  154,
+        0,  154,  138,  156,  138,  157,    0,    0,  160,  138,
+
+        0,    0,  155,  142,  151,  151,  151,    0,  156,  155,
+        0,  159,  155,  158,    0,    0,  154,  154,  154,  160,
+      158,  159,  157,  157,  157,  160,  160,  160,  142,  155,
+      155,  155,  161,    0,    0,  156,  156,  156,  162,  161,
+      158,  158,  158,  162,  163,    0,    0,  164,  159,  159,
+      159,  165,  167,  164,    0,  166,  163,    0,  167,  161,
+      161,  161,  166,    0,    0,  162,  162,  162,  170,  165,
+      168,  163,  163,  163,  164,  164,  164,  169,  165,  165,
+      165,    0,  168,  170,    0,  167,  167,  167,  172,  166,
+      166,  166,  171,    0,  172,  170,  170,  170,  169,    0,
+
+      173,    0,    0,    0,  169,  169,  169,  174,  171,  168,
+      168,  168,  175,    0,  175,  172,  172,  172,  173,  171,
+      171,  171,    0,  174,  176,    0,    0,  173,  173,  173,
+      176,  178,    0,  210,  174,  174,  174,  210,  187,  175,
+      175,  175,  177,    0,  178,  177,  179,    0,  179,    0,
+      183,  176,  176,  176,  210,  180,  187,  183,  178,  178,
+      178,  210,    0,    0,  181,  187,  187,  187,  188,  177,
+      177,  177,  182,  179,  179,  179,  180,  183,  183,  183,
+      182,  185,  180,  180,  180,  181,    0,  184,  189,  188,
+        0,  181,  186,    0,  189,  188,  188,  188,  185,  182,
+
+      182,  182,  184,    0,  186,  190,  184,    0,  185,  185,
+      185,    0,  181,  181,  181,  189,  189,  189,  191,  186,
+      186,  186,  192,    0,    0,  190,  202,  193,    0,  184,
+      184,  184,  190,  190,  190,    0,  192,  193,  191,    0,
+        0,    0,  194,    0,    0,  191,  191,  191,  195,  192,
+      192,  192,    0,  202,  193,  193,  193,  194,  195,  203,
+      203,  203,  203,  203,  203,  203,  214,    0,    0,  194,
+      194,  194,  215,  218,    0,  195,  195,  195,  214,  216,
+      202,  202,  202,  217,    0,    0,    0,  218,  220,    0,
+      219,    0,  215,  214,  214,  214,  220,  217,    0,  215,
+
+      215,  215,    0,    0,    0,  233,  216,  216,  216,  222,
+      217,  217,  217,  221,  218,  218,  218,  219,  219,  219,
+      223,  222,    0,  220,  220,  220,  225,  221,    0,    0,
+      223,  224,  233,  233,  233,  229,  222,  222,  222,  226,
+      221,  221,  221,  224,  227,  229,  225,  223,  223,  223,
+      227,  228,  226,  225,  225,  225,  231,    0,  224,  224,
+      224,  234,  229,  229,  229,  239,  226,  226,  226,  228,
+      230,  227,  227,  227,  231,  232,  236,  230,  228,  228,
+      228,  232,  237,  231,  231,  231,  235,    0,  234,  234,
+      234,  241,  239,  239,  239,  236,  237,  230,  230,  230,
+
+      238,  235,  232,  232,  232,  240,    0,  241,  242,  237,
+      237,  237,  238,  235,  235,  235,    0,  244,  241,  241,
+      241,  247,  236,  236,  236,  240,  245,  238,  238,  238,
+      242,    0,  240,  240,  240,  243,    0,    0,    0,    0,
+      245,    0,  247,  243,  244,  244,  244,  246,  247,  247,
+      247,  248,  246,    0,    0,    0,  250,  242,  242,  242,
+      250,  249,  243,  243,  243,  252,    0,  245,  245,  245,
+        0,  252,  251,    0,  246,  246,  246,  253,  248,  248,
+      248,  249,    0,  250,  250,  250,  262,  254,  249,  249,
+      249,  251,  252,  252,  252,  254,    0,    0,  253,  251,
+
+      251,  251,  256,    0,  253,  255,    0,    0,  257,    0,
+      257,    0,    0,  262,  254,  254,  254,    0,  255,    0,
+      256,    0,  270,    0,    0,  253,  253,  253,  270,  256,
+      256,  256,  255,  255,  255,  257,  257,  257,  271,    0,
+      262,  262,  262,  263,  263,  263,  263,  263,  271,  270,
+      270,  270,  272,  273,    0,  275,    0,    0,  274,  263,
+        0,  276,  272,  276,    0,  273,  275,    0,  274,    0,
+        0,  277,    0,  277,    0,  271,  271,  271,  263,  272,
+      272,  272,  275,  275,  275,  278,    0,  278,  276,  276,
+      276,  281,  273,  273,  273,  274,  274,  274,  277,  277,
+
+      277,  279,    0,  263,  280,  279,  280,  282,    0,    0,
+        0,  281,  283,    0,  278,  278,  278,    0,  281,  281,
+      281,  285,  282,  285,  283,  286,    0,    0,  279,  279,
+      279,  280,  280,  280,  282,  282,  282,  284,    0,  283,
+      283,  283,  287,  286,  284,    0,    0,    0,  285,  285,
+      285,  290,  286,  286,  286,  289,  291,  290,  292,    0,
+      294,  293,  299,  287,  284,  284,  284,  293,  297,  287,
+      287,  287,  294,    0,  289,  291,    0,    0,  290,  290,
+      290,  299,  289,  289,  289,  292,  292,  292,  293,  293,
+      293,  295,    0,  301,  298,  297,  297,  297,  295,  294,
+
+      294,  294,  291,  291,  291,  296,    0,    0,  299,  299,
+      299,  296,  300,    0,  298,  301,    0,    0,  295,  295,
+      295,  298,  298,  298,  303,    0,    0,  302,    0,    0,
+      305,    0,  296,  296,  296,  302,  304,    0,    0,  300,
+      300,  300,  301,  301,  301,  306,  304,    0,  306,  315,
+      305,  303,  303,  303,  302,  302,  302,  305,  305,  305,
+      313,  314,    0,  304,  304,  304,  316,    0,    0,  315,
+      313,    0,  306,  306,  306,  314,  315,  315,  315,  317,
+      319,  318,    0,  317,    0,    0,  318,    0,  314,  314,
+      314,  320,    0,  316,  316,  316,    0,  313,  313,  313,
+
+      319,  321,    0,  321,  323,  320,    0,  319,  319,  319,
+      317,  317,  317,  318,  318,  318,  322,    0,  320,  320,
+      320,    0,  324,    0,  323,  322,  324,  326,  321,  321,
+      321,  323,  323,  323,    0,    0,  325,    0,    0,  326,
+        0,  327,    0,  322,  322,  322,    0,    0,  330,  324,
+      324,  324,  325,  327,  326,  326,  326,    0,  328,    0,
+        0,    0,  330,  325,  325,  325,  328,  332,  327,  327,
+      327,  329,    0,    0,  329,  330,  330,  330,  331,    0,
+        0,    0,    0,  334,    0,  328,  328,  328,  331,  335,
+        0,    0,  336,    0,  332,  332,  332,  338,  329,  329,
+
+      329,  334,  339,    0,    0,  331,  331,  331,  339,  341,
+      334,  334,  334,  336,  340,  348,  335,  335,  335,  336,
+      336,  336,    0,  342,  338,  338,  338,    0,  348,  339,
+      339,  339,  345,    0,  340,  342,  341,  341,  341,    0,
+      346,  340,  340,  340,    0,    0,  345,  346,  347,    0,
+      342,  342,  342,  349,    0,  348,  348,  348,  350,  345,
+      345,  345,  352,  349,  350,  351,    0,  346,  346,  346,
+        0,  347,  353,    0,  352,  347,  347,  347,  353,  351,
+      349,  349,  349,  354,    0,  350,  350,  350,    0,  352,
+      352,  352,  351,  351,  351,    0,    0,  355,    0,  353,
+
+      353,  353,  355,  356,    0,    0,    0,  357,    0,  356,
+      354,  354,  354,  357,  358,    0,    0,  359,    0,    0,
+      358,    0,  360,    0,  355,  355,  355,  360,    0,  359,
+      356,  356,  356,  361,  357,  357,  357,  362,    0,    0,
+      363,  358,  358,  358,  359,  359,  359,  364,  361,  360,
+      360,  360,  367,  364,    0,  362,    0,  365,  363,  367,
+      361,  361,  361,  365,  362,  362,  362,  363,  363,  363,
+      368,    0,    0,  369,  364,  364,  364,  368,  370,  367,
+      367,  367,  371,  372,  365,  365,  365,  369,    0,  372,
+        0,  371,    0,    0,    0,    0,  373,  368,  368,  368,
+
+        0,    0,  370,  374,    0,  370,  370,  370,  376,    0,
+      372,  372,  372,  377,  369,  369,  369,  373,  371,  371,
+      371,  374,  375,  373,  373,  373,  376,  378,  377,  375,
+      374,  374,  374,  379,    0,  376,  376,  376,  380,    0,
+      377,  377,  377,  381,  380,    0,  384,  379,  381,  375,
+      375,  375,  385,    0,  378,  378,  378,  382,    0,    0,
+      379,  379,  379,  386,    0,  380,  380,  380,  388,  386,
+      381,  381,  381,  384,  384,  384,  382,  387,  390,  385,
+      385,  385,  389,  387,  382,  382,  382,  388,  389,  394,
+      386,  386,  386,  391,  392,  388,  388,  388,  393,    0,
+
+      395,  390,  393,    0,  387,  387,  387,    0,  394,  389,
+      389,  389,  396,    0,  392,  391,  394,  394,  394,  395,
+        0,  392,  392,  392,  400,  393,  393,  393,  390,  390,
+      390,  396,  397,  399,  400,    0,  398,    0,    0,  396,
+      396,  396,  391,  391,  391,  401,  395,  395,  395,  402,
+        0,  400,  400,  400,  397,  398,  401,  399,    0,  397,
+      397,  397,    0,  398,  398,  398,    0,    0,  402,    0,
+        0,  404,  401,  401,  401,  405,  406,  404,  406,    0,
+        0,  405,  408,    0,  399,  399,  399,    0,    0,  409,
+        0,    0,    0,    0,  408,  402,  402,  402,  404,  404,
+
+      404,    0,  405,  405,  405,  406,  406,  406,  409,  408,
+      408,  408,    0,  410,    0,    0,  409,  409,  409,  410,
+      411,    0,    0,    0,  412,    0,    0,  413,    0,    0,
+      414,    0,    0,    0,    0,    0,  415,  413,  411,    0,
+      410,  410,  410,  412,    0,  414,    0,  411,  411,  411,
+      415,  412,  412,  412,  413,  413,  413,  414,  414,  414,
+        0,    0,    0,  415,  415,  415,  417,  417,  417,  417,
+      417,  417,  417,  417,  417,  417,  417,  417,  417,  417,
+      418,  418,  418,  418,  418,  418,  418,  418,  418,  418,
+      418,  418,  418,  418,  419,  419,  419,  419,  419,  419,
+
+      419,  419,  419,  419,  419,  419,  419,  419,  420,  420,
+      420,  420,  420,  420,  420,  420,  420,  420,  420,  420,
+      420,  420,  421,    0,  421,    0,  421,    0,  421,  422,
+        0,    0,  422,    0,  422,  422,  422,  422,  422,  423,
+      423,    0,  423,  423,  423,  423,  423,  423,  424,  424,
+      424,  424,  424,  424,  424,  424,  424,  424,  424,  424,
+      424,  424,  425,  425,  425,  425,  425,  425,  425,  425,
+      425,  425,  425,  425,  425,  426,    0,  426,  426,  426,
+      426,  426,  426,  426,  426,  426,  426,  426,  426,  427,
+        0,  427,  427,  427,  427,  427,  427,  427,  427,  427,
+
+      427,  427,  427,  428,  428,  428,  428,  428,  428,  428,
+      428,  428,  429,  429,  429,  430,    0,    0,    0,    0,
+      430,  430,  430,  431,  431,  431,  431,  431,  432,  432,
+      432,    0,    0,  432,  433,  433,  433,  434,  434,  434,
+      434,  434,  434,  434,  434,  434,  416,  416,  416,  416,
+      416,  416,  416,  416,  416,  416,  416,  416,  416,  416,
+      416,  416,  416,  416,  416,  416,  416,  416,  416,  416,
+      416,  416,  416,  416,  416,  416,  416,  416,  416,  416,
+      416,  416,  416,  416,  416,  416,  416,  416,  416,  416,
+      416,  416,  416,  416,  416,  416,  416,  416,  416,  416,
+
+      416,  416,  416,  416,  416,  416,  416,  416,  416,  416,
+      416,  416,  416,  416,  416
     } ;
 
 static yy_state_type yy_last_accepting_state;
@@ -1122,6 +1176,10 @@ char *ncgtext;
 
 /* Fill value used by ncdump from version 2.4 and later.  Should match
    definition of FILL_STRING in ../ncdump/vardata.h */
+
+#include "ncgen.h"
+#include "ncgeny.h"
+
 #define FILL_STRING "_"
 #define XDR_INT32_MIN (-2147483647-1)
 #define XDR_INT32_MAX 2147483647
@@ -1203,19 +1261,19 @@ static int tagmatch(nc_type nct, int tag);
 static int nct2lexeme(nc_type nct);
 static int collecttag(char* text, char** stagp);
 
-static struct Specialtoken {
-    char* name;
-    int   token;
-} specials[] = {
-{"_FillValue",_FILLVALUE},
-{"_Format",_FORMAT},
-{"_Storage",_STORAGE},
-{"_ChunkSizes",_CHUNKSIZES},
-{"_Fletcher32",_FLETCHER32},
-{"_DeflateLevel",_DEFLATELEVEL},
-{"_Shuffle",_SHUFFLE},
-{"_Endianness",_ENDIANNESS},
-{"_NoFill",_NOFILL},
+struct Specialtoken specials[] = {
+{"_FillValue",_FILLVALUE,_FILLVALUE_FLAG},
+{"_Format",_FORMAT,_FORMAT_FLAG},
+{"_Storage",_STORAGE,_STORAGE_FLAG},
+{"_ChunkSizes",_CHUNKSIZES,_CHUNKSIZES_FLAG},
+{"_Fletcher32",_FLETCHER32,_FLETCHER32_FLAG},
+{"_DeflateLevel",_DEFLATELEVEL,_DEFLATE_FLAG},
+{"_Shuffle",_SHUFFLE,_SHUFFLE_FLAG},
+{"_Endianness",_ENDIANNESS,_ENDIAN_FLAG},
+{"_NoFill",_NOFILL,_NOFILL_FLAG},
+{"_NCProperties",_NCPROPS,_NCPROPS_FLAG},
+{"_IsNetcdf4",_ISNETCDF4,_ISNETCDF4_FLAG},
+{"_SuperblockVersion",_SUPERBLOCK,_SUPERBLOCK_FLAG},
 {NULL,0} /* null terminate */
 };
 
@@ -1262,7 +1320,7 @@ ID ([A-Za-z_]|{UTF8})([A-Z.@#\[\]a-z_0-9+-]|{UTF8})*
 /* Note: this definition of string will work for utf8 as well,
    although it is a very relaxed definition
 */
-#line 1266 "lex.ncg.c"
+#line 1324 "lex.ncg.c"
 
 #define INITIAL 0
 #define ST_C_COMMENT 1
@@ -1446,9 +1504,9 @@ YY_DECL
 	register char *yy_cp, *yy_bp;
 	register int yy_act;
     
-#line 213 "ncgen.l"
+#line 217 "ncgen.l"
 
-#line 1452 "lex.ncg.c"
+#line 1510 "lex.ncg.c"
 
 	if ( !(yy_init) )
 		{
@@ -1501,13 +1559,13 @@ yy_match:
 			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
 				{
 				yy_current_state = (int) yy_def[yy_current_state];
-				if ( yy_current_state >= 384 )
+				if ( yy_current_state >= 417 )
 					yy_c = yy_meta[(unsigned int) yy_c];
 				}
 			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
 			++yy_cp;
 			}
-		while ( yy_current_state != 383 );
+		while ( yy_current_state != 416 );
 		yy_cp = (yy_last_accepting_cpos);
 		yy_current_state = (yy_last_accepting_state);
 
@@ -1529,14 +1587,14 @@ do_action:	/* This label is used only to access EOF actions. */
 
 case 1:
 YY_RULE_SETUP
-#line 214 "ncgen.l"
+#line 218 "ncgen.l"
 { /* whitespace */
 		  break;
 		}
 	YY_BREAK
 case 2:
 YY_RULE_SETUP
-#line 218 "ncgen.l"
+#line 222 "ncgen.l"
 { /* comment */
                           break;
                         }
@@ -1544,7 +1602,7 @@ YY_RULE_SETUP
 case 3:
 /* rule 3 can match eol */
 YY_RULE_SETUP
-#line 222 "ncgen.l"
+#line 226 "ncgen.l"
 {int len;
 			 /* In netcdf4, this will be used in a variety
                             of places, so only remove escapes */
@@ -1571,7 +1629,7 @@ ncgtext[MAXTRST-1] = '\0';
 	YY_BREAK
 case 4:
 YY_RULE_SETUP
-#line 246 "ncgen.l"
+#line 250 "ncgen.l"
 { /* drop leading 0x; pad to even number of chars */
 		char* p = ncgtext+2;
 		int len = ncgleng - 2;
@@ -1586,113 +1644,113 @@ YY_RULE_SETUP
 	YY_BREAK
 case 5:
 YY_RULE_SETUP
-#line 258 "ncgen.l"
+#line 262 "ncgen.l"
 {return lexdebug(COMPOUND);}
 	YY_BREAK
 case 6:
 YY_RULE_SETUP
-#line 259 "ncgen.l"
+#line 263 "ncgen.l"
 {return lexdebug(ENUM);}
 	YY_BREAK
 case 7:
 YY_RULE_SETUP
-#line 260 "ncgen.l"
+#line 264 "ncgen.l"
 {return lexdebug(OPAQUE);}
 	YY_BREAK
 case 8:
 YY_RULE_SETUP
-#line 262 "ncgen.l"
+#line 266 "ncgen.l"
 {return lexdebug(FLOAT_K);}
 	YY_BREAK
 case 9:
 YY_RULE_SETUP
-#line 263 "ncgen.l"
+#line 267 "ncgen.l"
 {return lexdebug(CHAR_K);}
 	YY_BREAK
 case 10:
 YY_RULE_SETUP
-#line 264 "ncgen.l"
+#line 268 "ncgen.l"
 {return lexdebug(BYTE_K);}
 	YY_BREAK
 case 11:
 YY_RULE_SETUP
-#line 265 "ncgen.l"
+#line 269 "ncgen.l"
 {return lexdebug(UBYTE_K);}
 	YY_BREAK
 case 12:
 YY_RULE_SETUP
-#line 266 "ncgen.l"
+#line 270 "ncgen.l"
 {return lexdebug(SHORT_K);}
 	YY_BREAK
 case 13:
 YY_RULE_SETUP
-#line 267 "ncgen.l"
+#line 271 "ncgen.l"
 {return lexdebug(USHORT_K);}
 	YY_BREAK
 case 14:
 YY_RULE_SETUP
-#line 268 "ncgen.l"
+#line 272 "ncgen.l"
 {return lexdebug(INT_K);}
 	YY_BREAK
 case 15:
 YY_RULE_SETUP
-#line 269 "ncgen.l"
+#line 273 "ncgen.l"
 {return lexdebug(UINT_K);}
 	YY_BREAK
 case 16:
 YY_RULE_SETUP
-#line 270 "ncgen.l"
+#line 274 "ncgen.l"
 {return lexdebug(INT64_K);}
 	YY_BREAK
 case 17:
 YY_RULE_SETUP
-#line 271 "ncgen.l"
+#line 275 "ncgen.l"
 {return lexdebug(UINT64_K);}
 	YY_BREAK
 case 18:
 YY_RULE_SETUP
-#line 272 "ncgen.l"
+#line 276 "ncgen.l"
 {return lexdebug(DOUBLE_K);}
 	YY_BREAK
 case 19:
 YY_RULE_SETUP
-#line 273 "ncgen.l"
+#line 277 "ncgen.l"
 {int32_val = -1;
 			 return lexdebug(NC_UNLIMITED_K);}
 	YY_BREAK
 case 20:
 YY_RULE_SETUP
-#line 276 "ncgen.l"
+#line 280 "ncgen.l"
 {return lexdebug(TYPES);}
 	YY_BREAK
 case 21:
 YY_RULE_SETUP
-#line 277 "ncgen.l"
+#line 281 "ncgen.l"
 {return lexdebug(DIMENSIONS);}
 	YY_BREAK
 case 22:
 YY_RULE_SETUP
-#line 278 "ncgen.l"
+#line 282 "ncgen.l"
 {return lexdebug(VARIABLES);}
 	YY_BREAK
 case 23:
 YY_RULE_SETUP
-#line 279 "ncgen.l"
+#line 283 "ncgen.l"
 {return lexdebug(DATA);}
 	YY_BREAK
 case 24:
 YY_RULE_SETUP
-#line 280 "ncgen.l"
+#line 284 "ncgen.l"
 {return lexdebug(GROUP);}
 	YY_BREAK
 case 25:
 YY_RULE_SETUP
-#line 282 "ncgen.l"
+#line 286 "ncgen.l"
 {BEGIN(TEXT);return lexdebug(NETCDF);}
 	YY_BREAK
 case 26:
 YY_RULE_SETUP
-#line 284 "ncgen.l"
+#line 288 "ncgen.l"
 { /* missing value (pre-2.4 backward compatibility) */
                 if (ncgtext[0] == '-') {
 		    double_val = NEGNC_INFINITE;
@@ -1705,7 +1763,7 @@ YY_RULE_SETUP
 	YY_BREAK
 case 27:
 YY_RULE_SETUP
-#line 293 "ncgen.l"
+#line 297 "ncgen.l"
 { /* missing value (pre-2.4 backward compatibility) */
 		double_val = NAN;
 		specialconstants = 1;
@@ -1714,7 +1772,7 @@ YY_RULE_SETUP
 	YY_BREAK
 case 28:
 YY_RULE_SETUP
-#line 299 "ncgen.l"
+#line 303 "ncgen.l"
 {/* missing value (pre-2.4 backward compatibility)*/
                 if (ncgtext[0] == '-') {
 		    float_val = NEGNC_INFINITEF;
@@ -1727,7 +1785,7 @@ YY_RULE_SETUP
 	YY_BREAK
 case 29:
 YY_RULE_SETUP
-#line 308 "ncgen.l"
+#line 312 "ncgen.l"
 { /* missing value (pre-2.4 backward compatibility) */
 		float_val = NANF;
 		specialconstants = 1;
@@ -1736,7 +1794,7 @@ YY_RULE_SETUP
 	YY_BREAK
 case 30:
 YY_RULE_SETUP
-#line 314 "ncgen.l"
+#line 318 "ncgen.l"
 {
 #ifdef USE_NETCDF4
 		if(l_flag == L_C || l_flag == L_BINARY)
@@ -1749,7 +1807,7 @@ YY_RULE_SETUP
 	YY_BREAK
 case 31:
 YY_RULE_SETUP
-#line 324 "ncgen.l"
+#line 328 "ncgen.l"
 {
 		bbClear(lextext);
 		bbAppendn(lextext,(char*)ncgtext,ncgleng+1); /* include null */
@@ -1760,7 +1818,7 @@ YY_RULE_SETUP
 	YY_BREAK
 case 32:
 YY_RULE_SETUP
-#line 333 "ncgen.l"
+#line 337 "ncgen.l"
 {struct Specialtoken* st;
 		bbClear(lextext);
 		bbAppendn(lextext,(char*)ncgtext,ncgleng+1); /* include null */
@@ -1774,7 +1832,7 @@ YY_RULE_SETUP
 case 33:
 /* rule 33 can match eol */
 YY_RULE_SETUP
-#line 343 "ncgen.l"
+#line 347 "ncgen.l"
 {
 		    int c;
 		    char* p; char* q;
@@ -1793,7 +1851,7 @@ YY_RULE_SETUP
 	YY_BREAK
 case 34:
 YY_RULE_SETUP
-#line 359 "ncgen.l"
+#line 363 "ncgen.l"
 { char* id; int len;
 		    bbClear(lextext);
 		    bbAppendn(lextext,(char*)ncgtext,ncgleng+1); /* include null */
@@ -1808,7 +1866,7 @@ YY_RULE_SETUP
 	YY_BREAK
 case 35:
 YY_RULE_SETUP
-#line 371 "ncgen.l"
+#line 375 "ncgen.l"
 {
 		/*
 		  We need to try to see what size of integer ((u)int).
@@ -1877,7 +1935,7 @@ done: return 0;
 	YY_BREAK
 case 36:
 YY_RULE_SETUP
-#line 437 "ncgen.l"
+#line 441 "ncgen.l"
 {
 		int c;
 		int token = 0;
@@ -1928,7 +1986,7 @@ YY_RULE_SETUP
 	YY_BREAK
 case 37:
 YY_RULE_SETUP
-#line 484 "ncgen.l"
+#line 488 "ncgen.l"
 {
 		if (sscanf((char*)ncgtext, "%le", &double_val) != 1) {
 		    sprintf(errstr,"bad long or double constant: %s",(char*)ncgtext);
@@ -1939,7 +1997,7 @@ YY_RULE_SETUP
 	YY_BREAK
 case 38:
 YY_RULE_SETUP
-#line 491 "ncgen.l"
+#line 495 "ncgen.l"
 {
 		if (sscanf((char*)ncgtext, "%e", &float_val) != 1) {
 		    sprintf(errstr,"bad float constant: %s",(char*)ncgtext);
@@ -1951,7 +2009,7 @@ YY_RULE_SETUP
 case 39:
 /* rule 39 can match eol */
 YY_RULE_SETUP
-#line 498 "ncgen.l"
+#line 502 "ncgen.l"
 {
 	        (void) sscanf((char*)&ncgtext[1],"%c",&byte_val);
 		return lexdebug(BYTE_CONST);
@@ -1959,7 +2017,7 @@ YY_RULE_SETUP
 	YY_BREAK
 case 40:
 YY_RULE_SETUP
-#line 502 "ncgen.l"
+#line 506 "ncgen.l"
 {
 		int oct = unescapeoct(&ncgtext[2]);
 		if(oct < 0) {
@@ -1972,7 +2030,7 @@ YY_RULE_SETUP
 	YY_BREAK
 case 41:
 YY_RULE_SETUP
-#line 511 "ncgen.l"
+#line 515 "ncgen.l"
 {
 		int hex = unescapehex(&ncgtext[3]);
 		if(byte_val < 0) {
@@ -1985,7 +2043,7 @@ YY_RULE_SETUP
 	YY_BREAK
 case 42:
 YY_RULE_SETUP
-#line 520 "ncgen.l"
+#line 524 "ncgen.l"
 {
 	       switch ((char)ncgtext[2]) {
 	          case 'a': byte_val = '\007'; break; /* not everyone under-
@@ -2007,7 +2065,7 @@ YY_RULE_SETUP
 case 43:
 /* rule 43 can match eol */
 YY_RULE_SETUP
-#line 538 "ncgen.l"
+#line 542 "ncgen.l"
 {
 		lineno++ ;
                 break;
@@ -2015,7 +2073,7 @@ YY_RULE_SETUP
 	YY_BREAK
 case 44:
 YY_RULE_SETUP
-#line 543 "ncgen.l"
+#line 547 "ncgen.l"
 {/*initial*/
 	    BEGIN(ST_C_COMMENT);
 	    break;
@@ -2024,21 +2082,21 @@ YY_RULE_SETUP
 case 45:
 /* rule 45 can match eol */
 YY_RULE_SETUP
-#line 548 "ncgen.l"
+#line 552 "ncgen.l"
 {/* continuation */
 				     break;
 				}
 	YY_BREAK
 case 46:
 YY_RULE_SETUP
-#line 552 "ncgen.l"
+#line 556 "ncgen.l"
 {/* final */
 			    BEGIN(INITIAL);
 			    break;
 			}
 	YY_BREAK
 case YY_STATE_EOF(ST_C_COMMENT):
-#line 557 "ncgen.l"
+#line 561 "ncgen.l"
 {/* final, error */
 			    fprintf(stderr,"unterminated /**/ comment");
 			    BEGIN(INITIAL);
@@ -2047,17 +2105,17 @@ case YY_STATE_EOF(ST_C_COMMENT):
 	YY_BREAK
 case 47:
 YY_RULE_SETUP
-#line 563 "ncgen.l"
+#line 567 "ncgen.l"
 {/* Note: this next rule will not work for UTF8 characters */
 		return lexdebug(ncgtext[0]) ;
 		}
 	YY_BREAK
 case 48:
 YY_RULE_SETUP
-#line 566 "ncgen.l"
+#line 570 "ncgen.l"
 ECHO;
 	YY_BREAK
-#line 2061 "lex.ncg.c"
+#line 2119 "lex.ncg.c"
 case YY_STATE_EOF(INITIAL):
 case YY_STATE_EOF(TEXT):
 	yyterminate();
@@ -2351,7 +2409,7 @@ static int yy_get_next_buffer (void)
 		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
 			{
 			yy_current_state = (int) yy_def[yy_current_state];
-			if ( yy_current_state >= 384 )
+			if ( yy_current_state >= 417 )
 				yy_c = yy_meta[(unsigned int) yy_c];
 			}
 		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
@@ -2379,11 +2437,11 @@ static int yy_get_next_buffer (void)
 	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
 		{
 		yy_current_state = (int) yy_def[yy_current_state];
-		if ( yy_current_state >= 384 )
+		if ( yy_current_state >= 417 )
 			yy_c = yy_meta[(unsigned int) yy_c];
 		}
 	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-	yy_is_jam = (yy_current_state == 383);
+	yy_is_jam = (yy_current_state == 416);
 
 	return yy_is_jam ? 0 : yy_current_state;
 }
@@ -3056,7 +3114,7 @@ void ncgfree (void * ptr )
 
 #define YYTABLES_NAME "yytables"
 
-#line 566 "ncgen.l"
+#line 570 "ncgen.l"
 
 
 static int
diff --git a/ncgen/ncgeny.c b/ncgen/ncgeny.c
index e43896e..44f123b 100644
--- a/ncgen/ncgeny.c
+++ b/ncgen/ncgeny.c
@@ -121,7 +121,10 @@
      _ENDIANNESS = 302,
      _NOFILL = 303,
      _FLETCHER32 = 304,
-     DATASETID = 305
+     _NCPROPS = 305,
+     _ISNETCDF4 = 306,
+     _SUPERBLOCK = 307,
+     DATASETID = 308
    };
 #endif
 /* Tokens.  */
@@ -172,7 +175,10 @@
 #define _ENDIANNESS 302
 #define _NOFILL 303
 #define _FLETCHER32 304
-#define DATASETID 305
+#define _NCPROPS 305
+#define _ISNETCDF4 306
+#define _SUPERBLOCK 307
+#define DATASETID 308
 
 
 
@@ -185,6 +191,8 @@ static char SccsId[] = "$Id: ncgen.y,v 1.42 2010/05/18 21:32:46 dmh Exp $";
 */
 #include        "includes.h"
 #include        "offsets.h"
+#include        "ncgeny.h"
+#include        "ncgen.h"
 
 /* Following are in ncdump (for now)*/
 /* Need some (unused) definitions to get it to compile */
@@ -240,6 +248,8 @@ char* primtypenames[PRIMNO] = {
 "string"
 };
 
+static int GLOBAL_SPECIAL = _NCPROPS_FLAG | _ISNETCDF4_FLAG | _SUPERBLOCK_FLAG | _FORMAT_FLAG ;
+
 /*Defined in ncgen.l*/
 extern int lineno;              /* line number for error messages */
 extern Bytebuffer* lextext;           /* name or string with escapes removed */
@@ -283,6 +293,7 @@ static Symbol* makespecial(int tag, Symbol* vsym, Symbol* tsym, void* data, int
 static int containsfills(Datalist* list);
 static void datalistextend(Datalist* dl, NCConstant* con);
 static void vercheck(int ncid);
+static long long extractint(NCConstant con);
 
 int yylex(void);
 
@@ -317,7 +328,7 @@ extern int lex_init(void);
 
 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
 typedef union YYSTYPE
-#line 131 "ncgen.y"
+#line 136 "ncgen.y"
 {
 Symbol* sym;
 unsigned long  size; /* allow for zero size to indicate e.g. UNLIMITED*/
@@ -327,7 +338,7 @@ Datalist*      datalist;
 NCConstant       constant;
 }
 /* Line 193 of yacc.c.  */
-#line 331 "ncgen.tab.c"
+#line 342 "ncgen.tab.c"
 	YYSTYPE;
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
 # define YYSTYPE_IS_DECLARED 1
@@ -340,7 +351,7 @@ NCConstant       constant;
 
 
 /* Line 216 of yacc.c.  */
-#line 344 "ncgen.tab.c"
+#line 355 "ncgen.tab.c"
 
 #ifdef short
 # undef short
@@ -555,20 +566,20 @@ union yyalloc
 /* YYFINAL -- State number of the termination state.  */
 #define YYFINAL  5
 /* YYLAST -- Last index in YYTABLE.  */
-#define YYLAST   367
+#define YYLAST   370
 
 /* YYNTOKENS -- Number of terminals.  */
-#define YYNTOKENS  60
+#define YYNTOKENS  63
 /* YYNNTS -- Number of nonterminals.  */
 #define YYNNTS  67
 /* YYNRULES -- Number of rules.  */
-#define YYNRULES  150
+#define YYNRULES  151
 /* YYNRULES -- Number of states.  */
-#define YYNSTATES  251
+#define YYNSTATES  258
 
 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
 #define YYUNDEFTOK  2
-#define YYMAXUTOK   305
+#define YYMAXUTOK   308
 
 #define YYTRANSLATE(YYX)						\
   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@@ -580,15 +591,15 @@ static const yytype_uint8 yytranslate[] =
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-      56,    57,    58,     2,    54,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,    59,    53,
-       2,    55,     2,     2,     2,     2,     2,     2,     2,     2,
+      59,    60,    61,     2,    57,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,    62,    56,
+       2,    58,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,    51,     2,    52,     2,     2,     2,     2,
+       2,     2,     2,    54,     2,    55,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
@@ -606,7 +617,7 @@ static const yytype_uint8 yytranslate[] =
       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,    40,    41,    42,    43,    44,
-      45,    46,    47,    48,    49,    50
+      45,    46,    47,    48,    49,    50,    51,    52,    53
 };
 
 #if YYDEBUG
@@ -619,88 +630,88 @@ static const yytype_uint16 yyprhs[] =
       57,    60,    63,    66,    67,    69,    76,    78,    82,    86,
       92,    98,   104,   107,   111,   114,   116,   118,   120,   122,
      124,   126,   128,   130,   132,   134,   136,   137,   139,   142,
-     145,   149,   151,   153,   155,   159,   163,   167,   171,   175,
-     177,   178,   180,   183,   186,   190,   192,   194,   197,   199,
-     203,   206,   207,   211,   213,   217,   219,   221,   225,   228,
-     229,   233,   235,   239,   241,   243,   245,   247,   249,   251,
-     252,   256,   261,   268,   274,   280,   287,   293,   299,   305,
-     311,   317,   323,   329,   334,   336,   338,   339,   341,   344,
-     347,   351,   355,   357,   359,   360,   362,   366,   368,   372,
-     374,   376,   378,   380,   382,   384,   386,   391,   393,   397,
-     399,   401,   403,   405,   407,   409,   411,   413,   415,   417,
-     419,   421,   423,   427,   429,   431,   433,   435,   437,   439,
-     441
+     145,   149,   151,   153,   155,   159,   163,   167,   169,   170,
+     172,   175,   178,   182,   184,   186,   189,   191,   195,   198,
+     199,   203,   205,   209,   211,   213,   217,   220,   221,   225,
+     227,   231,   233,   235,   237,   239,   241,   243,   244,   248,
+     253,   258,   263,   268,   275,   281,   287,   294,   300,   306,
+     312,   318,   324,   330,   336,   341,   343,   345,   346,   348,
+     351,   354,   358,   362,   364,   366,   367,   369,   373,   375,
+     379,   381,   383,   385,   387,   389,   391,   393,   398,   400,
+     404,   406,   408,   410,   412,   414,   416,   418,   420,   422,
+     424,   426,   428,   430,   434,   436,   438,   440,   442,   444,
+     446,   448
 };
 
 /* YYRHS -- A `-1'-separated list of the rules' RHS.  */
-static const yytype_int8 yyrhs[] =
+static const yytype_int16 yyrhs[] =
 {
-      61,     0,    -1,    30,    62,    63,    -1,    50,    -1,    51,
-      64,    65,    52,    -1,   107,    69,    84,    90,   110,    -1,
-      -1,    65,    66,    -1,    -1,    -1,    37,   126,    51,    67,
-      64,    65,    68,    52,   107,    -1,    -1,    32,    -1,    32,
-      70,    -1,    72,    -1,    70,    72,    -1,   126,    -1,    73,
-      -1,   108,    53,    -1,    75,    74,    -1,    80,    74,    -1,
-      79,    74,    -1,    78,    74,    -1,    -1,    53,    -1,    83,
-      34,    71,    51,    76,    52,    -1,    77,    -1,    76,    54,
-      77,    -1,   126,    55,   123,    -1,    35,    56,    20,    57,
-      71,    -1,   105,    56,    58,    57,    71,    -1,    33,    71,
-      51,    81,    52,    -1,    82,    53,    -1,    81,    82,    53,
-      -1,   105,    99,    -1,     4,    -1,     5,    -1,     6,    -1,
+      64,     0,    -1,    30,    65,    66,    -1,    53,    -1,    54,
+      67,    68,    55,    -1,   110,    72,    87,    93,   113,    -1,
+      -1,    68,    69,    -1,    -1,    -1,    37,   129,    54,    70,
+      67,    68,    71,    55,   110,    -1,    -1,    32,    -1,    32,
+      73,    -1,    75,    -1,    73,    75,    -1,   129,    -1,    76,
+      -1,   111,    56,    -1,    78,    77,    -1,    83,    77,    -1,
+      82,    77,    -1,    81,    77,    -1,    -1,    56,    -1,    86,
+      34,    74,    54,    79,    55,    -1,    80,    -1,    79,    57,
+      80,    -1,   129,    58,   126,    -1,    35,    59,    20,    60,
+      74,    -1,   108,    59,    61,    60,    74,    -1,    33,    74,
+      54,    84,    55,    -1,    85,    56,    -1,    84,    85,    56,
+      -1,   108,   102,    -1,     4,    -1,     5,    -1,     6,    -1,
        7,    -1,     8,    -1,     9,    -1,    10,    -1,    11,    -1,
       12,    -1,    13,    -1,    14,    -1,    -1,    28,    -1,    28,
-      85,    -1,    86,    53,    -1,    85,    86,    53,    -1,    87,
-      -1,   108,    -1,    88,    -1,    87,    54,    88,    -1,    89,
-      55,    24,    -1,    89,    55,    20,    -1,    89,    55,    27,
-      -1,    89,    55,     3,    -1,   126,    -1,    -1,    29,    -1,
-      29,    91,    -1,    92,    53,    -1,    91,    92,    53,    -1,
-      93,    -1,   108,    -1,   105,    94,    -1,    95,    -1,    94,
-      54,    95,    -1,   126,    96,    -1,    -1,    56,    97,    57,
-      -1,    98,    -1,    97,    54,    98,    -1,   109,    -1,   100,
-      -1,    99,    54,   100,    -1,   126,   101,    -1,    -1,    56,
-     102,    57,    -1,   103,    -1,   102,    54,   103,    -1,    24,
-      -1,    20,    -1,   106,    -1,   106,    -1,   109,    -1,    83,
-      -1,    -1,   108,    53,   107,    -1,    59,   126,    55,   113,
-      -1,   105,   106,    59,   126,    55,   113,    -1,   106,    59,
-     126,    55,   113,    -1,   106,    59,    41,    55,   113,    -1,
-     105,   106,    59,    41,    55,   113,    -1,   106,    59,    43,
-      55,   124,    -1,   106,    59,    44,    55,   122,    -1,   106,
-      59,    49,    55,   125,    -1,   106,    59,    45,    55,   123,
-      -1,   106,    59,    46,    55,   125,    -1,   106,    59,    47,
-      55,   124,    -1,   106,    59,    48,    55,   125,    -1,    59,
-      42,    55,   124,    -1,   126,    -1,    38,    -1,    -1,    31,
-      -1,    31,   111,    -1,   112,    53,    -1,   111,   112,    53,
-      -1,   104,    55,   113,    -1,   114,    -1,   115,    -1,    -1,
-     116,    -1,   113,    54,   116,    -1,   117,    -1,    51,   113,
-      52,    -1,   121,    -1,    36,    -1,    39,    -1,    40,    -1,
-     118,    -1,   119,    -1,   109,    -1,   126,    56,   120,    57,
-      -1,   121,    -1,   120,    54,   121,    -1,    17,    -1,    18,
-      -1,    19,    -1,    20,    -1,    21,    -1,    22,    -1,    23,
-      -1,    24,    -1,    25,    -1,    26,    -1,    27,    -1,    16,
-      -1,   123,    -1,   122,    54,   123,    -1,    20,    -1,    24,
-      -1,    21,    -1,    25,    -1,    16,    -1,   124,    -1,   123,
-      -1,    15,    -1
+      88,    -1,    89,    56,    -1,    88,    89,    56,    -1,    90,
+      -1,   111,    -1,    91,    -1,    90,    57,    91,    -1,    92,
+      58,   126,    -1,    92,    58,     3,    -1,   129,    -1,    -1,
+      29,    -1,    29,    94,    -1,    95,    56,    -1,    94,    95,
+      56,    -1,    96,    -1,   111,    -1,   108,    97,    -1,    98,
+      -1,    97,    57,    98,    -1,   129,    99,    -1,    -1,    59,
+     100,    60,    -1,   101,    -1,   100,    57,   101,    -1,   112,
+      -1,   103,    -1,   102,    57,   103,    -1,   129,   104,    -1,
+      -1,    59,   105,    60,    -1,   106,    -1,   105,    57,   106,
+      -1,    24,    -1,    20,    -1,   109,    -1,   109,    -1,   112,
+      -1,    86,    -1,    -1,   111,    56,   110,    -1,    62,    50,
+      58,   127,    -1,    62,    51,    58,   128,    -1,    62,    52,
+      58,   126,    -1,    62,   129,    58,   116,    -1,   108,   109,
+      62,   129,    58,   116,    -1,   109,    62,   129,    58,   116,
+      -1,   109,    62,    41,    58,   116,    -1,   108,   109,    62,
+      41,    58,   116,    -1,   109,    62,    43,    58,   127,    -1,
+     109,    62,    44,    58,   125,    -1,   109,    62,    49,    58,
+     128,    -1,   109,    62,    45,    58,   126,    -1,   109,    62,
+      46,    58,   128,    -1,   109,    62,    47,    58,   127,    -1,
+     109,    62,    48,    58,   128,    -1,    62,    42,    58,   127,
+      -1,   129,    -1,    38,    -1,    -1,    31,    -1,    31,   114,
+      -1,   115,    56,    -1,   114,   115,    56,    -1,   107,    58,
+     116,    -1,   117,    -1,   118,    -1,    -1,   119,    -1,   116,
+      57,   119,    -1,   120,    -1,    54,   116,    55,    -1,   124,
+      -1,    36,    -1,    39,    -1,    40,    -1,   121,    -1,   122,
+      -1,   112,    -1,   129,    59,   123,    60,    -1,   124,    -1,
+     123,    57,   124,    -1,    17,    -1,    18,    -1,    19,    -1,
+      20,    -1,    21,    -1,    22,    -1,    23,    -1,    24,    -1,
+      25,    -1,    26,    -1,    27,    -1,    16,    -1,   126,    -1,
+     125,    57,   126,    -1,    20,    -1,    24,    -1,    21,    -1,
+      25,    -1,    16,    -1,   127,    -1,   126,    -1,    15,    -1
 };
 
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
 static const yytype_uint16 yyrline[] =
 {
-       0,   208,   208,   214,   216,   223,   230,   230,   233,   242,
-     232,   247,   248,   249,   253,   253,   255,   265,   265,   268,
-     269,   270,   271,   274,   274,   277,   307,   309,   326,   335,
-     347,   361,   394,   395,   398,   412,   413,   414,   415,   416,
-     417,   418,   419,   420,   421,   422,   425,   426,   427,   430,
-     431,   434,   434,   436,   437,   441,   448,   459,   472,   482,
-     494,   495,   496,   499,   500,   503,   503,   505,   527,   531,
-     535,   562,   563,   566,   567,   571,   585,   589,   594,   623,
-     624,   628,   629,   634,   644,   664,   675,   686,   705,   712,
-     712,   715,   717,   726,   737,   739,   741,   743,   745,   747,
-     749,   751,   753,   755,   760,   767,   776,   777,   778,   781,
-     782,   785,   789,   790,   794,   798,   799,   804,   805,   809,
-     810,   811,   812,   813,   814,   818,   822,   826,   828,   833,
-     834,   835,   836,   837,   838,   839,   840,   841,   842,   843,
-     844,   848,   849,   853,   855,   857,   859,   864,   868,   869,
-     875
+       0,   216,   216,   222,   224,   231,   238,   238,   241,   250,
+     240,   255,   256,   257,   261,   261,   263,   273,   273,   276,
+     277,   278,   279,   282,   282,   285,   315,   317,   334,   343,
+     355,   369,   402,   403,   406,   420,   421,   422,   423,   424,
+     425,   426,   427,   428,   429,   430,   433,   434,   435,   438,
+     439,   442,   442,   444,   445,   449,   456,   466,   478,   479,
+     480,   483,   484,   487,   487,   489,   511,   515,   519,   546,
+     547,   550,   551,   555,   569,   573,   578,   607,   608,   612,
+     613,   618,   628,   648,   659,   670,   689,   696,   696,   699,
+     701,   703,   705,   707,   716,   727,   729,   731,   733,   735,
+     737,   739,   741,   743,   745,   750,   757,   766,   767,   768,
+     771,   772,   775,   779,   780,   784,   788,   789,   794,   795,
+     799,   800,   801,   802,   803,   804,   808,   812,   816,   818,
+     823,   824,   825,   826,   827,   828,   829,   830,   831,   832,
+     833,   834,   838,   839,   843,   845,   847,   849,   854,   858,
+     859,   865
 };
 #endif
 
@@ -718,20 +729,21 @@ static const char *const yytname[] =
   "COMPOUND", "ENUM", "OPAQUE", "OPAQUESTRING", "GROUP", "PATH",
   "FILLMARKER", "NIL", "_FILLVALUE", "_FORMAT", "_STORAGE", "_CHUNKSIZES",
   "_DEFLATELEVEL", "_SHUFFLE", "_ENDIANNESS", "_NOFILL", "_FLETCHER32",
-  "DATASETID", "'{'", "'}'", "';'", "','", "'='", "'('", "')'", "'*'",
-  "':'", "$accept", "ncdesc", "datasetid", "rootgroup", "groupbody",
-  "subgrouplist", "namedgroup", "@1", "@2", "typesection", "typedecls",
-  "typename", "type_or_attr_decl", "typedecl", "optsemicolon", "enumdecl",
-  "enumidlist", "enumid", "opaquedecl", "vlendecl", "compounddecl",
-  "fields", "field", "primtype", "dimsection", "dimdecls",
-  "dim_or_attr_decl", "dimdeclist", "dimdecl", "dimd", "vasection",
-  "vadecls", "vadecl_or_attr", "vardecl", "varlist", "varspec", "dimspec",
-  "dimlist", "dimref", "fieldlist", "fieldspec", "fielddimspec",
-  "fielddimlist", "fielddim", "varref", "typeref", "type_var_ref",
-  "attrdecllist", "attrdecl", "path", "datasection", "datadecls",
-  "datadecl", "datalist", "datalist0", "datalist1", "dataitem",
-  "constdata", "econstref", "function", "arglist", "simpleconstant",
-  "intlist", "constint", "conststring", "constbool", "ident", 0
+  "_NCPROPS", "_ISNETCDF4", "_SUPERBLOCK", "DATASETID", "'{'", "'}'",
+  "';'", "','", "'='", "'('", "')'", "'*'", "':'", "$accept", "ncdesc",
+  "datasetid", "rootgroup", "groupbody", "subgrouplist", "namedgroup",
+  "@1", "@2", "typesection", "typedecls", "typename", "type_or_attr_decl",
+  "typedecl", "optsemicolon", "enumdecl", "enumidlist", "enumid",
+  "opaquedecl", "vlendecl", "compounddecl", "fields", "field", "primtype",
+  "dimsection", "dimdecls", "dim_or_attr_decl", "dimdeclist", "dimdecl",
+  "dimd", "vasection", "vadecls", "vadecl_or_attr", "vardecl", "varlist",
+  "varspec", "dimspec", "dimlist", "dimref", "fieldlist", "fieldspec",
+  "fielddimspec", "fielddimlist", "fielddim", "varref", "typeref",
+  "type_var_ref", "attrdecllist", "attrdecl", "path", "datasection",
+  "datadecls", "datadecl", "datalist", "datalist0", "datalist1",
+  "dataitem", "constdata", "econstref", "function", "arglist",
+  "simpleconstant", "intlist", "constint", "conststring", "constbool",
+  "ident", 0
 };
 #endif
 
@@ -745,29 +757,30 @@ static const yytype_uint16 yytoknum[] =
      275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
      285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
      295,   296,   297,   298,   299,   300,   301,   302,   303,   304,
-     305,   123,   125,    59,    44,    61,    40,    41,    42,    58
+     305,   306,   307,   308,   123,   125,    59,    44,    61,    40,
+      41,    42,    58
 };
 # endif
 
 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
 static const yytype_uint8 yyr1[] =
 {
-       0,    60,    61,    62,    63,    64,    65,    65,    67,    68,
-      66,    69,    69,    69,    70,    70,    71,    72,    72,    73,
-      73,    73,    73,    74,    74,    75,    76,    76,    77,    78,
-      79,    80,    81,    81,    82,    83,    83,    83,    83,    83,
-      83,    83,    83,    83,    83,    83,    84,    84,    84,    85,
-      85,    86,    86,    87,    87,    88,    88,    88,    88,    89,
-      90,    90,    90,    91,    91,    92,    92,    93,    94,    94,
-      95,    96,    96,    97,    97,    98,    99,    99,   100,   101,
-     101,   102,   102,   103,   103,   104,   105,   106,   106,   107,
-     107,   108,   108,   108,   108,   108,   108,   108,   108,   108,
-     108,   108,   108,   108,   109,   109,   110,   110,   110,   111,
-     111,   112,   113,   113,   114,   115,   115,   116,   116,   117,
-     117,   117,   117,   117,   117,   118,   119,   120,   120,   121,
-     121,   121,   121,   121,   121,   121,   121,   121,   121,   121,
-     121,   122,   122,   123,   123,   123,   123,   124,   125,   125,
-     126
+       0,    63,    64,    65,    66,    67,    68,    68,    70,    71,
+      69,    72,    72,    72,    73,    73,    74,    75,    75,    76,
+      76,    76,    76,    77,    77,    78,    79,    79,    80,    81,
+      82,    83,    84,    84,    85,    86,    86,    86,    86,    86,
+      86,    86,    86,    86,    86,    86,    87,    87,    87,    88,
+      88,    89,    89,    90,    90,    91,    91,    92,    93,    93,
+      93,    94,    94,    95,    95,    96,    97,    97,    98,    99,
+      99,   100,   100,   101,   102,   102,   103,   104,   104,   105,
+     105,   106,   106,   107,   108,   109,   109,   110,   110,   111,
+     111,   111,   111,   111,   111,   111,   111,   111,   111,   111,
+     111,   111,   111,   111,   111,   112,   112,   113,   113,   113,
+     114,   114,   115,   116,   116,   117,   118,   118,   119,   119,
+     120,   120,   120,   120,   120,   120,   121,   122,   123,   123,
+     124,   124,   124,   124,   124,   124,   124,   124,   124,   124,
+     124,   124,   125,   125,   126,   126,   126,   126,   127,   128,
+     128,   129
 };
 
 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
@@ -778,17 +791,17 @@ static const yytype_uint8 yyr2[] =
        2,     2,     2,     0,     1,     6,     1,     3,     3,     5,
        5,     5,     2,     3,     2,     1,     1,     1,     1,     1,
        1,     1,     1,     1,     1,     1,     0,     1,     2,     2,
-       3,     1,     1,     1,     3,     3,     3,     3,     3,     1,
-       0,     1,     2,     2,     3,     1,     1,     2,     1,     3,
-       2,     0,     3,     1,     3,     1,     1,     3,     2,     0,
-       3,     1,     3,     1,     1,     1,     1,     1,     1,     0,
-       3,     4,     6,     5,     5,     6,     5,     5,     5,     5,
-       5,     5,     5,     4,     1,     1,     0,     1,     2,     2,
-       3,     3,     1,     1,     0,     1,     3,     1,     3,     1,
-       1,     1,     1,     1,     1,     1,     4,     1,     3,     1,
+       3,     1,     1,     1,     3,     3,     3,     1,     0,     1,
+       2,     2,     3,     1,     1,     2,     1,     3,     2,     0,
+       3,     1,     3,     1,     1,     3,     2,     0,     3,     1,
+       3,     1,     1,     1,     1,     1,     1,     0,     3,     4,
+       4,     4,     4,     6,     5,     5,     6,     5,     5,     5,
+       5,     5,     5,     5,     4,     1,     1,     0,     1,     2,
+       2,     3,     3,     1,     1,     0,     1,     3,     1,     3,
+       1,     1,     1,     1,     1,     1,     1,     4,     1,     3,
        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
-       1,     1,     3,     1,     1,     1,     1,     1,     1,     1,
-       1
+       1,     1,     1,     3,     1,     1,     1,     1,     1,     1,
+       1,     1
 };
 
 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
@@ -796,208 +809,210 @@ static const yytype_uint8 yyr2[] =
    means the default is an error.  */
 static const yytype_uint8 yydefact[] =
 {
-       0,     0,     0,     3,     0,     1,    89,     2,    35,    36,
-      37,    38,    39,    40,    41,    42,    43,    44,    45,   150,
-     105,     0,     6,    88,     0,    86,    11,     0,    87,   104,
-       0,     0,     0,     0,     0,    12,    46,    89,     0,   114,
-       0,     4,     7,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,    13,    14,    17,    23,    23,
-      23,    23,    88,     0,     0,    47,    60,    90,   147,   103,
-     140,   129,   130,   131,   132,   133,   134,   135,   136,   137,
-     138,   139,   120,   121,   122,   114,   125,    91,   112,   113,
-     115,   117,   123,   124,   119,   104,     0,     0,     0,   114,
-       0,     0,     0,     0,     0,     0,     0,   114,     0,    16,
-       0,    15,    24,    19,    22,    21,    20,     0,     0,    18,
-      48,     0,    51,    53,     0,    52,   104,    61,   106,     0,
-       0,     0,     8,   114,   114,    94,    96,   143,   145,   144,
-     146,    97,   141,    99,   149,   148,   100,   101,   102,    98,
-      93,     0,     0,     0,     0,     0,    49,     0,     0,    62,
-       0,    65,     0,    66,   107,     5,   118,   116,     0,   127,
-      89,    95,    92,     0,     0,     0,     0,    86,     0,     0,
-       0,    50,    54,    59,    58,    56,    55,    57,     0,    63,
-      67,    68,    71,     0,    85,   108,     0,     0,   126,     6,
-     142,    31,     0,    32,    34,    76,    79,    29,     0,    26,
-       0,    30,    64,     0,     0,    70,   114,     0,   109,   128,
-       9,    33,     0,     0,    78,    25,     0,     0,    69,    71,
-       0,    73,    75,   111,   110,     0,    77,    84,    83,     0,
-      81,    27,    28,     0,    72,    89,     0,    80,    74,    10,
-      82
+       0,     0,     0,     3,     0,     1,    87,     2,    35,    36,
+      37,    38,    39,    40,    41,    42,    43,    44,    45,   151,
+     106,     0,     6,    86,     0,    84,    11,     0,    85,   105,
+       0,     0,     0,     0,     0,     0,     0,     0,    12,    46,
+      87,     0,     0,     0,     0,   115,     0,     4,     7,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,    13,    14,    17,    23,    23,    23,    23,    86,     0,
+       0,    47,    58,    88,   148,   104,    89,   144,   146,   145,
+     147,   150,   149,    90,    91,   141,   130,   131,   132,   133,
+     134,   135,   136,   137,   138,   139,   140,   121,   122,   123,
+     115,   126,    92,   113,   114,   116,   118,   124,   125,   120,
+     105,     0,     0,     0,   115,     0,     0,     0,     0,     0,
+       0,     0,   115,     0,    16,     0,    15,    24,    19,    22,
+      21,    20,     0,     0,    18,    48,     0,    51,    53,     0,
+      52,   105,    59,   107,     0,     0,     0,     8,   115,   115,
+      95,    97,    98,   142,   100,   101,   102,   103,    99,    94,
+       0,     0,     0,     0,     0,    49,     0,     0,    60,     0,
+      63,     0,    64,   108,     5,   119,   117,     0,   128,    87,
+      96,    93,     0,     0,     0,     0,    84,     0,     0,     0,
+      50,    54,    57,    56,    55,     0,    61,    65,    66,    69,
+       0,    83,   109,     0,     0,   127,     6,   143,    31,     0,
+      32,    34,    74,    77,    29,     0,    26,     0,    30,    62,
+       0,     0,    68,   115,     0,   110,   129,     9,    33,     0,
+       0,    76,    25,     0,     0,    67,    69,     0,    71,    73,
+     112,   111,     0,    75,    82,    81,     0,    79,    27,    28,
+       0,    70,    87,     0,    78,    72,    10,    80
 };
 
 /* YYDEFGOTO[NTERM-NUM].  */
 static const yytype_int16 yydefgoto[] =
 {
-      -1,     2,     4,     7,    22,    32,    42,   170,   235,    36,
-      55,   108,    56,    57,   113,    58,   208,   209,    59,    60,
-      61,   174,   175,    23,    66,   120,   121,   122,   123,   124,
-     128,   159,   160,   161,   190,   191,   215,   230,   231,   204,
-     205,   224,   239,   240,   193,    24,    25,    26,    27,    28,
-     165,   195,   196,    87,    88,    89,    90,    91,    92,    93,
-     168,    94,   141,   144,   145,   146,    29
+      -1,     2,     4,     7,    22,    35,    48,   179,   242,    39,
+      61,   123,    62,    63,   128,    64,   215,   216,    65,    66,
+      67,   183,   184,    23,    72,   135,   136,   137,   138,   139,
+     143,   168,   169,   170,   197,   198,   222,   237,   238,   211,
+     212,   231,   246,   247,   200,    24,    25,    26,    27,    28,
+     174,   202,   203,   102,   103,   104,   105,   106,   107,   108,
+     177,   109,   152,    81,    82,    83,    29
 };
 
 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
    STATE-NUM.  */
-#define YYPACT_NINF -124
+#define YYPACT_NINF -133
 static const yytype_int16 yypact[] =
 {
-     -17,   -16,    44,  -124,     3,  -124,   213,  -124,  -124,  -124,
-    -124,  -124,  -124,  -124,  -124,  -124,  -124,  -124,  -124,  -124,
-    -124,    -6,  -124,  -124,   329,    -4,    36,    25,  -124,  -124,
-      27,    50,     0,    31,    15,   157,    63,   213,    83,   281,
-      92,  -124,  -124,    -3,    53,    54,    56,    61,    62,    65,
-      66,    67,    69,    92,    59,   157,  -124,  -124,    70,    70,
-      70,    70,    84,   225,    72,   213,    97,  -124,  -124,  -124,
-    -124,  -124,  -124,  -124,  -124,  -124,  -124,  -124,  -124,  -124,
-    -124,  -124,  -124,  -124,  -124,   281,  -124,    74,  -124,  -124,
-    -124,  -124,  -124,  -124,  -124,    73,    81,    79,    85,   281,
-      83,    68,    68,    60,    83,    60,    60,   281,    87,  -124,
-     116,  -124,  -124,  -124,  -124,  -124,  -124,    92,    86,  -124,
-     213,    93,    91,  -124,    94,  -124,    99,   213,   108,   -26,
-     281,   330,  -124,   281,   281,    74,  -124,  -124,  -124,  -124,
-    -124,    98,  -124,  -124,  -124,  -124,  -124,  -124,  -124,  -124,
-      74,   329,    90,   104,   100,    95,  -124,    92,    19,   213,
-     120,  -124,   329,  -124,   329,  -124,  -124,  -124,   -39,  -124,
-     213,    74,    74,    68,   278,   122,    92,  -124,    92,    92,
-      92,  -124,  -124,  -124,  -124,  -124,  -124,  -124,   123,  -124,
-     124,  -124,    13,   125,  -124,   329,   126,   330,  -124,  -124,
-    -124,  -124,   128,  -124,   129,  -124,   121,  -124,    52,  -124,
-     130,  -124,  -124,    92,     2,  -124,   281,   133,  -124,  -124,
-     150,  -124,    92,     5,  -124,  -124,    92,    68,  -124,   132,
-     -22,  -124,  -124,    74,  -124,   137,  -124,  -124,  -124,    29,
-    -124,  -124,  -124,     2,  -124,   213,     5,  -124,  -124,  -124,
-    -124
+     -11,   -48,    20,  -133,   -19,  -133,   210,  -133,  -133,  -133,
+    -133,  -133,  -133,  -133,  -133,  -133,  -133,  -133,  -133,  -133,
+    -133,    -3,  -133,  -133,   332,   -16,     8,    -4,  -133,  -133,
+      18,    19,    29,    41,    48,   -22,    47,   128,    56,    75,
+     210,    94,    94,   136,    33,   281,   102,  -133,  -133,     2,
+      63,    64,    65,    68,    71,    74,    76,    77,    78,   102,
+      82,    56,  -133,  -133,    81,    81,    81,    81,    99,   222,
+      88,   210,   117,  -133,  -133,  -133,  -133,  -133,  -133,  -133,
+    -133,  -133,  -133,  -133,  -133,  -133,  -133,  -133,  -133,  -133,
+    -133,  -133,  -133,  -133,  -133,  -133,  -133,  -133,  -133,  -133,
+     281,  -133,    90,  -133,  -133,  -133,  -133,  -133,  -133,  -133,
+      89,    97,    91,   100,   281,    94,    33,    33,   136,    94,
+     136,   136,   281,   105,  -133,   142,  -133,  -133,  -133,  -133,
+    -133,  -133,   102,   109,  -133,   210,   107,   121,  -133,   123,
+    -133,   125,   210,   148,    35,   281,   333,  -133,   281,   281,
+      90,  -133,   129,  -133,  -133,  -133,  -133,  -133,  -133,    90,
+     332,   127,   131,   130,   132,  -133,   102,    95,   210,   133,
+    -133,   332,  -133,   332,  -133,  -133,  -133,   -23,  -133,   210,
+      90,    90,    33,   278,   135,   102,  -133,   102,   102,   102,
+    -133,  -133,  -133,  -133,  -133,   137,  -133,   138,  -133,   -32,
+     139,  -133,   332,   140,   333,  -133,  -133,  -133,  -133,   144,
+    -133,   141,  -133,   145,  -133,    45,  -133,   143,  -133,  -133,
+     102,   -12,  -133,   281,   147,  -133,  -133,   157,  -133,   102,
+      -2,  -133,  -133,   102,    33,  -133,   146,    25,  -133,  -133,
+      90,  -133,   151,  -133,  -133,  -133,    26,  -133,  -133,  -133,
+     -12,  -133,   210,    -2,  -133,  -133,  -133,  -133
 };
 
 /* YYPGOTO[NTERM-NUM].  */
 static const yytype_int16 yypgoto[] =
 {
-    -124,  -124,  -124,  -124,    21,    -5,  -124,  -124,  -124,  -124,
-    -124,  -107,   142,  -124,    35,  -124,  -124,   -28,  -124,  -124,
-    -124,  -124,    26,   -14,  -124,  -124,    89,  -124,    42,  -124,
-    -124,  -124,    45,  -124,  -124,   -12,  -124,  -124,   -40,  -124,
-     -15,  -124,  -124,   -41,  -124,   -24,   -21,   -37,    -8,   -32,
-    -124,  -124,    17,   -83,  -124,  -124,    80,  -124,  -124,  -124,
-    -124,  -123,  -124,   -96,   -34,   -57,   -20
+    -133,  -133,  -133,  -133,    28,     4,  -133,  -133,  -133,  -133,
+    -133,  -109,   150,  -133,    30,  -133,  -133,     5,  -133,  -133,
+    -133,  -133,    57,   -25,  -133,  -133,   104,  -133,    79,  -133,
+    -133,  -133,    73,  -133,  -133,    22,  -133,  -133,    -7,  -133,
+      15,  -133,  -133,    -6,  -133,   -29,   -18,   -39,   -30,   -41,
+    -133,  -133,    44,   -93,  -133,  -133,   106,  -133,  -133,  -133,
+    -133,  -132,  -133,   -42,   -31,   -76,   -21
 };
 
 /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
    positive, shift that token.  If negative, reduce the rule which
    number is the opposite.  If zero, do what YYDEFACT says.
    If YYTABLE_NINF, syntax error.  */
-#define YYTABLE_NINF -105
+#define YYTABLE_NINF -106
 static const yytype_int16 yytable[] =
 {
-      67,    31,   129,    33,    69,   142,   143,    86,   169,    19,
-     153,    63,    19,     1,    52,   197,   135,    19,   198,    95,
-      96,    62,   184,    98,   150,   237,   166,    64,   130,   238,
-      19,    63,   243,   109,     3,   244,    30,    40,    97,   185,
-      20,    62,    33,   186,     5,   126,   187,    64,   148,   149,
-     171,   172,    41,    86,     6,    34,    44,   125,    45,    46,
-      47,    48,    49,    50,    51,    95,   136,    86,    35,   214,
-     147,   207,  -104,   211,   219,    86,    68,   200,    37,    95,
-     137,   138,    38,   246,   139,   140,   247,    95,   137,   138,
-      43,    65,   139,   140,   114,   115,   116,   109,    86,    68,
-     126,    86,    86,   162,   225,    39,   226,    19,    99,   100,
-      95,   101,   125,    95,    95,   110,   102,   103,   117,   163,
-     104,   105,   106,   112,   107,   119,   127,   176,   130,   131,
-     177,   242,   132,   233,   133,   162,   152,   183,   151,   164,
-     134,    33,   192,   194,   154,   157,   156,   178,   181,   158,
-     176,   163,   173,   177,   -59,   179,   206,   180,   109,   210,
-     109,     8,     9,    10,    11,    12,    13,    14,    15,    16,
-      17,    18,    19,   189,   194,   203,   212,   223,   213,   218,
-     216,   221,   232,   222,    86,   227,   234,    40,   214,   245,
-      53,   199,    54,   229,   220,    20,    95,   111,   241,   182,
-     202,   228,   206,   248,   188,   250,   210,   236,   249,   155,
-     167,   232,   217,     0,     0,     0,    21,     8,     9,    10,
-      11,    12,    13,    14,    15,    16,    17,    18,    19,     8,
-       9,    10,    11,    12,    13,    14,    15,    16,    17,    18,
-      19,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,    20,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,    20,     0,     0,     0,     0,     0,     0,
+      34,    73,    84,    19,   101,     3,    36,   144,    70,    69,
+      75,    76,    19,    68,   178,    46,    58,    19,   244,     1,
+       5,   150,   245,   162,   110,   111,    20,   221,   113,   159,
+    -105,    70,    69,    47,   204,     6,    68,   205,   124,    30,
+      38,   140,   155,   112,   157,   158,    37,    31,    32,    33,
+     141,    36,    40,    77,    78,   180,   181,    79,    80,   101,
+       8,     9,    10,    11,    12,    13,    14,    15,    16,    17,
+      18,    19,   226,   101,   153,   154,    41,    42,   214,   110,
+     218,   101,   250,   253,   151,   251,   254,    43,   156,    59,
+     175,    60,   145,   110,    20,   129,   130,   131,   193,    44,
+     232,   110,   233,    71,   101,   140,    45,   101,   101,    49,
+      74,   124,   172,   171,   141,    77,    78,    19,    21,    79,
+      80,   114,   115,   116,   110,   194,   117,   110,   110,   118,
+     240,   185,   119,   132,   120,   121,   122,   127,   172,   171,
+     207,   125,   186,    19,   134,   192,   142,   145,   146,   148,
+     199,   147,    74,    36,   185,   201,    77,    78,   149,   160,
+      79,    80,   161,   165,   213,   186,   124,   217,   124,    50,
+     163,    51,    52,    53,    54,    55,    56,    57,   166,   173,
+     239,   167,   101,   -57,   201,   188,   182,   187,   190,   196,
+     189,   210,   249,   219,    46,   220,   225,   223,   229,   236,
+     228,   234,   110,   241,   230,   221,   252,   206,   213,   239,
+     227,   126,   217,   256,     8,     9,    10,    11,    12,    13,
+      14,    15,    16,    17,    18,    19,     8,     9,    10,    11,
+      12,    13,    14,    15,    16,    17,    18,    19,   248,   164,
+     209,   195,   235,   255,   243,   191,   224,   257,    20,     0,
+       0,   176,     0,     0,     0,     0,     0,     0,     0,     0,
+      20,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,    21,     0,     0,     0,     0,     0,     0,     0,
-       0,   118,     8,     9,    10,    11,    12,    13,    14,    15,
-      16,    17,    18,    19,     0,     0,    19,    70,    71,    72,
-      73,    74,    75,    76,    77,    78,    79,    80,    81,     0,
-       0,     0,     0,     0,     0,     0,    20,    82,     0,    20,
-      83,    84,     0,     0,     0,     0,     0,     0,     0,     0,
-     201,     0,    85,     8,     9,    10,    11,    12,    13,    14,
-      15,    16,    17,    18,    19,     0,    70,    71,    72,    73,
-      74,    75,    76,    77,    78,    79,    80,    81,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,    20
+       0,   133,     8,     9,    10,    11,    12,    13,    14,    15,
+      16,    17,    18,    19,     0,     0,    19,    85,    86,    87,
+      88,    89,    90,    91,    92,    93,    94,    95,    96,     0,
+       0,     0,     0,     0,     0,     0,    20,    97,     0,    20,
+      98,    99,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   208,     0,   100,     8,     9,    10,    11,
+      12,    13,    14,    15,    16,    17,    18,    19,     0,    85,
+      86,    87,    88,    89,    90,    91,    92,    93,    94,    95,
+      96,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+      20
 };
 
 static const yytype_int16 yycheck[] =
 {
-      37,    21,    85,    24,    38,   101,   102,    39,   131,    15,
-     117,    35,    15,    30,    34,    54,    99,    15,    57,    39,
-      40,    35,     3,    43,   107,    20,    52,    35,    54,    24,
-      15,    55,    54,    53,    50,    57,    42,    37,    41,    20,
-      38,    55,    63,    24,     0,    65,    27,    55,   105,   106,
-     133,   134,    52,    85,    51,    59,    41,    65,    43,    44,
-      45,    46,    47,    48,    49,    85,   100,    99,    32,    56,
-     104,   178,    59,   180,   197,   107,    16,   173,    53,    99,
-      20,    21,    55,    54,    24,    25,    57,   107,    20,    21,
-      59,    28,    24,    25,    59,    60,    61,   117,   130,    16,
-     120,   133,   134,   127,    52,    55,    54,    15,    55,    55,
-     130,    55,   120,   133,   134,    56,    55,    55,    34,   127,
-      55,    55,    55,    53,    55,    53,    29,   151,    54,    56,
-     151,   227,    51,   216,    55,   159,    20,   157,    51,    31,
-      55,   162,   162,   164,    58,    54,    53,    57,    53,    55,
-     174,   159,    54,   174,    55,    51,   176,    57,   178,   179,
-     180,     4,     5,     6,     7,     8,     9,    10,    11,    12,
-      13,    14,    15,    53,   195,    53,    53,    56,    54,    53,
-      55,    53,   214,    54,   216,    55,    53,    37,    56,    52,
-      33,   170,    35,   213,   199,    38,   216,    55,   226,   157,
-     174,   213,   222,   243,   159,   246,   226,   222,   245,   120,
-     130,   243,   195,    -1,    -1,    -1,    59,     4,     5,     6,
-       7,     8,     9,    10,    11,    12,    13,    14,    15,     4,
-       5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
-      15,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    38,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    38,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    59,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    56,     4,     5,     6,     7,     8,     9,    10,    11,
+      21,    40,    44,    15,    45,    53,    24,   100,    38,    38,
+      41,    42,    15,    38,   146,    37,    37,    15,    20,    30,
+       0,   114,    24,   132,    45,    46,    38,    59,    49,   122,
+      62,    61,    61,    55,    57,    54,    61,    60,    59,    42,
+      32,    71,   118,    41,   120,   121,    62,    50,    51,    52,
+      71,    69,    56,    20,    21,   148,   149,    24,    25,   100,
+       4,     5,     6,     7,     8,     9,    10,    11,    12,    13,
+      14,    15,   204,   114,   116,   117,    58,    58,   187,   100,
+     189,   122,    57,    57,   115,    60,    60,    58,   119,    33,
+      55,    35,    57,   114,    38,    65,    66,    67,     3,    58,
+      55,   122,    57,    28,   145,   135,    58,   148,   149,    62,
+      16,   132,   142,   142,   135,    20,    21,    15,    62,    24,
+      25,    58,    58,    58,   145,   167,    58,   148,   149,    58,
+     223,   160,    58,    34,    58,    58,    58,    56,   168,   168,
+     182,    59,   160,    15,    56,   166,    29,    57,    59,    58,
+     171,    54,    16,   171,   183,   173,    20,    21,    58,    54,
+      24,    25,    20,    56,   185,   183,   187,   188,   189,    41,
+      61,    43,    44,    45,    46,    47,    48,    49,    57,    31,
+     221,    58,   223,    58,   202,    54,    57,    60,    56,    56,
+      60,    56,   234,    56,    37,    57,    56,    58,    57,   220,
+      56,    58,   223,    56,    59,    59,    55,   179,   229,   250,
+     206,    61,   233,   252,     4,     5,     6,     7,     8,     9,
+      10,    11,    12,    13,    14,    15,     4,     5,     6,     7,
+       8,     9,    10,    11,    12,    13,    14,    15,   233,   135,
+     183,   168,   220,   250,   229,   166,   202,   253,    38,    -1,
+      -1,   145,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      38,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    62,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    59,     4,     5,     6,     7,     8,     9,    10,    11,
       12,    13,    14,    15,    -1,    -1,    15,    16,    17,    18,
       19,    20,    21,    22,    23,    24,    25,    26,    27,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    38,    36,    -1,    38,
       39,    40,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      52,    -1,    51,     4,     5,     6,     7,     8,     9,    10,
-      11,    12,    13,    14,    15,    -1,    16,    17,    18,    19,
-      20,    21,    22,    23,    24,    25,    26,    27,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    38
+      -1,    -1,    -1,    55,    -1,    54,     4,     5,     6,     7,
+       8,     9,    10,    11,    12,    13,    14,    15,    -1,    16,
+      17,    18,    19,    20,    21,    22,    23,    24,    25,    26,
+      27,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      38
 };
 
 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
    symbol of state STATE-NUM.  */
 static const yytype_uint8 yystos[] =
 {
-       0,    30,    61,    50,    62,     0,    51,    63,     4,     5,
+       0,    30,    64,    53,    65,     0,    54,    66,     4,     5,
        6,     7,     8,     9,    10,    11,    12,    13,    14,    15,
-      38,    59,    64,    83,   105,   106,   107,   108,   109,   126,
-      42,   126,    65,   106,    59,    32,    69,    53,    55,    55,
-      37,    52,    66,    59,    41,    43,    44,    45,    46,    47,
-      48,    49,   126,    33,    35,    70,    72,    73,    75,    78,
-      79,    80,    83,   105,   108,    28,    84,   107,    16,   124,
-      16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
-      26,    27,    36,    39,    40,    51,   109,   113,   114,   115,
-     116,   117,   118,   119,   121,   126,   126,    41,   126,    55,
-      55,    55,    55,    55,    55,    55,    55,    55,    71,   126,
-      56,    72,    53,    74,    74,    74,    74,    34,    56,    53,
-      85,    86,    87,    88,    89,   108,   126,    29,    90,   113,
-      54,    56,    51,    55,    55,   113,   124,    20,    21,    24,
-      25,   122,   123,   123,   123,   124,   125,   124,   125,   125,
-     113,    51,    20,    71,    58,    86,    53,    54,    55,    91,
-      92,    93,   105,   108,    31,   110,    52,   116,   120,   121,
-      67,   113,   113,    54,    81,    82,   105,   106,    57,    51,
-      57,    53,    88,   126,     3,    20,    24,    27,    92,    53,
-      94,    95,   126,   104,   106,   111,   112,    54,    57,    64,
-     123,    52,    82,    53,    99,   100,   126,    71,    76,    77,
-     126,    71,    53,    54,    56,    96,    55,   112,    53,   121,
-      65,    53,    54,    56,   101,    52,    54,    55,    95,   126,
-      97,    98,   109,   113,    53,    68,   100,    20,    24,   102,
-     103,    77,   123,    54,    57,    52,    54,    57,    98,   107,
-     103
+      38,    62,    67,    86,   108,   109,   110,   111,   112,   129,
+      42,    50,    51,    52,   129,    68,   109,    62,    32,    72,
+      56,    58,    58,    58,    58,    58,    37,    55,    69,    62,
+      41,    43,    44,    45,    46,    47,    48,    49,   129,    33,
+      35,    73,    75,    76,    78,    81,    82,    83,    86,   108,
+     111,    28,    87,   110,    16,   127,   127,    20,    21,    24,
+      25,   126,   127,   128,   126,    16,    17,    18,    19,    20,
+      21,    22,    23,    24,    25,    26,    27,    36,    39,    40,
+      54,   112,   116,   117,   118,   119,   120,   121,   122,   124,
+     129,   129,    41,   129,    58,    58,    58,    58,    58,    58,
+      58,    58,    58,    74,   129,    59,    75,    56,    77,    77,
+      77,    77,    34,    59,    56,    88,    89,    90,    91,    92,
+     111,   129,    29,    93,   116,    57,    59,    54,    58,    58,
+     116,   127,   125,   126,   126,   128,   127,   128,   128,   116,
+      54,    20,    74,    61,    89,    56,    57,    58,    94,    95,
+      96,   108,   111,    31,   113,    55,   119,   123,   124,    70,
+     116,   116,    57,    84,    85,   108,   109,    60,    54,    60,
+      56,    91,   129,     3,   126,    95,    56,    97,    98,   129,
+     107,   109,   114,   115,    57,    60,    67,   126,    55,    85,
+      56,   102,   103,   129,    74,    79,    80,   129,    74,    56,
+      57,    59,    99,    58,   115,    56,   124,    68,    56,    57,
+      59,   104,    55,    57,    58,    98,   129,   100,   101,   112,
+     116,    56,    71,   103,    20,    24,   105,   106,    80,   126,
+      57,    60,    55,    57,    60,   101,   110,   106
 };
 
 #define yyerrok		(yyerrstatus = 0)
@@ -1812,17 +1827,17 @@ yyreduce:
   switch (yyn)
     {
         case 2:
-#line 211 "ncgen.y"
+#line 219 "ncgen.y"
     {if (error_count > 0) YYABORT;;}
     break;
 
   case 3:
-#line 214 "ncgen.y"
+#line 222 "ncgen.y"
     {createrootgroup(datasetname);;}
     break;
 
   case 8:
-#line 233 "ncgen.y"
+#line 241 "ncgen.y"
     {
 		Symbol* id = (yyvsp[(2) - (3)].sym);
                 markcdf4("Group specification");
@@ -1833,22 +1848,22 @@ yyreduce:
     break;
 
   case 9:
-#line 242 "ncgen.y"
+#line 250 "ncgen.y"
     {listpop(groupstack);;}
     break;
 
   case 12:
-#line 248 "ncgen.y"
+#line 256 "ncgen.y"
     {;}
     break;
 
   case 13:
-#line 250 "ncgen.y"
+#line 258 "ncgen.y"
     {markcdf4("Type specification");;}
     break;
 
   case 16:
-#line 256 "ncgen.y"
+#line 264 "ncgen.y"
     { /* Use when defining a type */
               (yyvsp[(1) - (1)].sym)->objectclass = NC_TYPE;
               if(dupobjectcheck(NC_TYPE,(yyvsp[(1) - (1)].sym)))
@@ -1859,17 +1874,17 @@ yyreduce:
     break;
 
   case 17:
-#line 265 "ncgen.y"
+#line 273 "ncgen.y"
     {;}
     break;
 
   case 18:
-#line 265 "ncgen.y"
+#line 273 "ncgen.y"
     {;}
     break;
 
   case 25:
-#line 279 "ncgen.y"
+#line 287 "ncgen.y"
     {
 		int i;
                 addtogroup((yyvsp[(3) - (6)].sym)); /* sets prefix*/
@@ -1899,12 +1914,12 @@ yyreduce:
     break;
 
   case 26:
-#line 308 "ncgen.y"
+#line 316 "ncgen.y"
     {(yyval.mark)=listlength(stack); listpush(stack,(void*)(yyvsp[(1) - (1)].sym));;}
     break;
 
   case 27:
-#line 310 "ncgen.y"
+#line 318 "ncgen.y"
     {
 		    int i;
 		    (yyval.mark)=(yyvsp[(1) - (3)].mark);
@@ -1922,7 +1937,7 @@ yyreduce:
     break;
 
   case 28:
-#line 327 "ncgen.y"
+#line 335 "ncgen.y"
     {
             (yyvsp[(1) - (3)].sym)->objectclass=NC_TYPE;
             (yyvsp[(1) - (3)].sym)->subclass=NC_ECONST;
@@ -1932,7 +1947,7 @@ yyreduce:
     break;
 
   case 29:
-#line 336 "ncgen.y"
+#line 344 "ncgen.y"
     {
 		    vercheck(NC_OPAQUE);
                     addtogroup((yyvsp[(5) - (5)].sym)); /*sets prefix*/
@@ -1945,7 +1960,7 @@ yyreduce:
     break;
 
   case 30:
-#line 348 "ncgen.y"
+#line 356 "ncgen.y"
     {
                     Symbol* basetype = (yyvsp[(1) - (5)].sym);
 		    vercheck(NC_VLEN);
@@ -1960,7 +1975,7 @@ yyreduce:
     break;
 
   case 31:
-#line 362 "ncgen.y"
+#line 370 "ncgen.y"
     {
 	    int i,j;
 	    vercheck(NC_COMPOUND);
@@ -1993,17 +2008,17 @@ yyreduce:
     break;
 
   case 32:
-#line 394 "ncgen.y"
+#line 402 "ncgen.y"
     {(yyval.mark)=(yyvsp[(1) - (2)].mark);;}
     break;
 
   case 33:
-#line 395 "ncgen.y"
+#line 403 "ncgen.y"
     {(yyval.mark)=(yyvsp[(1) - (3)].mark);;}
     break;
 
   case 34:
-#line 399 "ncgen.y"
+#line 407 "ncgen.y"
     {
 	    int i;
 	    (yyval.mark)=(yyvsp[(2) - (2)].mark);
@@ -2018,122 +2033,92 @@ yyreduce:
     break;
 
   case 35:
-#line 412 "ncgen.y"
+#line 420 "ncgen.y"
     { (yyval.sym) = primsymbols[NC_CHAR]; ;}
     break;
 
   case 36:
-#line 413 "ncgen.y"
+#line 421 "ncgen.y"
     { (yyval.sym) = primsymbols[NC_BYTE]; ;}
     break;
 
   case 37:
-#line 414 "ncgen.y"
+#line 422 "ncgen.y"
     { (yyval.sym) = primsymbols[NC_SHORT]; ;}
     break;
 
   case 38:
-#line 415 "ncgen.y"
+#line 423 "ncgen.y"
     { (yyval.sym) = primsymbols[NC_INT]; ;}
     break;
 
   case 39:
-#line 416 "ncgen.y"
+#line 424 "ncgen.y"
     { (yyval.sym) = primsymbols[NC_FLOAT]; ;}
     break;
 
   case 40:
-#line 417 "ncgen.y"
+#line 425 "ncgen.y"
     { (yyval.sym) = primsymbols[NC_DOUBLE]; ;}
     break;
 
   case 41:
-#line 418 "ncgen.y"
+#line 426 "ncgen.y"
     { vercheck(NC_UBYTE); (yyval.sym) = primsymbols[NC_UBYTE]; ;}
     break;
 
   case 42:
-#line 419 "ncgen.y"
+#line 427 "ncgen.y"
     { vercheck(NC_USHORT); (yyval.sym) = primsymbols[NC_USHORT]; ;}
     break;
 
   case 43:
-#line 420 "ncgen.y"
+#line 428 "ncgen.y"
     { vercheck(NC_UINT); (yyval.sym) = primsymbols[NC_UINT]; ;}
     break;
 
   case 44:
-#line 421 "ncgen.y"
+#line 429 "ncgen.y"
     { vercheck(NC_INT64); (yyval.sym) = primsymbols[NC_INT64]; ;}
     break;
 
   case 45:
-#line 422 "ncgen.y"
+#line 430 "ncgen.y"
     { vercheck(NC_UINT64); (yyval.sym) = primsymbols[NC_UINT64]; ;}
     break;
 
   case 47:
-#line 426 "ncgen.y"
+#line 434 "ncgen.y"
     {;}
     break;
 
   case 48:
-#line 427 "ncgen.y"
+#line 435 "ncgen.y"
     {;}
     break;
 
   case 51:
-#line 434 "ncgen.y"
+#line 442 "ncgen.y"
     {;}
     break;
 
   case 52:
-#line 434 "ncgen.y"
+#line 442 "ncgen.y"
     {;}
     break;
 
   case 55:
-#line 442 "ncgen.y"
+#line 450 "ncgen.y"
     {
-		(yyvsp[(1) - (3)].sym)->dim.declsize = (size_t)uint32_val;
+		(yyvsp[(1) - (3)].sym)->dim.declsize = (size_t)extractint((yyvsp[(3) - (3)].constant));
 #ifdef GENDEBUG1
-fprintf(stderr,"dimension: %s = %lu\n",(yyvsp[(1) - (3)].sym)->name,(unsigned long)(yyvsp[(1) - (3)].sym)->dim.declsize);
+fprintf(stderr,"dimension: %s = %llu\n",(yyvsp[(1) - (3)].sym)->name,(unsigned long long)(yyvsp[(1) - (3)].sym)->dim.declsize);
 #endif
 	      ;}
     break;
 
   case 56:
-#line 449 "ncgen.y"
-    {
-		if(int32_val <= 0) {
-		    derror("dimension size must be positive");
-		    YYABORT;
-		}
-		(yyvsp[(1) - (3)].sym)->dim.declsize = (size_t)int32_val;
-#ifdef GENDEBUG1
-fprintf(stderr,"dimension: %s = %lu\n",(yyvsp[(1) - (3)].sym)->name,(unsigned long)(yyvsp[(1) - (3)].sym)->dim.declsize);
-#endif
-	      ;}
-    break;
-
-  case 57:
-#line 460 "ncgen.y"
-    { /* for rare case where 2^31 < dimsize < 2^32 */
-                       if (double_val <= 0)
-                         yyerror("dimension length must be positive");
-                       if (double_val > MAXFLOATDIM)
-                         yyerror("dimension too large");
-                       if (double_val - (size_t) double_val > 0)
-                         yyerror("dimension length must be an integer");
-                       (yyvsp[(1) - (3)].sym)->dim.declsize = (size_t)double_val;
-#ifdef GENDEBUG1
-fprintf(stderr,"dimension: %s = %lu\n",(yyvsp[(1) - (3)].sym)->name,(unsigned long)(yyvsp[(1) - (3)].sym)->dim.declsize);
-#endif
-                   ;}
-    break;
-
-  case 58:
-#line 473 "ncgen.y"
+#line 457 "ncgen.y"
     {
 		        (yyvsp[(1) - (3)].sym)->dim.declsize = NC_UNLIMITED;
 		        (yyvsp[(1) - (3)].sym)->dim.isunlimited = 1;
@@ -2143,8 +2128,8 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[(1) - (3)].sym)->name);
 		   ;}
     break;
 
-  case 59:
-#line 483 "ncgen.y"
+  case 57:
+#line 467 "ncgen.y"
     {
                      (yyvsp[(1) - (1)].sym)->objectclass=NC_DIM;
                      if(dupobjectcheck(NC_DIM,(yyvsp[(1) - (1)].sym)))
@@ -2156,28 +2141,28 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[(1) - (3)].sym)->name);
                    ;}
     break;
 
-  case 61:
-#line 495 "ncgen.y"
+  case 59:
+#line 479 "ncgen.y"
     {;}
     break;
 
-  case 62:
-#line 496 "ncgen.y"
+  case 60:
+#line 480 "ncgen.y"
     {;}
     break;
 
-  case 65:
-#line 503 "ncgen.y"
+  case 63:
+#line 487 "ncgen.y"
     {;}
     break;
 
-  case 66:
-#line 503 "ncgen.y"
+  case 64:
+#line 487 "ncgen.y"
     {;}
     break;
 
-  case 67:
-#line 506 "ncgen.y"
+  case 65:
+#line 490 "ncgen.y"
     {
 		    int i;
 		    stackbase=(yyvsp[(2) - (2)].mark);
@@ -2199,20 +2184,20 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[(1) - (3)].sym)->name);
 		;}
     break;
 
-  case 68:
-#line 528 "ncgen.y"
+  case 66:
+#line 512 "ncgen.y"
     {(yyval.mark)=listlength(stack);
                  listpush(stack,(void*)(yyvsp[(1) - (1)].sym));
 		;}
     break;
 
-  case 69:
-#line 532 "ncgen.y"
+  case 67:
+#line 516 "ncgen.y"
     {(yyval.mark)=(yyvsp[(1) - (3)].mark); listpush(stack,(void*)(yyvsp[(3) - (3)].sym));;}
     break;
 
-  case 70:
-#line 536 "ncgen.y"
+  case 68:
+#line 520 "ncgen.y"
     {
 		    int i;
 		    Dimset dimset;
@@ -2239,28 +2224,28 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[(1) - (3)].sym)->name);
 		    ;}
     break;
 
-  case 71:
-#line 562 "ncgen.y"
+  case 69:
+#line 546 "ncgen.y"
     {(yyval.mark)=listlength(stack);;}
     break;
 
-  case 72:
-#line 563 "ncgen.y"
+  case 70:
+#line 547 "ncgen.y"
     {(yyval.mark)=(yyvsp[(2) - (3)].mark);;}
     break;
 
-  case 73:
-#line 566 "ncgen.y"
+  case 71:
+#line 550 "ncgen.y"
     {(yyval.mark)=listlength(stack); listpush(stack,(void*)(yyvsp[(1) - (1)].sym));;}
     break;
 
-  case 74:
-#line 568 "ncgen.y"
+  case 72:
+#line 552 "ncgen.y"
     {(yyval.mark)=(yyvsp[(1) - (3)].mark); listpush(stack,(void*)(yyvsp[(3) - (3)].sym));;}
     break;
 
-  case 75:
-#line 572 "ncgen.y"
+  case 73:
+#line 556 "ncgen.y"
     {Symbol* dimsym = (yyvsp[(1) - (1)].sym);
 		dimsym->objectclass = NC_DIM;
 		/* Find the actual dimension*/
@@ -2273,20 +2258,20 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[(1) - (3)].sym)->name);
 	    ;}
     break;
 
-  case 76:
-#line 586 "ncgen.y"
+  case 74:
+#line 570 "ncgen.y"
     {(yyval.mark)=listlength(stack);
              listpush(stack,(void*)(yyvsp[(1) - (1)].sym));
 	    ;}
     break;
 
-  case 77:
-#line 590 "ncgen.y"
+  case 75:
+#line 574 "ncgen.y"
     {(yyval.mark)=(yyvsp[(1) - (3)].mark); listpush(stack,(void*)(yyvsp[(3) - (3)].sym));;}
     break;
 
-  case 78:
-#line 595 "ncgen.y"
+  case 76:
+#line 579 "ncgen.y"
     {
 		int i;
 		Dimset dimset;
@@ -2315,28 +2300,28 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[(1) - (3)].sym)->name);
 	    ;}
     break;
 
-  case 79:
-#line 623 "ncgen.y"
+  case 77:
+#line 607 "ncgen.y"
     {(yyval.mark)=listlength(stack);;}
     break;
 
-  case 80:
-#line 624 "ncgen.y"
+  case 78:
+#line 608 "ncgen.y"
     {(yyval.mark)=(yyvsp[(2) - (3)].mark);;}
     break;
 
-  case 81:
-#line 628 "ncgen.y"
+  case 79:
+#line 612 "ncgen.y"
     {(yyval.mark)=listlength(stack); listpush(stack,(void*)(yyvsp[(1) - (1)].sym));;}
     break;
 
-  case 82:
-#line 630 "ncgen.y"
+  case 80:
+#line 614 "ncgen.y"
     {(yyval.mark)=(yyvsp[(1) - (3)].mark); listpush(stack,(void*)(yyvsp[(3) - (3)].sym));;}
     break;
 
-  case 83:
-#line 635 "ncgen.y"
+  case 81:
+#line 619 "ncgen.y"
     {  /* Anonymous integer dimension.
 	         Can only occur in type definitions*/
 	     char anon[32];
@@ -2348,8 +2333,8 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[(1) - (3)].sym)->name);
 	    ;}
     break;
 
-  case 84:
-#line 645 "ncgen.y"
+  case 82:
+#line 629 "ncgen.y"
     {  /* Anonymous integer dimension.
 	         Can only occur in type definitions*/
 	     char anon[32];
@@ -2365,8 +2350,8 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[(1) - (3)].sym)->name);
 	    ;}
     break;
 
-  case 85:
-#line 665 "ncgen.y"
+  case 83:
+#line 649 "ncgen.y"
     {Symbol* vsym = (yyvsp[(1) - (1)].sym);
 		if(vsym->objectclass != NC_VAR) {
 		    derror("Undefined or forward referenced variable: %s",vsym->name);
@@ -2376,8 +2361,8 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[(1) - (3)].sym)->name);
 	    ;}
     break;
 
-  case 86:
-#line 676 "ncgen.y"
+  case 84:
+#line 660 "ncgen.y"
     {Symbol* tsym = (yyvsp[(1) - (1)].sym);
 		if(tsym->objectclass != NC_TYPE) {
 		    derror("Undefined or forward referenced type: %s",tsym->name);
@@ -2387,8 +2372,8 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[(1) - (3)].sym)->name);
 	    ;}
     break;
 
-  case 87:
-#line 687 "ncgen.y"
+  case 85:
+#line 671 "ncgen.y"
     {Symbol* tvsym = (yyvsp[(1) - (1)].sym); Symbol* sym;
 		/* disambiguate*/
 		tvsym->objectclass = NC_VAR;
@@ -2409,28 +2394,43 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[(1) - (3)].sym)->name);
 	    ;}
     break;
 
-  case 88:
-#line 705 "ncgen.y"
+  case 86:
+#line 689 "ncgen.y"
     {(yyval.sym)=(yyvsp[(1) - (1)].sym);;}
     break;
 
-  case 89:
-#line 712 "ncgen.y"
+  case 87:
+#line 696 "ncgen.y"
     {;}
     break;
 
-  case 90:
-#line 712 "ncgen.y"
+  case 88:
+#line 696 "ncgen.y"
     {;}
     break;
 
+  case 89:
+#line 700 "ncgen.y"
+    {(yyval.sym) = makespecial(_NCPROPS_FLAG,NULL,NULL,(void*)&(yyvsp[(4) - (4)].constant),ATTRGLOBAL);;}
+    break;
+
+  case 90:
+#line 702 "ncgen.y"
+    {(yyval.sym) = makespecial(_ISNETCDF4_FLAG,NULL,NULL,(void*)&(yyvsp[(4) - (4)].constant),ATTRGLOBAL);;}
+    break;
+
   case 91:
-#line 716 "ncgen.y"
-    { (yyval.sym)=makeattribute((yyvsp[(2) - (4)].sym),NULL,NULL,(yyvsp[(4) - (4)].datalist),ATTRGLOBAL);;}
+#line 704 "ncgen.y"
+    {(yyval.sym) = makespecial(_SUPERBLOCK_FLAG,NULL,NULL,(void*)&(yyvsp[(4) - (4)].constant),ATTRGLOBAL);;}
     break;
 
   case 92:
-#line 718 "ncgen.y"
+#line 706 "ncgen.y"
+    { (yyval.sym)=makeattribute((yyvsp[(2) - (4)].sym),NULL,NULL,(yyvsp[(4) - (4)].datalist),ATTRGLOBAL);;}
+    break;
+
+  case 93:
+#line 708 "ncgen.y"
     {Symbol* tsym = (yyvsp[(1) - (6)].sym); Symbol* vsym = (yyvsp[(2) - (6)].sym); Symbol* asym = (yyvsp[(4) - (6)].sym);
 		if(vsym->objectclass == NC_VAR) {
 		    (yyval.sym)=makeattribute(asym,vsym,tsym,(yyvsp[(6) - (6)].datalist),ATTRVAR);
@@ -2441,8 +2441,8 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[(1) - (3)].sym)->name);
 	    ;}
     break;
 
-  case 93:
-#line 727 "ncgen.y"
+  case 94:
+#line 717 "ncgen.y"
     {Symbol* sym = (yyvsp[(1) - (5)].sym); Symbol* asym = (yyvsp[(3) - (5)].sym);
 		if(sym->objectclass == NC_VAR) {
 		    (yyval.sym)=makeattribute(asym,sym,NULL,(yyvsp[(5) - (5)].datalist),ATTRVAR);
@@ -2455,58 +2455,58 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[(1) - (3)].sym)->name);
 	    ;}
     break;
 
-  case 94:
-#line 738 "ncgen.y"
+  case 95:
+#line 728 "ncgen.y"
     {(yyval.sym) = makespecial(_FILLVALUE_FLAG,(yyvsp[(1) - (5)].sym),NULL,(void*)(yyvsp[(5) - (5)].datalist),0);;}
     break;
 
-  case 95:
-#line 740 "ncgen.y"
+  case 96:
+#line 730 "ncgen.y"
     {(yyval.sym) = makespecial(_FILLVALUE_FLAG,(yyvsp[(2) - (6)].sym),(yyvsp[(1) - (6)].sym),(void*)(yyvsp[(6) - (6)].datalist),0);;}
     break;
 
-  case 96:
-#line 742 "ncgen.y"
+  case 97:
+#line 732 "ncgen.y"
     {(yyval.sym) = makespecial(_STORAGE_FLAG,(yyvsp[(1) - (5)].sym),NULL,(void*)&(yyvsp[(5) - (5)].constant),1);;}
     break;
 
-  case 97:
-#line 744 "ncgen.y"
+  case 98:
+#line 734 "ncgen.y"
     {(yyval.sym) = makespecial(_CHUNKSIZES_FLAG,(yyvsp[(1) - (5)].sym),NULL,(void*)(yyvsp[(5) - (5)].datalist),0);;}
     break;
 
-  case 98:
-#line 746 "ncgen.y"
+  case 99:
+#line 736 "ncgen.y"
     {(yyval.sym) = makespecial(_FLETCHER32_FLAG,(yyvsp[(1) - (5)].sym),NULL,(void*)&(yyvsp[(5) - (5)].constant),1);;}
     break;
 
-  case 99:
-#line 748 "ncgen.y"
+  case 100:
+#line 738 "ncgen.y"
     {(yyval.sym) = makespecial(_DEFLATE_FLAG,(yyvsp[(1) - (5)].sym),NULL,(void*)&(yyvsp[(5) - (5)].constant),1);;}
     break;
 
-  case 100:
-#line 750 "ncgen.y"
+  case 101:
+#line 740 "ncgen.y"
     {(yyval.sym) = makespecial(_SHUFFLE_FLAG,(yyvsp[(1) - (5)].sym),NULL,(void*)&(yyvsp[(5) - (5)].constant),1);;}
     break;
 
-  case 101:
-#line 752 "ncgen.y"
+  case 102:
+#line 742 "ncgen.y"
     {(yyval.sym) = makespecial(_ENDIAN_FLAG,(yyvsp[(1) - (5)].sym),NULL,(void*)&(yyvsp[(5) - (5)].constant),1);;}
     break;
 
-  case 102:
-#line 754 "ncgen.y"
+  case 103:
+#line 744 "ncgen.y"
     {(yyval.sym) = makespecial(_NOFILL_FLAG,(yyvsp[(1) - (5)].sym),NULL,(void*)&(yyvsp[(5) - (5)].constant),1);;}
     break;
 
-  case 103:
-#line 756 "ncgen.y"
+  case 104:
+#line 746 "ncgen.y"
     {(yyval.sym) = makespecial(_FORMAT_FLAG,NULL,NULL,(void*)&(yyvsp[(4) - (4)].constant),1);;}
     break;
 
-  case 104:
-#line 761 "ncgen.y"
+  case 105:
+#line 751 "ncgen.y"
     {
 	        (yyval.sym)=(yyvsp[(1) - (1)].sym);
                 (yyvsp[(1) - (1)].sym)->ref.is_ref=1;
@@ -2515,8 +2515,8 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[(1) - (3)].sym)->name);
 	    ;}
     break;
 
-  case 105:
-#line 768 "ncgen.y"
+  case 106:
+#line 758 "ncgen.y"
     {
 	        (yyval.sym)=(yyvsp[(1) - (1)].sym);
                 (yyvsp[(1) - (1)].sym)->ref.is_ref=1;
@@ -2525,208 +2525,208 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[(1) - (3)].sym)->name);
 	    ;}
     break;
 
-  case 107:
-#line 777 "ncgen.y"
+  case 108:
+#line 767 "ncgen.y"
     {;}
     break;
 
-  case 108:
-#line 778 "ncgen.y"
+  case 109:
+#line 768 "ncgen.y"
     {;}
     break;
 
-  case 111:
-#line 786 "ncgen.y"
+  case 112:
+#line 776 "ncgen.y"
     {(yyvsp[(1) - (3)].sym)->data = (yyvsp[(3) - (3)].datalist);;}
     break;
 
-  case 112:
-#line 789 "ncgen.y"
+  case 113:
+#line 779 "ncgen.y"
     {(yyval.datalist) = (yyvsp[(1) - (1)].datalist);;}
     break;
 
-  case 113:
-#line 790 "ncgen.y"
+  case 114:
+#line 780 "ncgen.y"
     {(yyval.datalist) = (yyvsp[(1) - (1)].datalist);;}
     break;
 
-  case 114:
-#line 794 "ncgen.y"
+  case 115:
+#line 784 "ncgen.y"
     {(yyval.datalist) = builddatalist(0);;}
     break;
 
-  case 115:
-#line 798 "ncgen.y"
+  case 116:
+#line 788 "ncgen.y"
     {(yyval.datalist) = builddatalist(0); datalistextend((yyval.datalist),&((yyvsp[(1) - (1)].constant)));;}
     break;
 
-  case 116:
-#line 800 "ncgen.y"
+  case 117:
+#line 790 "ncgen.y"
     {datalistextend((yyvsp[(1) - (3)].datalist),&((yyvsp[(3) - (3)].constant))); (yyval.datalist)=(yyvsp[(1) - (3)].datalist);;}
     break;
 
-  case 117:
-#line 804 "ncgen.y"
+  case 118:
+#line 794 "ncgen.y"
     {(yyval.constant)=(yyvsp[(1) - (1)].constant);;}
     break;
 
-  case 118:
-#line 805 "ncgen.y"
+  case 119:
+#line 795 "ncgen.y"
     {(yyval.constant)=builddatasublist((yyvsp[(2) - (3)].datalist));;}
     break;
 
-  case 119:
-#line 809 "ncgen.y"
+  case 120:
+#line 799 "ncgen.y"
     {(yyval.constant)=(yyvsp[(1) - (1)].constant);;}
     break;
 
-  case 120:
-#line 810 "ncgen.y"
+  case 121:
+#line 800 "ncgen.y"
     {(yyval.constant)=makeconstdata(NC_OPAQUE);;}
     break;
 
-  case 121:
-#line 811 "ncgen.y"
+  case 122:
+#line 801 "ncgen.y"
     {(yyval.constant)=makeconstdata(NC_FILLVALUE);;}
     break;
 
-  case 122:
-#line 812 "ncgen.y"
+  case 123:
+#line 802 "ncgen.y"
     {(yyval.constant)=makeconstdata(NC_NIL);;}
     break;
 
-  case 123:
-#line 813 "ncgen.y"
+  case 124:
+#line 803 "ncgen.y"
     {(yyval.constant)=(yyvsp[(1) - (1)].constant);;}
     break;
 
-  case 125:
-#line 818 "ncgen.y"
+  case 126:
+#line 808 "ncgen.y"
     {(yyval.constant) = makeenumconstref((yyvsp[(1) - (1)].sym));;}
     break;
 
-  case 126:
-#line 822 "ncgen.y"
+  case 127:
+#line 812 "ncgen.y"
     {(yyval.constant)=evaluate((yyvsp[(1) - (4)].sym),(yyvsp[(3) - (4)].datalist));;}
     break;
 
-  case 127:
-#line 827 "ncgen.y"
+  case 128:
+#line 817 "ncgen.y"
     {(yyval.datalist) = builddatalist(0); datalistextend((yyval.datalist),&((yyvsp[(1) - (1)].constant)));;}
     break;
 
-  case 128:
-#line 829 "ncgen.y"
+  case 129:
+#line 819 "ncgen.y"
     {datalistextend((yyvsp[(1) - (3)].datalist),&((yyvsp[(3) - (3)].constant))); (yyval.datalist)=(yyvsp[(1) - (3)].datalist);;}
     break;
 
-  case 129:
-#line 833 "ncgen.y"
+  case 130:
+#line 823 "ncgen.y"
     {(yyval.constant)=makeconstdata(NC_CHAR);;}
     break;
 
-  case 130:
-#line 834 "ncgen.y"
+  case 131:
+#line 824 "ncgen.y"
     {(yyval.constant)=makeconstdata(NC_BYTE);;}
     break;
 
-  case 131:
-#line 835 "ncgen.y"
+  case 132:
+#line 825 "ncgen.y"
     {(yyval.constant)=makeconstdata(NC_SHORT);;}
     break;
 
-  case 132:
-#line 836 "ncgen.y"
+  case 133:
+#line 826 "ncgen.y"
     {(yyval.constant)=makeconstdata(NC_INT);;}
     break;
 
-  case 133:
-#line 837 "ncgen.y"
+  case 134:
+#line 827 "ncgen.y"
     {(yyval.constant)=makeconstdata(NC_INT64);;}
     break;
 
-  case 134:
-#line 838 "ncgen.y"
+  case 135:
+#line 828 "ncgen.y"
     {(yyval.constant)=makeconstdata(NC_UBYTE);;}
     break;
 
-  case 135:
-#line 839 "ncgen.y"
+  case 136:
+#line 829 "ncgen.y"
     {(yyval.constant)=makeconstdata(NC_USHORT);;}
     break;
 
-  case 136:
-#line 840 "ncgen.y"
+  case 137:
+#line 830 "ncgen.y"
     {(yyval.constant)=makeconstdata(NC_UINT);;}
     break;
 
-  case 137:
-#line 841 "ncgen.y"
+  case 138:
+#line 831 "ncgen.y"
     {(yyval.constant)=makeconstdata(NC_UINT64);;}
     break;
 
-  case 138:
-#line 842 "ncgen.y"
+  case 139:
+#line 832 "ncgen.y"
     {(yyval.constant)=makeconstdata(NC_FLOAT);;}
     break;
 
-  case 139:
-#line 843 "ncgen.y"
+  case 140:
+#line 833 "ncgen.y"
     {(yyval.constant)=makeconstdata(NC_DOUBLE);;}
     break;
 
-  case 140:
-#line 844 "ncgen.y"
+  case 141:
+#line 834 "ncgen.y"
     {(yyval.constant)=makeconstdata(NC_STRING);;}
     break;
 
-  case 141:
-#line 848 "ncgen.y"
+  case 142:
+#line 838 "ncgen.y"
     {(yyval.datalist) = builddatalist(0); datalistextend((yyval.datalist),&((yyvsp[(1) - (1)].constant)));;}
     break;
 
-  case 142:
-#line 849 "ncgen.y"
+  case 143:
+#line 839 "ncgen.y"
     {(yyval.datalist)=(yyvsp[(1) - (3)].datalist); datalistextend((yyvsp[(1) - (3)].datalist),&((yyvsp[(3) - (3)].constant)));;}
     break;
 
-  case 143:
-#line 854 "ncgen.y"
+  case 144:
+#line 844 "ncgen.y"
     {(yyval.constant)=makeconstdata(NC_INT);;}
     break;
 
-  case 144:
-#line 856 "ncgen.y"
+  case 145:
+#line 846 "ncgen.y"
     {(yyval.constant)=makeconstdata(NC_UINT);;}
     break;
 
-  case 145:
-#line 858 "ncgen.y"
+  case 146:
+#line 848 "ncgen.y"
     {(yyval.constant)=makeconstdata(NC_INT64);;}
     break;
 
-  case 146:
-#line 860 "ncgen.y"
+  case 147:
+#line 850 "ncgen.y"
     {(yyval.constant)=makeconstdata(NC_UINT64);;}
     break;
 
-  case 147:
-#line 864 "ncgen.y"
+  case 148:
+#line 854 "ncgen.y"
     {(yyval.constant)=makeconstdata(NC_STRING);;}
     break;
 
-  case 148:
-#line 868 "ncgen.y"
+  case 149:
+#line 858 "ncgen.y"
     {(yyval.constant)=(yyvsp[(1) - (1)].constant);;}
     break;
 
-  case 149:
-#line 869 "ncgen.y"
+  case 150:
+#line 859 "ncgen.y"
     {(yyval.constant)=(yyvsp[(1) - (1)].constant);;}
     break;
 
-  case 150:
-#line 875 "ncgen.y"
+  case 151:
+#line 865 "ncgen.y"
     {(yyval.sym)=(yyvsp[(1) - (1)].sym);;}
     break;
 
@@ -2946,7 +2946,7 @@ yyreturn:
 }
 
 
-#line 878 "ncgen.y"
+#line 868 "ncgen.y"
 
 
 #ifndef NO_STDARG
@@ -3195,24 +3195,6 @@ basetypefor(nc_type nctype)
     return primsymbols[nctype];
 }
 
-char*
-specialname(int flag)
-{
-    switch (flag) {
-    case _FILLVALUE_FLAG: return "_FillValue";
-    case _FORMAT_FLAG: return "_Format";
-    case _STORAGE_FLAG: return "_Storage";
-    case _CHUNKSIZES_FLAG: return "_ChunkSizes";
-    case _FLETCHER32_FLAG: return "_Fletcher32";
-    case _DEFLATE_FLAG: return "_DeflateLevel";
-    case _SHUFFLE_FLAG: return "_Shuffle";
-    case _ENDIAN_FLAG: return "_Endianness";
-    case _NOFILL_FLAG: return "_NoFill";
-    default: break;
-    }
-    return "<unknown>";
-}
-
 static int
 truefalse(NCConstant* con, int tag)
 {
@@ -3249,7 +3231,7 @@ makespecial(int tag, Symbol* vsym, Symbol* tsym, void* data, int isconst)
     char* sdata = NULL;
     int idata =  -1;
 
-    if(tag == _FORMAT_FLAG) {
+    if((GLOBAL_SPECIAL & tag) != 0) {
         if(vsym != NULL) {
             derror("_Format: must be global attribute");
             vsym = NULL;
@@ -3276,6 +3258,7 @@ makespecial(int tag, Symbol* vsym, Symbol* tsym, void* data, int isconst)
     switch (tag) {
     case _FLETCHER32_FLAG:
     case _SHUFFLE_FLAG:
+    case _ISNETCDF4_FLAG:
     case _NOFILL_FLAG:
 	iconst.nctype = (con->nctype == NC_STRING?NC_STRING:NC_INT);
 	convert1(con,&iconst);
@@ -3283,6 +3266,7 @@ makespecial(int tag, Symbol* vsym, Symbol* tsym, void* data, int isconst)
 	break;
     case _FORMAT_FLAG:
     case _STORAGE_FLAG:
+    case _NCPROPS_FLAG:
     case _ENDIAN_FLAG:
 	iconst.nctype = NC_STRING;
 	convert1(con,&iconst);
@@ -3291,6 +3275,7 @@ makespecial(int tag, Symbol* vsym, Symbol* tsym, void* data, int isconst)
 	else
 	    derror("%s: illegal value",specialname(tag));
 	break;
+    case _SUPERBLOCK_FLAG:
     case _DEFLATE_FLAG:
 	iconst.nctype = NC_INT;
 	convert1(con,&iconst);
@@ -3310,12 +3295,12 @@ makespecial(int tag, Symbol* vsym, Symbol* tsym, void* data, int isconst)
 	/* Watch out: this is a global attribute */
 	struct Kvalues* kvalue;
 	int found = 0;
-
 	/* Use the table in main.c */
         for(kvalue = legalkinds; kvalue->name; kvalue++) {
           if(sdata) {
             if(strcmp(sdata, kvalue->name) == 0) {
-              /*Main.*/format_flag = kvalue->k_flag;
+              globalspecials._Format = kvalue->k_flag;
+	      /*Main.*/format_attribute = 1;
               found = 1;
               break;
             }
@@ -3323,13 +3308,17 @@ makespecial(int tag, Symbol* vsym, Symbol* tsym, void* data, int isconst)
 	}
 	if(!found)
 	    derror("_Format: illegal value: %s",sdata);
-	/*Main.*/format_attribute = 1;
+    } else if((GLOBAL_SPECIAL & tag) != 0) {
+	if(tag == _ISNETCDF4_FLAG)
+	    globalspecials._IsNetcdf4 = tf;
+	else if(tag == _SUPERBLOCK_FLAG)
+	    globalspecials._Superblock = idata;
+	else if(tag == _NCPROPS_FLAG)
+	    globalspecials._NCProperties = strdup(sdata);
     } else {
         Specialdata* special;
-
         /* Set up special info */
         special = &vsym->var.special;
-
         if(tag == _FILLVALUE_FLAG) {
             special->_Fillvalue = list;
             /* fillvalue must be a single value*/
@@ -3389,7 +3378,7 @@ makespecial(int tag, Symbol* vsym, Symbol* tsym, void* data, int isconst)
                 special->_Fill = (1 - tf); /* negate */
                 special->flags |= _NOFILL_FLAG;
                 break;
-            case _CHUNKSIZES_FLAG: {
+          case _CHUNKSIZES_FLAG: {
                 int i;
                 special->nchunks = list->length;
                 special->_ChunkSizes = (size_t*)emalloc(sizeof(size_t)*special->nchunks);
@@ -3423,17 +3412,18 @@ makeattribute(Symbol* asym,
 {
     asym->objectclass = NC_ATT;
     asym->data = data;
-    addtogroup(asym);
     switch (kind) {
     case ATTRVAR:
         asym->att.var = vsym;
         asym->typ.basetype = tsym;
         listpush(attdefs,(void*)asym);
+        addtogroup(asym);
 	break;
     case ATTRGLOBAL:
         asym->att.var = NULL; /* NULL => NC_GLOBAL*/
         asym->typ.basetype = tsym;
         listpush(gattdefs,(void*)asym);
+        addtogroup(asym);
 	break;
     default: PANIC1("unexpected attribute type: %d",kind);
     }
@@ -3444,6 +3434,24 @@ makeattribute(Symbol* asym,
     return asym;
 }
 
+static long long
+extractint(NCConstant con)
+{
+    switch (con.nctype) {
+    case NC_BYTE: return (long long)(con.value.int8v);
+    case NC_SHORT: return (long long)(con.value.int16v);
+    case NC_INT: return (long long)(con.value.int32v);
+    case NC_UBYTE: return (long long)(con.value.uint8v);
+    case NC_USHORT: return (long long)(con.value.uint16v);
+    case NC_UINT: return (long long)(con.value.uint32v);
+    case NC_INT64: return (long long)(con.value.int64v);
+    default:
+	derror("Not a signed integer type: %d",con.nctype);
+	break;
+    }
+    return 0;
+}
+
 static int
 containsfills(Datalist* list)
 {
@@ -3483,6 +3491,17 @@ vercheck(int tid)
     }
 }
 
+const char*
+specialname(int tag)
+{
+    struct Specialtoken* spp = specials;
+    for(;spp->name;spp++) {
+	if(spp->tag == tag)
+	    return spp->name;
+    }
+    return "<unknown>";
+}
+
 /*
 Since the arguments are all simple constants,
 we can evaluate the function immediately
diff --git a/ncgen/ncgeny.h b/ncgen/ncgeny.h
index 9d2e192..90e5541 100644
--- a/ncgen/ncgeny.h
+++ b/ncgen/ncgeny.h
@@ -86,7 +86,10 @@
      _ENDIANNESS = 302,
      _NOFILL = 303,
      _FLETCHER32 = 304,
-     DATASETID = 305
+     _NCPROPS = 305,
+     _ISNETCDF4 = 306,
+     _SUPERBLOCK = 307,
+     DATASETID = 308
    };
 #endif
 /* Tokens.  */
@@ -137,14 +140,17 @@
 #define _ENDIANNESS 302
 #define _NOFILL 303
 #define _FLETCHER32 304
-#define DATASETID 305
+#define _NCPROPS 305
+#define _ISNETCDF4 306
+#define _SUPERBLOCK 307
+#define DATASETID 308
 
 
 
 
 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
 typedef union YYSTYPE
-#line 131 "ncgen.y"
+#line 136 "ncgen.y"
 {
 Symbol* sym;
 unsigned long  size; /* allow for zero size to indicate e.g. UNLIMITED*/
@@ -154,7 +160,7 @@ Datalist*      datalist;
 NCConstant       constant;
 }
 /* Line 1529 of yacc.c.  */
-#line 158 "ncgen.tab.h"
+#line 164 "ncgen.tab.h"
 	YYSTYPE;
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
 # define YYSTYPE_IS_DECLARED 1
diff --git a/ncgen/run_tests.sh b/ncgen/run_tests.sh
index aecc018..e02a641 100755
--- a/ncgen/run_tests.sh
+++ b/ncgen/run_tests.sh
@@ -2,14 +2,17 @@
 # This shell script runs the ncgen tests.
 # $Id: run_tests.sh,v 1.10 2010/04/04 22:06:03 dmh Exp $
 
+set -x
 if test "x$srcdir" = x ; then
-srcdir="."
+srcdir=`pwd`
 fi
 
 echo "*** Testing ncgen."
 set -e
 
 echo "*** creating classic file c0.nc from c0.cdl..."
+ls -l "$srcdir/c0.cdl"
+ls -l ./ncgen*
 ./ncgen -b -o c0.nc $srcdir/c0.cdl
 if [ ! -f c0.nc ]; then
     echo "Failure."
diff --git a/ncgen/semantics.c b/ncgen/semantics.c
index b8a30b7..7ad7909 100644
--- a/ncgen/semantics.c
+++ b/ncgen/semantics.c
@@ -766,7 +766,8 @@ processattributes(void)
 	List* list = listnew();
         for(j=0;j<listlength(attdefs);j++) {
 	    Symbol* asym = (Symbol*)listget(attdefs,j);
-	    ASSERT(asym->att.var != NULL);
+	    if(asym->att.var == NULL)
+		continue; /* ignore globals for now */
 	    if(asym->att.var != vsym) continue;	    
             listpush(list,(void*)asym);
 	}
diff --git a/ncgen/util.c b/ncgen/util.c
index 2f07b50..9b2dd70 100644
--- a/ncgen/util.c
+++ b/ncgen/util.c
@@ -695,3 +695,19 @@ kind_string(int kind)
     }
     return NULL;
 }
+
+#ifdef USE_NETCDF4i
+nt
+getrootid(int grpid)
+{
+    int current = grpid;
+    int parent = current;
+    /* see if root id */
+    for(;;) {
+        int stat = nc_inq_grp_parent(current,&parent);
+        if(stat) break;
+	current = parent;
+    }
+    return current;
+}
+#endif
diff --git a/ncgen/util.h b/ncgen/util.h
index 8aa9dfd..7960b65 100644
--- a/ncgen/util.h
+++ b/ncgen/util.h
@@ -61,6 +61,7 @@ extern int getpadding(int offset, int alignment);
 extern void check_err(const int stat, const int line, const char* file);
 extern void check_err2(const int stat, const int cdlline, const int line, const char* file);
 extern const char* kind_string(int kind);
+extern int getrootid(int grpid);
 
 /* Inline functions */
 #define isunlimited(dimset,i) ((dimset)->dimsyms[i]->dim.isunlimited)
diff --git a/ncgen3/Makefile.in b/ncgen3/Makefile.in
index f442b4c..eacbb4a 100644
--- a/ncgen3/Makefile.in
+++ b/ncgen3/Makefile.in
@@ -243,163 +243,8 @@ am__tty_colors = { \
     std=''; \
   fi; \
 }
-am__recheck_rx = ^[ 	]*:recheck:[ 	]*
-am__global_test_result_rx = ^[ 	]*:global-test-result:[ 	]*
-am__copy_in_global_log_rx = ^[ 	]*:copy-in-global-log:[ 	]*
-# A command that, given a newline-separated list of test names on the
-# standard input, print the name of the tests that are to be re-run
-# upon "make recheck".
-am__list_recheck_tests = $(AWK) '{ \
-  recheck = 1; \
-  while ((rc = (getline line < ($$0 ".trs"))) != 0) \
-    { \
-      if (rc < 0) \
-        { \
-          if ((getline line2 < ($$0 ".log")) < 0) \
-	    recheck = 0; \
-          break; \
-        } \
-      else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
-        { \
-          recheck = 0; \
-          break; \
-        } \
-      else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
-        { \
-          break; \
-        } \
-    }; \
-  if (recheck) \
-    print $$0; \
-  close ($$0 ".trs"); \
-  close ($$0 ".log"); \
-}'
-# A command that, given a newline-separated list of test names on the
-# standard input, create the global log from their .trs and .log files.
-am__create_global_log = $(AWK) ' \
-function fatal(msg) \
-{ \
-  print "fatal: making $@: " msg | "cat >&2"; \
-  exit 1; \
-} \
-function rst_section(header) \
-{ \
-  print header; \
-  len = length(header); \
-  for (i = 1; i <= len; i = i + 1) \
-    printf "="; \
-  printf "\n\n"; \
-} \
-{ \
-  copy_in_global_log = 1; \
-  global_test_result = "RUN"; \
-  while ((rc = (getline line < ($$0 ".trs"))) != 0) \
-    { \
-      if (rc < 0) \
-         fatal("failed to read from " $$0 ".trs"); \
-      if (line ~ /$(am__global_test_result_rx)/) \
-        { \
-          sub("$(am__global_test_result_rx)", "", line); \
-          sub("[ 	]*$$", "", line); \
-          global_test_result = line; \
-        } \
-      else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
-        copy_in_global_log = 0; \
-    }; \
-  if (copy_in_global_log) \
-    { \
-      rst_section(global_test_result ": " $$0); \
-      while ((rc = (getline line < ($$0 ".log"))) != 0) \
-      { \
-        if (rc < 0) \
-          fatal("failed to read from " $$0 ".log"); \
-        print line; \
-      }; \
-      printf "\n"; \
-    }; \
-  close ($$0 ".trs"); \
-  close ($$0 ".log"); \
-}'
-# Restructured Text title.
-am__rst_title = { sed 's/.*/   &   /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
-# Solaris 10 'make', and several other traditional 'make' implementations,
-# pass "-e" to $(SHELL), and POSIX 2008 even requires this.  Work around it
-# by disabling -e (using the XSI extension "set +e") if it's set.
-am__sh_e_setup = case $$- in *e*) set +e;; esac
-# Default flags passed to test drivers.
-am__common_driver_flags = \
-  --color-tests "$$am__color_tests" \
-  --enable-hard-errors "$$am__enable_hard_errors" \
-  --expect-failure "$$am__expect_failure"
-# To be inserted before the command running the test.  Creates the
-# directory for the log if needed.  Stores in $dir the directory
-# containing $f, in $tst the test, in $log the log.  Executes the
-# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
-# passes TESTS_ENVIRONMENT.  Set up options for the wrapper that
-# will run the test scripts (or their associated LOG_COMPILER, if
-# thy have one).
-am__check_pre = \
-$(am__sh_e_setup);					\
-$(am__vpath_adj_setup) $(am__vpath_adj)			\
-$(am__tty_colors);					\
-srcdir=$(srcdir); export srcdir;			\
-case "$@" in						\
-  */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;;	\
-    *) am__odir=.;; 					\
-esac;							\
-test "x$$am__odir" = x"." || test -d "$$am__odir" 	\
-  || $(MKDIR_P) "$$am__odir" || exit $$?;		\
-if test -f "./$$f"; then dir=./;			\
-elif test -f "$$f"; then dir=;				\
-else dir="$(srcdir)/"; fi;				\
-tst=$$dir$$f; log='$@'; 				\
-if test -n '$(DISABLE_HARD_ERRORS)'; then		\
-  am__enable_hard_errors=no; 				\
-else							\
-  am__enable_hard_errors=yes; 				\
-fi; 							\
-case " $(XFAIL_TESTS) " in				\
-  *[\ \	]$$f[\ \	]* | *[\ \	]$$dir$$f[\ \	]*) \
-    am__expect_failure=yes;;				\
-  *)							\
-    am__expect_failure=no;;				\
-esac; 							\
-$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
-# A shell command to get the names of the tests scripts with any registered
-# extension removed (i.e., equivalently, the names of the test logs, with
-# the '.log' extension removed).  The result is saved in the shell variable
-# '$bases'.  This honors runtime overriding of TESTS and TEST_LOGS.  Sadly,
-# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
-# since that might cause problem with VPATH rewrites for suffix-less tests.
-# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
-am__set_TESTS_bases = \
-  bases='$(TEST_LOGS)'; \
-  bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
-  bases=`echo $$bases`
-RECHECK_LOGS = $(TEST_LOGS)
-AM_RECURSIVE_TARGETS = check recheck
-TEST_SUITE_LOG = test-suite.log
-TEST_EXTENSIONS = @EXEEXT@ .test
-LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
-LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS)
-am__set_b = \
-  case '$@' in \
-    */*) \
-      case '$*' in \
-        */*) b='$*';; \
-          *) b=`echo '$@' | sed 's/\.log$$//'`; \
-       esac;; \
-    *) \
-      b='$*';; \
-  esac
-am__test_logs1 = $(TESTS:=.log)
-am__test_logs2 = $(am__test_logs1:@EXEEXT at .log=.log)
-TEST_LOGS = $(am__test_logs2:.test.log=.log)
-TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
-TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
-	$(TEST_LOG_FLAGS)
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \
-	$(top_srcdir)/lib_flags.am $(top_srcdir)/test-driver
+	$(top_srcdir)/lib_flags.am
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
@@ -597,7 +442,7 @@ CLEANFILES = c0.nc c0_64.nc c0_4.nc c0_4c.nc
 all: all-am
 
 .SUFFIXES:
-.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs
+.SUFFIXES: .c .lo .o .obj
 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/lib_flags.am $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
@@ -821,175 +666,98 @@ cscopelist-am: $(am__tagged_files)
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
-# Recover from deleted '.trs' file; this should ensure that
-# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
-# both 'foo.log' and 'foo.trs'.  Break the recipe in two subshells
-# to avoid problems with "make -n".
-.log.trs:
-	rm -f $< $@
-	$(MAKE) $(AM_MAKEFLAGS) $<
-
-# Leading 'am--fnord' is there to ensure the list of targets does not
-# expand to empty, as could happen e.g. with make check TESTS=''.
-am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
-am--force-recheck:
-	@:
-
-$(TEST_SUITE_LOG): $(TEST_LOGS)
-	@$(am__set_TESTS_bases); \
-	am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
-	redo_bases=`for i in $$bases; do \
-	              am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
-	            done`; \
-	if test -n "$$redo_bases"; then \
-	  redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
-	  redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
-	  if $(am__make_dryrun); then :; else \
-	    rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
-	  fi; \
-	fi; \
-	if test -n "$$am__remaking_logs"; then \
-	  echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
-	       "recursion detected" >&2; \
-	elif test -n "$$redo_logs"; then \
-	  am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
-	fi; \
-	if $(am__make_dryrun); then :; else \
-	  st=0;  \
-	  errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
-	  for i in $$redo_bases; do \
-	    test -f $$i.trs && test -r $$i.trs \
-	      || { echo "$$errmsg $$i.trs" >&2; st=1; }; \
-	    test -f $$i.log && test -r $$i.log \
-	      || { echo "$$errmsg $$i.log" >&2; st=1; }; \
+check-TESTS: $(TESTS)
+	@failed=0; all=0; xfail=0; xpass=0; skip=0; \
+	srcdir=$(srcdir); export srcdir; \
+	list=' $(TESTS) '; \
+	$(am__tty_colors); \
+	if test -n "$$list"; then \
+	  for tst in $$list; do \
+	    if test -f ./$$tst; then dir=./; \
+	    elif test -f $$tst; then dir=; \
+	    else dir="$(srcdir)/"; fi; \
+	    if $(TESTS_ENVIRONMENT) $${dir}$$tst $(AM_TESTS_FD_REDIRECT); then \
+	      all=`expr $$all + 1`; \
+	      case " $(XFAIL_TESTS) " in \
+	      *[\ \	]$$tst[\ \	]*) \
+		xpass=`expr $$xpass + 1`; \
+		failed=`expr $$failed + 1`; \
+		col=$$red; res=XPASS; \
+	      ;; \
+	      *) \
+		col=$$grn; res=PASS; \
+	      ;; \
+	      esac; \
+	    elif test $$? -ne 77; then \
+	      all=`expr $$all + 1`; \
+	      case " $(XFAIL_TESTS) " in \
+	      *[\ \	]$$tst[\ \	]*) \
+		xfail=`expr $$xfail + 1`; \
+		col=$$lgn; res=XFAIL; \
+	      ;; \
+	      *) \
+		failed=`expr $$failed + 1`; \
+		col=$$red; res=FAIL; \
+	      ;; \
+	      esac; \
+	    else \
+	      skip=`expr $$skip + 1`; \
+	      col=$$blu; res=SKIP; \
+	    fi; \
+	    echo "$${col}$$res$${std}: $$tst"; \
 	  done; \
-	  test $$st -eq 0 || exit 1; \
-	fi
-	@$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
-	ws='[ 	]'; \
-	results=`for b in $$bases; do echo $$b.trs; done`; \
-	test -n "$$results" || results=/dev/null; \
-	all=`  grep "^$$ws*:test-result:"           $$results | wc -l`; \
-	pass=` grep "^$$ws*:test-result:$$ws*PASS"  $$results | wc -l`; \
-	fail=` grep "^$$ws*:test-result:$$ws*FAIL"  $$results | wc -l`; \
-	skip=` grep "^$$ws*:test-result:$$ws*SKIP"  $$results | wc -l`; \
-	xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
-	xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
-	error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
-	if test `expr $$fail + $$xpass + $$error` -eq 0; then \
-	  success=true; \
-	else \
-	  success=false; \
-	fi; \
-	br='==================='; br=$$br$$br$$br$$br; \
-	result_count () \
-	{ \
-	    if test x"$$1" = x"--maybe-color"; then \
-	      maybe_colorize=yes; \
-	    elif test x"$$1" = x"--no-color"; then \
-	      maybe_colorize=no; \
+	  if test "$$all" -eq 1; then \
+	    tests="test"; \
+	    All=""; \
+	  else \
+	    tests="tests"; \
+	    All="All "; \
+	  fi; \
+	  if test "$$failed" -eq 0; then \
+	    if test "$$xfail" -eq 0; then \
+	      banner="$$All$$all $$tests passed"; \
+	    else \
+	      if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
+	      banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
+	    fi; \
+	  else \
+	    if test "$$xpass" -eq 0; then \
+	      banner="$$failed of $$all $$tests failed"; \
 	    else \
-	      echo "$@: invalid 'result_count' usage" >&2; exit 4; \
+	      if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
+	      banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
 	    fi; \
-	    shift; \
-	    desc=$$1 count=$$2; \
-	    if test $$maybe_colorize = yes && test $$count -gt 0; then \
-	      color_start=$$3 color_end=$$std; \
+	  fi; \
+	  dashes="$$banner"; \
+	  skipped=""; \
+	  if test "$$skip" -ne 0; then \
+	    if test "$$skip" -eq 1; then \
+	      skipped="($$skip test was not run)"; \
 	    else \
-	      color_start= color_end=; \
+	      skipped="($$skip tests were not run)"; \
 	    fi; \
-	    echo "$${color_start}# $$desc $$count$${color_end}"; \
-	}; \
-	create_testsuite_report () \
-	{ \
-	  result_count $$1 "TOTAL:" $$all   "$$brg"; \
-	  result_count $$1 "PASS: " $$pass  "$$grn"; \
-	  result_count $$1 "SKIP: " $$skip  "$$blu"; \
-	  result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
-	  result_count $$1 "FAIL: " $$fail  "$$red"; \
-	  result_count $$1 "XPASS:" $$xpass "$$red"; \
-	  result_count $$1 "ERROR:" $$error "$$mgn"; \
-	}; \
-	{								\
-	  echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" |	\
-	    $(am__rst_title);						\
-	  create_testsuite_report --no-color;				\
-	  echo;								\
-	  echo ".. contents:: :depth: 2";				\
-	  echo;								\
-	  for b in $$bases; do echo $$b; done				\
-	    | $(am__create_global_log);					\
-	} >$(TEST_SUITE_LOG).tmp || exit 1;				\
-	mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG);			\
-	if $$success; then						\
-	  col="$$grn";							\
-	 else								\
-	  col="$$red";							\
-	  test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG);		\
-	fi;								\
-	echo "$${col}$$br$${std}"; 					\
-	echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}";	\
-	echo "$${col}$$br$${std}"; 					\
-	create_testsuite_report --maybe-color;				\
-	echo "$$col$$br$$std";						\
-	if $$success; then :; else					\
-	  echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}";		\
-	  if test -n "$(PACKAGE_BUGREPORT)"; then			\
-	    echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}";	\
-	  fi;								\
-	  echo "$$col$$br$$std";					\
-	fi;								\
-	$$success || exit 1
-
-check-TESTS:
-	@list='$(RECHECK_LOGS)';           test -z "$$list" || rm -f $$list
-	@list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
-	@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
-	@set +e; $(am__set_TESTS_bases); \
-	log_list=`for i in $$bases; do echo $$i.log; done`; \
-	trs_list=`for i in $$bases; do echo $$i.trs; done`; \
-	log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
-	$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
-	exit $$?;
-recheck: all 
-	@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
-	@set +e; $(am__set_TESTS_bases); \
-	bases=`for i in $$bases; do echo $$i; done \
-	         | $(am__list_recheck_tests)` || exit 1; \
-	log_list=`for i in $$bases; do echo $$i.log; done`; \
-	log_list=`echo $$log_list`; \
-	$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
-	        am__force_recheck=am--force-recheck \
-	        TEST_LOGS="$$log_list"; \
-	exit $$?
-run_tests.sh.log: run_tests.sh
-	@p='run_tests.sh'; \
-	b='run_tests.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-run_nc4_tests.sh.log: run_nc4_tests.sh
-	@p='run_nc4_tests.sh'; \
-	b='run_nc4_tests.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-.test.log:
-	@p='$<'; \
-	$(am__set_b); \
-	$(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
- at am__EXEEXT_TRUE@.test$(EXEEXT).log:
- at am__EXEEXT_TRUE@	@p='$<'; \
- at am__EXEEXT_TRUE@	$(am__set_b); \
- at am__EXEEXT_TRUE@	$(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
- at am__EXEEXT_TRUE@	--log-file $$b.log --trs-file $$b.trs \
- at am__EXEEXT_TRUE@	$(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
- at am__EXEEXT_TRUE@	"$$tst" $(AM_TESTS_FD_REDIRECT)
+	    test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
+	      dashes="$$skipped"; \
+	  fi; \
+	  report=""; \
+	  if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
+	    report="Please report to $(PACKAGE_BUGREPORT)"; \
+	    test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
+	      dashes="$$report"; \
+	  fi; \
+	  dashes=`echo "$$dashes" | sed s/./=/g`; \
+	  if test "$$failed" -eq 0; then \
+	    col="$$grn"; \
+	  else \
+	    col="$$red"; \
+	  fi; \
+	  echo "$${col}$$dashes$${std}"; \
+	  echo "$${col}$$banner$${std}"; \
+	  test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \
+	  test -z "$$report" || echo "$${col}$$report$${std}"; \
+	  echo "$${col}$$dashes$${std}"; \
+	  test "$$failed" -eq 0; \
+	else :; fi
 
 distdir: $(DISTFILES)
 	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@@ -1049,9 +817,6 @@ install-strip:
 	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
 	fi
 mostlyclean-generic:
-	-test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
-	-test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
-	-test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
 
 clean-generic:
 	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
@@ -1149,9 +914,8 @@ uninstall-man: uninstall-man1
 	install-strip installcheck installcheck-am installdirs \
 	maintainer-clean maintainer-clean-generic mostlyclean \
 	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
-	pdf pdf-am ps ps-am recheck tags tags-am uninstall \
-	uninstall-am uninstall-binPROGRAMS uninstall-man \
-	uninstall-man1
+	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
+	uninstall-binPROGRAMS uninstall-man uninstall-man1
 
 .PRECIOUS: Makefile
 
diff --git a/nctest/Makefile.am b/nctest/Makefile.am
index 0d4e43d..4a9257c 100644
--- a/nctest/Makefile.am
+++ b/nctest/Makefile.am
@@ -19,7 +19,8 @@ EXTRA_DIST = ref_nctest_classic.nc ref_nctest_64bit_offset.nc	\
 compare_test_files.sh run_valgrind_tests.sh CMakeLists.txt
 
 CLEANFILES = nctest_classic.nc nctest_64bit_offset.nc	\
-nctest_netcdf4.nc test2.nc temp.tmp tst_*.nc
+nctest_netcdf4.nc test2.nc temp.tmp tst_*.nc            \
+nctest_classic.cdl ref_nctest_classic.cdl
 
 # Run nctest and the script that compares the output with the
 # reference file.
diff --git a/nctest/Makefile.in b/nctest/Makefile.in
index c455d08..2bbc4ee 100644
--- a/nctest/Makefile.in
+++ b/nctest/Makefile.in
@@ -223,190 +223,8 @@ am__tty_colors = { \
     std=''; \
   fi; \
 }
-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 = f=`echo $$p | sed -e 's|^.*/||'`;
-am__install_max = 40
-am__nobase_strip_setup = \
-  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
-am__nobase_strip = \
-  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
-am__nobase_list = $(am__nobase_strip_setup); \
-  for p in $$list; do echo "$$p $$p"; done | \
-  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
-  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
-    if (++n[$$2] == $(am__install_max)) \
-      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
-    END { for (dir in files) print dir, files[dir] }'
-am__base_list = \
-  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
-  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-am__uninstall_files_from_dir = { \
-  test -z "$$files" \
-    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
-    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
-         $(am__cd) "$$dir" && rm -f $$files; }; \
-  }
-am__recheck_rx = ^[ 	]*:recheck:[ 	]*
-am__global_test_result_rx = ^[ 	]*:global-test-result:[ 	]*
-am__copy_in_global_log_rx = ^[ 	]*:copy-in-global-log:[ 	]*
-# A command that, given a newline-separated list of test names on the
-# standard input, print the name of the tests that are to be re-run
-# upon "make recheck".
-am__list_recheck_tests = $(AWK) '{ \
-  recheck = 1; \
-  while ((rc = (getline line < ($$0 ".trs"))) != 0) \
-    { \
-      if (rc < 0) \
-        { \
-          if ((getline line2 < ($$0 ".log")) < 0) \
-	    recheck = 0; \
-          break; \
-        } \
-      else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
-        { \
-          recheck = 0; \
-          break; \
-        } \
-      else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
-        { \
-          break; \
-        } \
-    }; \
-  if (recheck) \
-    print $$0; \
-  close ($$0 ".trs"); \
-  close ($$0 ".log"); \
-}'
-# A command that, given a newline-separated list of test names on the
-# standard input, create the global log from their .trs and .log files.
-am__create_global_log = $(AWK) ' \
-function fatal(msg) \
-{ \
-  print "fatal: making $@: " msg | "cat >&2"; \
-  exit 1; \
-} \
-function rst_section(header) \
-{ \
-  print header; \
-  len = length(header); \
-  for (i = 1; i <= len; i = i + 1) \
-    printf "="; \
-  printf "\n\n"; \
-} \
-{ \
-  copy_in_global_log = 1; \
-  global_test_result = "RUN"; \
-  while ((rc = (getline line < ($$0 ".trs"))) != 0) \
-    { \
-      if (rc < 0) \
-         fatal("failed to read from " $$0 ".trs"); \
-      if (line ~ /$(am__global_test_result_rx)/) \
-        { \
-          sub("$(am__global_test_result_rx)", "", line); \
-          sub("[ 	]*$$", "", line); \
-          global_test_result = line; \
-        } \
-      else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
-        copy_in_global_log = 0; \
-    }; \
-  if (copy_in_global_log) \
-    { \
-      rst_section(global_test_result ": " $$0); \
-      while ((rc = (getline line < ($$0 ".log"))) != 0) \
-      { \
-        if (rc < 0) \
-          fatal("failed to read from " $$0 ".log"); \
-        print line; \
-      }; \
-      printf "\n"; \
-    }; \
-  close ($$0 ".trs"); \
-  close ($$0 ".log"); \
-}'
-# Restructured Text title.
-am__rst_title = { sed 's/.*/   &   /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
-# Solaris 10 'make', and several other traditional 'make' implementations,
-# pass "-e" to $(SHELL), and POSIX 2008 even requires this.  Work around it
-# by disabling -e (using the XSI extension "set +e") if it's set.
-am__sh_e_setup = case $$- in *e*) set +e;; esac
-# Default flags passed to test drivers.
-am__common_driver_flags = \
-  --color-tests "$$am__color_tests" \
-  --enable-hard-errors "$$am__enable_hard_errors" \
-  --expect-failure "$$am__expect_failure"
-# To be inserted before the command running the test.  Creates the
-# directory for the log if needed.  Stores in $dir the directory
-# containing $f, in $tst the test, in $log the log.  Executes the
-# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
-# passes TESTS_ENVIRONMENT.  Set up options for the wrapper that
-# will run the test scripts (or their associated LOG_COMPILER, if
-# thy have one).
-am__check_pre = \
-$(am__sh_e_setup);					\
-$(am__vpath_adj_setup) $(am__vpath_adj)			\
-$(am__tty_colors);					\
-srcdir=$(srcdir); export srcdir;			\
-case "$@" in						\
-  */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;;	\
-    *) am__odir=.;; 					\
-esac;							\
-test "x$$am__odir" = x"." || test -d "$$am__odir" 	\
-  || $(MKDIR_P) "$$am__odir" || exit $$?;		\
-if test -f "./$$f"; then dir=./;			\
-elif test -f "$$f"; then dir=;				\
-else dir="$(srcdir)/"; fi;				\
-tst=$$dir$$f; log='$@'; 				\
-if test -n '$(DISABLE_HARD_ERRORS)'; then		\
-  am__enable_hard_errors=no; 				\
-else							\
-  am__enable_hard_errors=yes; 				\
-fi; 							\
-case " $(XFAIL_TESTS) " in				\
-  *[\ \	]$$f[\ \	]* | *[\ \	]$$dir$$f[\ \	]*) \
-    am__expect_failure=yes;;				\
-  *)							\
-    am__expect_failure=no;;				\
-esac; 							\
-$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
-# A shell command to get the names of the tests scripts with any registered
-# extension removed (i.e., equivalently, the names of the test logs, with
-# the '.log' extension removed).  The result is saved in the shell variable
-# '$bases'.  This honors runtime overriding of TESTS and TEST_LOGS.  Sadly,
-# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
-# since that might cause problem with VPATH rewrites for suffix-less tests.
-# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
-am__set_TESTS_bases = \
-  bases='$(TEST_LOGS)'; \
-  bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
-  bases=`echo $$bases`
-RECHECK_LOGS = $(TEST_LOGS)
-AM_RECURSIVE_TARGETS = check recheck
-TEST_SUITE_LOG = test-suite.log
-TEST_EXTENSIONS = @EXEEXT@ .test
-LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
-LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS)
-am__set_b = \
-  case '$@' in \
-    */*) \
-      case '$*' in \
-        */*) b='$*';; \
-          *) b=`echo '$@' | sed 's/\.log$$//'`; \
-       esac;; \
-    *) \
-      b='$*';; \
-  esac
-am__test_logs1 = $(TESTS:=.log)
-am__test_logs2 = $(am__test_logs1:@EXEEXT at .log=.log)
-TEST_LOGS = $(am__test_logs2:.test.log=.log)
-TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
-TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
-	$(TEST_LOG_FLAGS)
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \
-	$(top_srcdir)/lib_flags.am $(top_srcdir)/test-driver README
+	$(top_srcdir)/lib_flags.am README
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
@@ -593,7 +411,8 @@ EXTRA_DIST = ref_nctest_classic.nc ref_nctest_64bit_offset.nc	\
 compare_test_files.sh run_valgrind_tests.sh CMakeLists.txt
 
 CLEANFILES = nctest_classic.nc nctest_64bit_offset.nc	\
-nctest_netcdf4.nc test2.nc temp.tmp tst_*.nc
+nctest_netcdf4.nc test2.nc temp.tmp tst_*.nc            \
+nctest_classic.cdl ref_nctest_classic.cdl
 
 
 # Run nctest and the script that compares the output with the
@@ -609,7 +428,7 @@ vartests.c vputget.c vputgetg.c
 all: all-am
 
 .SUFFIXES:
-.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs
+.SUFFIXES: .c .lo .o .obj
 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/lib_flags.am $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
@@ -767,189 +586,98 @@ cscopelist-am: $(am__tagged_files)
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
-# Recover from deleted '.trs' file; this should ensure that
-# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
-# both 'foo.log' and 'foo.trs'.  Break the recipe in two subshells
-# to avoid problems with "make -n".
-.log.trs:
-	rm -f $< $@
-	$(MAKE) $(AM_MAKEFLAGS) $<
-
-# Leading 'am--fnord' is there to ensure the list of targets does not
-# expand to empty, as could happen e.g. with make check TESTS=''.
-am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
-am--force-recheck:
-	@:
-
-$(TEST_SUITE_LOG): $(TEST_LOGS)
-	@$(am__set_TESTS_bases); \
-	am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
-	redo_bases=`for i in $$bases; do \
-	              am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
-	            done`; \
-	if test -n "$$redo_bases"; then \
-	  redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
-	  redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
-	  if $(am__make_dryrun); then :; else \
-	    rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
-	  fi; \
-	fi; \
-	if test -n "$$am__remaking_logs"; then \
-	  echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
-	       "recursion detected" >&2; \
-	elif test -n "$$redo_logs"; then \
-	  am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
-	fi; \
-	if $(am__make_dryrun); then :; else \
-	  st=0;  \
-	  errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
-	  for i in $$redo_bases; do \
-	    test -f $$i.trs && test -r $$i.trs \
-	      || { echo "$$errmsg $$i.trs" >&2; st=1; }; \
-	    test -f $$i.log && test -r $$i.log \
-	      || { echo "$$errmsg $$i.log" >&2; st=1; }; \
+check-TESTS: $(TESTS)
+	@failed=0; all=0; xfail=0; xpass=0; skip=0; \
+	srcdir=$(srcdir); export srcdir; \
+	list=' $(TESTS) '; \
+	$(am__tty_colors); \
+	if test -n "$$list"; then \
+	  for tst in $$list; do \
+	    if test -f ./$$tst; then dir=./; \
+	    elif test -f $$tst; then dir=; \
+	    else dir="$(srcdir)/"; fi; \
+	    if $(TESTS_ENVIRONMENT) $${dir}$$tst $(AM_TESTS_FD_REDIRECT); then \
+	      all=`expr $$all + 1`; \
+	      case " $(XFAIL_TESTS) " in \
+	      *[\ \	]$$tst[\ \	]*) \
+		xpass=`expr $$xpass + 1`; \
+		failed=`expr $$failed + 1`; \
+		col=$$red; res=XPASS; \
+	      ;; \
+	      *) \
+		col=$$grn; res=PASS; \
+	      ;; \
+	      esac; \
+	    elif test $$? -ne 77; then \
+	      all=`expr $$all + 1`; \
+	      case " $(XFAIL_TESTS) " in \
+	      *[\ \	]$$tst[\ \	]*) \
+		xfail=`expr $$xfail + 1`; \
+		col=$$lgn; res=XFAIL; \
+	      ;; \
+	      *) \
+		failed=`expr $$failed + 1`; \
+		col=$$red; res=FAIL; \
+	      ;; \
+	      esac; \
+	    else \
+	      skip=`expr $$skip + 1`; \
+	      col=$$blu; res=SKIP; \
+	    fi; \
+	    echo "$${col}$$res$${std}: $$tst"; \
 	  done; \
-	  test $$st -eq 0 || exit 1; \
-	fi
-	@$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
-	ws='[ 	]'; \
-	results=`for b in $$bases; do echo $$b.trs; done`; \
-	test -n "$$results" || results=/dev/null; \
-	all=`  grep "^$$ws*:test-result:"           $$results | wc -l`; \
-	pass=` grep "^$$ws*:test-result:$$ws*PASS"  $$results | wc -l`; \
-	fail=` grep "^$$ws*:test-result:$$ws*FAIL"  $$results | wc -l`; \
-	skip=` grep "^$$ws*:test-result:$$ws*SKIP"  $$results | wc -l`; \
-	xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
-	xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
-	error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
-	if test `expr $$fail + $$xpass + $$error` -eq 0; then \
-	  success=true; \
-	else \
-	  success=false; \
-	fi; \
-	br='==================='; br=$$br$$br$$br$$br; \
-	result_count () \
-	{ \
-	    if test x"$$1" = x"--maybe-color"; then \
-	      maybe_colorize=yes; \
-	    elif test x"$$1" = x"--no-color"; then \
-	      maybe_colorize=no; \
+	  if test "$$all" -eq 1; then \
+	    tests="test"; \
+	    All=""; \
+	  else \
+	    tests="tests"; \
+	    All="All "; \
+	  fi; \
+	  if test "$$failed" -eq 0; then \
+	    if test "$$xfail" -eq 0; then \
+	      banner="$$All$$all $$tests passed"; \
 	    else \
-	      echo "$@: invalid 'result_count' usage" >&2; exit 4; \
+	      if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
+	      banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
 	    fi; \
-	    shift; \
-	    desc=$$1 count=$$2; \
-	    if test $$maybe_colorize = yes && test $$count -gt 0; then \
-	      color_start=$$3 color_end=$$std; \
+	  else \
+	    if test "$$xpass" -eq 0; then \
+	      banner="$$failed of $$all $$tests failed"; \
+	    else \
+	      if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
+	      banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
+	    fi; \
+	  fi; \
+	  dashes="$$banner"; \
+	  skipped=""; \
+	  if test "$$skip" -ne 0; then \
+	    if test "$$skip" -eq 1; then \
+	      skipped="($$skip test was not run)"; \
 	    else \
-	      color_start= color_end=; \
+	      skipped="($$skip tests were not run)"; \
 	    fi; \
-	    echo "$${color_start}# $$desc $$count$${color_end}"; \
-	}; \
-	create_testsuite_report () \
-	{ \
-	  result_count $$1 "TOTAL:" $$all   "$$brg"; \
-	  result_count $$1 "PASS: " $$pass  "$$grn"; \
-	  result_count $$1 "SKIP: " $$skip  "$$blu"; \
-	  result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
-	  result_count $$1 "FAIL: " $$fail  "$$red"; \
-	  result_count $$1 "XPASS:" $$xpass "$$red"; \
-	  result_count $$1 "ERROR:" $$error "$$mgn"; \
-	}; \
-	{								\
-	  echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" |	\
-	    $(am__rst_title);						\
-	  create_testsuite_report --no-color;				\
-	  echo;								\
-	  echo ".. contents:: :depth: 2";				\
-	  echo;								\
-	  for b in $$bases; do echo $$b; done				\
-	    | $(am__create_global_log);					\
-	} >$(TEST_SUITE_LOG).tmp || exit 1;				\
-	mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG);			\
-	if $$success; then						\
-	  col="$$grn";							\
-	 else								\
-	  col="$$red";							\
-	  test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG);		\
-	fi;								\
-	echo "$${col}$$br$${std}"; 					\
-	echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}";	\
-	echo "$${col}$$br$${std}"; 					\
-	create_testsuite_report --maybe-color;				\
-	echo "$$col$$br$$std";						\
-	if $$success; then :; else					\
-	  echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}";		\
-	  if test -n "$(PACKAGE_BUGREPORT)"; then			\
-	    echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}";	\
-	  fi;								\
-	  echo "$$col$$br$$std";					\
-	fi;								\
-	$$success || exit 1
-
-check-TESTS:
-	@list='$(RECHECK_LOGS)';           test -z "$$list" || rm -f $$list
-	@list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
-	@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
-	@set +e; $(am__set_TESTS_bases); \
-	log_list=`for i in $$bases; do echo $$i.log; done`; \
-	trs_list=`for i in $$bases; do echo $$i.trs; done`; \
-	log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
-	$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
-	exit $$?;
-recheck: all $(check_PROGRAMS)
-	@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
-	@set +e; $(am__set_TESTS_bases); \
-	bases=`for i in $$bases; do echo $$i; done \
-	         | $(am__list_recheck_tests)` || exit 1; \
-	log_list=`for i in $$bases; do echo $$i.log; done`; \
-	log_list=`echo $$log_list`; \
-	$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
-	        am__force_recheck=am--force-recheck \
-	        TEST_LOGS="$$log_list"; \
-	exit $$?
-nctest.log: nctest$(EXEEXT)
-	@p='nctest$(EXEEXT)'; \
-	b='nctest'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-tst_rename.log: tst_rename$(EXEEXT)
-	@p='tst_rename$(EXEEXT)'; \
-	b='tst_rename'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-compare_test_files.sh.log: compare_test_files.sh
-	@p='compare_test_files.sh'; \
-	b='compare_test_files.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-run_valgrind_tests.sh.log: run_valgrind_tests.sh
-	@p='run_valgrind_tests.sh'; \
-	b='run_valgrind_tests.sh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-.test.log:
-	@p='$<'; \
-	$(am__set_b); \
-	$(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
- at am__EXEEXT_TRUE@.test$(EXEEXT).log:
- at am__EXEEXT_TRUE@	@p='$<'; \
- at am__EXEEXT_TRUE@	$(am__set_b); \
- at am__EXEEXT_TRUE@	$(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
- at am__EXEEXT_TRUE@	--log-file $$b.log --trs-file $$b.trs \
- at am__EXEEXT_TRUE@	$(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
- at am__EXEEXT_TRUE@	"$$tst" $(AM_TESTS_FD_REDIRECT)
+	    test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
+	      dashes="$$skipped"; \
+	  fi; \
+	  report=""; \
+	  if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
+	    report="Please report to $(PACKAGE_BUGREPORT)"; \
+	    test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
+	      dashes="$$report"; \
+	  fi; \
+	  dashes=`echo "$$dashes" | sed s/./=/g`; \
+	  if test "$$failed" -eq 0; then \
+	    col="$$grn"; \
+	  else \
+	    col="$$red"; \
+	  fi; \
+	  echo "$${col}$$dashes$${std}"; \
+	  echo "$${col}$$banner$${std}"; \
+	  test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \
+	  test -z "$$report" || echo "$${col}$$report$${std}"; \
+	  echo "$${col}$$dashes$${std}"; \
+	  test "$$failed" -eq 0; \
+	else :; fi
 
 distdir: $(DISTFILES)
 	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@@ -1007,9 +735,6 @@ install-strip:
 	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
 	fi
 mostlyclean-generic:
-	-test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
-	-test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
-	-test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
 
 clean-generic:
 	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
@@ -1106,7 +831,7 @@ uninstall-am:
 	installcheck-am installdirs maintainer-clean \
 	maintainer-clean-generic mostlyclean mostlyclean-compile \
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-	recheck tags tags-am uninstall uninstall-am
+	tags tags-am uninstall uninstall-am
 
 .PRECIOUS: Makefile
 
diff --git a/test-driver b/test-driver
deleted file mode 100755
index 8e575b0..0000000
--- a/test-driver
+++ /dev/null
@@ -1,148 +0,0 @@
-#! /bin/sh
-# test-driver - basic testsuite driver script.
-
-scriptversion=2013-07-13.22; # UTC
-
-# Copyright (C) 2011-2014 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, see <http://www.gnu.org/licenses/>.
-
-# 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>.
-
-# Make unconditional expansion of undefined variables an error.  This
-# helps a lot in preventing typo-related bugs.
-set -u
-
-usage_error ()
-{
-  echo "$0: $*" >&2
-  print_usage >&2
-  exit 2
-}
-
-print_usage ()
-{
-  cat <<END
-Usage:
-  test-driver --test-name=NAME --log-file=PATH --trs-file=PATH
-              [--expect-failure={yes|no}] [--color-tests={yes|no}]
-              [--enable-hard-errors={yes|no}] [--]
-              TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS]
-The '--test-name', '--log-file' and '--trs-file' options are mandatory.
-END
-}
-
-test_name= # Used for reporting.
-log_file=  # Where to save the output of the test script.
-trs_file=  # Where to save the metadata of the test run.
-expect_failure=no
-color_tests=no
-enable_hard_errors=yes
-while test $# -gt 0; do
-  case $1 in
-  --help) print_usage; exit $?;;
-  --version) echo "test-driver $scriptversion"; exit $?;;
-  --test-name) test_name=$2; shift;;
-  --log-file) log_file=$2; shift;;
-  --trs-file) trs_file=$2; shift;;
-  --color-tests) color_tests=$2; shift;;
-  --expect-failure) expect_failure=$2; shift;;
-  --enable-hard-errors) enable_hard_errors=$2; shift;;
-  --) shift; break;;
-  -*) usage_error "invalid option: '$1'";;
-   *) break;;
-  esac
-  shift
-done
-
-missing_opts=
-test x"$test_name" = x && missing_opts="$missing_opts --test-name"
-test x"$log_file"  = x && missing_opts="$missing_opts --log-file"
-test x"$trs_file"  = x && missing_opts="$missing_opts --trs-file"
-if test x"$missing_opts" != x; then
-  usage_error "the following mandatory options are missing:$missing_opts"
-fi
-
-if test $# -eq 0; then
-  usage_error "missing argument"
-fi
-
-if test $color_tests = yes; then
-  # Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'.
-  red='' # Red.
-  grn='' # Green.
-  lgn='' # Light green.
-  blu='' # Blue.
-  mgn='' # Magenta.
-  std=''     # No color.
-else
-  red= grn= lgn= blu= mgn= std=
-fi
-
-do_exit='rm -f $log_file $trs_file; (exit $st); exit $st'
-trap "st=129; $do_exit" 1
-trap "st=130; $do_exit" 2
-trap "st=141; $do_exit" 13
-trap "st=143; $do_exit" 15
-
-# Test script is run here.
-"$@" >$log_file 2>&1
-estatus=$?
-
-if test $enable_hard_errors = no && test $estatus -eq 99; then
-  tweaked_estatus=1
-else
-  tweaked_estatus=$estatus
-fi
-
-case $tweaked_estatus:$expect_failure in
-  0:yes) col=$red res=XPASS recheck=yes gcopy=yes;;
-  0:*)   col=$grn res=PASS  recheck=no  gcopy=no;;
-  77:*)  col=$blu res=SKIP  recheck=no  gcopy=yes;;
-  99:*)  col=$mgn res=ERROR recheck=yes gcopy=yes;;
-  *:yes) col=$lgn res=XFAIL recheck=no  gcopy=yes;;
-  *:*)   col=$red res=FAIL  recheck=yes gcopy=yes;;
-esac
-
-# Report the test outcome and exit status in the logs, so that one can
-# know whether the test passed or failed simply by looking at the '.log'
-# file, without the need of also peaking into the corresponding '.trs'
-# file (automake bug#11814).
-echo "$res $test_name (exit status: $estatus)" >>$log_file
-
-# Report outcome to console.
-echo "${col}${res}${std}: $test_name"
-
-# Register the test result, and other relevant metadata.
-echo ":test-result: $res" > $trs_file
-echo ":global-test-result: $res" >> $trs_file
-echo ":recheck: $recheck" >> $trs_file
-echo ":copy-in-global-log: $gcopy" >> $trs_file
-
-# 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-time-zone: "UTC"
-# time-stamp-end: "; # UTC"
-# End:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/netcdf.git



More information about the Pkg-grass-devel mailing list