summaryrefslogtreecommitdiff
path: root/hl/tools
diff options
context:
space:
mode:
Diffstat (limited to 'hl/tools')
-rw-r--r--hl/tools/CMakeLists.txt6
-rw-r--r--hl/tools/COPYING13
-rw-r--r--hl/tools/Makefile.am25
-rw-r--r--hl/tools/Makefile.in1430
-rw-r--r--hl/tools/gif2h5/CMakeLists.txt70
-rw-r--r--hl/tools/gif2h5/CMakeTests.cmake56
-rw-r--r--hl/tools/gif2h5/Makefile.am49
-rw-r--r--hl/tools/gif2h5/Makefile.in1504
-rw-r--r--hl/tools/gif2h5/decompress.c313
-rw-r--r--hl/tools/gif2h5/gif.h180
-rw-r--r--hl/tools/gif2h5/gif2hdf.c163
-rw-r--r--hl/tools/gif2h5/gif2mem.c339
-rw-r--r--hl/tools/gif2h5/gifread.c401
-rw-r--r--hl/tools/gif2h5/h52gifgentst.c108
-rw-r--r--hl/tools/gif2h5/h52giftest.sh.in96
-rw-r--r--hl/tools/gif2h5/hdf2gif.c352
-rw-r--r--hl/tools/gif2h5/hdfgifwr.c455
-rw-r--r--hl/tools/gif2h5/testfiles/README6
-rw-r--r--hl/tools/gif2h5/testfiles/ex_image2.h5bin0 -> 224533 bytes
-rw-r--r--hl/tools/gif2h5/testfiles/h52giftst.h5bin0 -> 82816 bytes
-rw-r--r--hl/tools/gif2h5/testfiles/image1.gifbin0 -> 9736 bytes
-rw-r--r--hl/tools/gif2h5/writehdf.c124
-rw-r--r--hl/tools/h5watch/CMakeLists.txt65
-rw-r--r--hl/tools/h5watch/CMakeTests.cmake188
-rw-r--r--hl/tools/h5watch/Makefile.am50
-rw-r--r--hl/tools/h5watch/Makefile.in1529
-rw-r--r--hl/tools/h5watch/extend_dset.c424
-rw-r--r--hl/tools/h5watch/h5watch.c970
-rw-r--r--hl/tools/h5watch/h5watchgentest.c348
-rw-r--r--hl/tools/h5watch/swmr_check_compat_vfd.c57
-rw-r--r--hl/tools/h5watch/testh5watch.sh.in408
-rw-r--r--hl/tools/testfiles/w-err-cmpd1.ddl2
-rw-r--r--hl/tools/testfiles/w-err-cmpd2.ddl2
-rw-r--r--hl/tools/testfiles/w-err-cmpd3.ddl2
-rw-r--r--hl/tools/testfiles/w-err-cmpd4.ddl2
-rw-r--r--hl/tools/testfiles/w-err-cmpd5.ddl2
-rw-r--r--hl/tools/testfiles/w-err-dset-nomax.ddl2
-rw-r--r--hl/tools/testfiles/w-err-dset-none.ddl2
-rw-r--r--hl/tools/testfiles/w-err-dset1.ddl2
-rw-r--r--hl/tools/testfiles/w-err-dset2.ddl2
-rw-r--r--hl/tools/testfiles/w-err-file.ddl1
-rw-r--r--hl/tools/testfiles/w-err-poll.ddl35
-rw-r--r--hl/tools/testfiles/w-err-poll0.ddl35
-rw-r--r--hl/tools/testfiles/w-err-width.ddl35
-rw-r--r--hl/tools/testfiles/w-ext-cmpd-esc-f1.ddl6
-rw-r--r--hl/tools/testfiles/w-ext-cmpd-esc-f3.ddl5
-rw-r--r--hl/tools/testfiles/w-ext-cmpd-esc-ff2.ddl3
-rw-r--r--hl/tools/testfiles/w-ext-cmpd-esc.ddl3
-rw-r--r--hl/tools/testfiles/w-ext-cmpd-f1.ddl3
-rw-r--r--hl/tools/testfiles/w-ext-cmpd-f2.ddl6
-rw-r--r--hl/tools/testfiles/w-ext-cmpd-ff3.ddl2
-rw-r--r--hl/tools/testfiles/w-ext-cmpd-label.ddl10
-rw-r--r--hl/tools/testfiles/w-ext-cmpd-two-f1.ddl15
-rw-r--r--hl/tools/testfiles/w-ext-cmpd-two-f3.ddl4
-rw-r--r--hl/tools/testfiles/w-ext-cmpd-two-ff2.ddl8
-rw-r--r--hl/tools/testfiles/w-ext-cmpd-two.ddl7
-rw-r--r--hl/tools/testfiles/w-ext-cmpd.ddl7
-rw-r--r--hl/tools/testfiles/w-ext-early.ddl3
-rw-r--r--hl/tools/testfiles/w-ext-late.ddl2
-rw-r--r--hl/tools/testfiles/w-ext-one-d.ddl3
-rw-r--r--hl/tools/testfiles/w-ext-one-simple.ddl6
-rw-r--r--hl/tools/testfiles/w-ext-one.ddl5
-rw-r--r--hl/tools/testfiles/w-ext-two-d.ddl4
-rw-r--r--hl/tools/testfiles/w-ext-two-width.ddl9
-rw-r--r--hl/tools/testfiles/w-ext-two.ddl11
-rw-r--r--hl/tools/testfiles/w-help1.ddl35
66 files changed, 10010 insertions, 0 deletions
diff --git a/hl/tools/CMakeLists.txt b/hl/tools/CMakeLists.txt
new file mode 100644
index 0000000..9536517
--- /dev/null
+++ b/hl/tools/CMakeLists.txt
@@ -0,0 +1,6 @@
+cmake_minimum_required (VERSION 3.2.2)
+PROJECT (HDF5_HL_TOOLS C CXX)
+
+add_subdirectory (${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5 ${HDF5_HL_TOOLS_BINARY_DIR}/gif2h5)
+
+add_subdirectory (${HDF5_HL_TOOLS_SOURCE_DIR}/h5watch ${HDF5_HL_TOOLS_BINARY_DIR}/h5watch)
diff --git a/hl/tools/COPYING b/hl/tools/COPYING
new file mode 100644
index 0000000..6497ace
--- /dev/null
+++ b/hl/tools/COPYING
@@ -0,0 +1,13 @@
+
+ Copyright by The HDF Group and
+ The Board of Trustees of the University of Illinois.
+ All rights reserved.
+
+ The files and subdirectories in this directory are part of HDF5.
+ The full HDF5 copyright notice, including terms governing use,
+ modification, and redistribution, is contained in the COPYING file
+ which can be found at the root of the source code distribution tree
+ or in https://support.hdfgroup.org/ftp/HDF5/releases. If you do
+ not have access to either file, you may request a copy from
+ help@hdfgroup.org.
+
diff --git a/hl/tools/Makefile.am b/hl/tools/Makefile.am
new file mode 100644
index 0000000..5d814df
--- /dev/null
+++ b/hl/tools/Makefile.am
@@ -0,0 +1,25 @@
+#
+# Copyright by The HDF Group.
+# Copyright by the Board of Trustees of the University of Illinois.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+##
+## Makefile.am
+## Run automake to generate a Makefile.in from this file.
+##
+#
+# Tools HDF5 Makefile(.in)
+#
+
+include $(top_srcdir)/config/commence.am
+
+# All subdirectories
+SUBDIRS=gif2h5 h5watch
+
+include $(top_srcdir)/config/conclude.am
diff --git a/hl/tools/Makefile.in b/hl/tools/Makefile.in
new file mode 100644
index 0000000..8fbd45b
--- /dev/null
+++ b/hl/tools/Makefile.in
@@ -0,0 +1,1430 @@
+# Makefile.in generated by automake 1.15 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+#
+# Copyright by The HDF Group.
+# Copyright by the Board of Trustees of the University of Illinois.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+#
+# Tools HDF5 Makefile(.in)
+#
+VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+TESTS =
+subdir = hl/tools
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \
+ $(top_srcdir)/m4/aclocal_fc.m4 \
+ $(top_srcdir)/m4/ax_check_class.m4 \
+ $(top_srcdir)/m4/ax_check_classpath.m4 \
+ $(top_srcdir)/m4/ax_check_java_home.m4 \
+ $(top_srcdir)/m4/ax_check_junit.m4 \
+ $(top_srcdir)/m4/ax_java_options.m4 \
+ $(top_srcdir)/m4/ax_jni_include_dir.m4 \
+ $(top_srcdir)/m4/ax_prog_jar.m4 \
+ $(top_srcdir)/m4/ax_prog_java.m4 \
+ $(top_srcdir)/m4/ax_prog_java_works.m4 \
+ $(top_srcdir)/m4/ax_prog_javac.m4 \
+ $(top_srcdir)/m4/ax_prog_javac_works.m4 \
+ $(top_srcdir)/m4/ax_prog_javadoc.m4 \
+ $(top_srcdir)/m4/ax_try_compile_java.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/H5config.h \
+ $(top_builddir)/fortran/src/H5config_f.inc
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+ ctags-recursive dvi-recursive html-recursive info-recursive \
+ install-data-recursive install-dvi-recursive \
+ install-exec-recursive install-html-recursive \
+ install-info-recursive install-pdf-recursive \
+ install-ps-recursive install-recursive installcheck-recursive \
+ installdirs-recursive pdf-recursive ps-recursive \
+ tags-recursive uninstall-recursive
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+am__recursive_targets = \
+ $(RECURSIVE_TARGETS) \
+ $(RECURSIVE_CLEAN_TARGETS) \
+ $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+ check recheck 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
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+am__tty_colors_dummy = \
+ mgn= red= grn= lgn= blu= brg= std=; \
+ am__color_tests=no
+am__tty_colors = { \
+ $(am__tty_colors_dummy); \
+ if test "X$(AM_COLOR_TESTS)" = Xno; then \
+ am__color_tests=no; \
+ elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
+ am__color_tests=yes; \
+ elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
+ am__color_tests=yes; \
+ fi; \
+ if test $$am__color_tests = yes; then \
+ red=''; \
+ grn=''; \
+ lgn=''; \
+ blu=''; \
+ mgn=''; \
+ brg=''; \
+ 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)
+TEST_SUITE_LOG = test-suite.log
+am__test_logs1 = $(TESTS:=.log)
+am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log)
+TEST_LOGS = $(am__test_logs2:.sh.log=.log)
+SH_LOG_DRIVER = $(SHELL) $(top_srcdir)/bin/test-driver
+SH_LOG_COMPILE = $(SH_LOG_COMPILER) $(AM_SH_LOG_FLAGS) $(SH_LOG_FLAGS)
+am__set_b = \
+ case '$@' in \
+ */*) \
+ case '$*' in \
+ */*) b='$*';; \
+ *) b=`echo '$@' | sed 's/\.log$$//'`; \
+ esac;; \
+ *) \
+ b='$*';; \
+ esac
+DIST_SUBDIRS = $(SUBDIRS)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/bin/test-driver \
+ $(top_srcdir)/config/commence.am \
+ $(top_srcdir)/config/conclude.am COPYING
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
+ACLOCAL = @ACLOCAL@
+ADD_PARALLEL_FILES = @ADD_PARALLEL_FILES@
+AMTAR = @AMTAR@
+
+# H5_CFLAGS holds flags that should be used when building hdf5,
+# but which should not be exported to h5cc for building other programs.
+# AM_CFLAGS is an automake construct which should be used by Makefiles
+# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
+# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well.
+AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
+AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
+AM_JAVACFLAGS = @AM_JAVACFLAGS@
+AM_JAVAFLAGS = @AM_JAVAFLAGS@
+AM_JNIFLAGS = @AM_JNIFLAGS@
+AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
+AR = @AR@
+ASSERTS = @ASSERTS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BUILD_MODE = @BUILD_MODE@
+BYTESEX = @BYTESEX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CC_VERSION = @CC_VERSION@
+CFLAGS = @CFLAGS@
+CODESTACK = @CODESTACK@
+CONFIG_DATE = @CONFIG_DATE@
+CONFIG_MODE = @CONFIG_MODE@
+CONFIG_USER = @CONFIG_USER@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CXX_VERSION = @CXX_VERSION@
+CYGPATH_W = @CYGPATH_W@
+DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
+DEV_WARNINGS = @DEV_WARNINGS@
+DIRECT_VFD = @DIRECT_VFD@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+EXTERNAL_FILTERS = @EXTERNAL_FILTERS@
+
+# Make sure that these variables are exported to the Makefiles
+F9XMODEXT = @F9XMODEXT@
+F9XMODFLAG = @F9XMODFLAG@
+F9XSUFFIXFLAG = @F9XSUFFIXFLAG@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FCFLAGS_f90 = @FCFLAGS_f90@
+FCLIBS = @FCLIBS@
+FC_VERSION = @FC_VERSION@
+FGREP = @FGREP@
+FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@
+FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
+FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
+FSEARCH_DIRS = @FSEARCH_DIRS@
+Fortran_COMPILER_ID = @Fortran_COMPILER_ID@
+GREP = @GREP@
+H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@
+H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@
+H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@
+H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@
+H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@
+H5_CFLAGS = @H5_CFLAGS@
+H5_CLASSPATH = @H5_CLASSPATH@
+H5_CPPFLAGS = @H5_CPPFLAGS@
+H5_CXXFLAGS = @H5_CXXFLAGS@
+H5_FCFLAGS = @H5_FCFLAGS@
+H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@
+H5_JAVACFLAGS = @H5_JAVACFLAGS@
+H5_JAVAFLAGS = @H5_JAVAFLAGS@
+H5_JNIFLAGS = @H5_JNIFLAGS@
+H5_LDFLAGS = @H5_LDFLAGS@
+H5_VERSION = @H5_VERSION@
+HADDR_T = @HADDR_T@
+HAVE_DMALLOC = @HAVE_DMALLOC@
+HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@
+HAVE_PTHREAD = @HAVE_PTHREAD@
+HDF5_HL = @HDF5_HL@
+HDF5_INTERFACES = @HDF5_INTERFACES@
+HDF_CXX = @HDF_CXX@
+HDF_FORTRAN = @HDF_FORTRAN@
+HDF_JAVA = @HDF_JAVA@
+HID_T = @HID_T@
+HL = @HL@
+HL_FOR = @HL_FOR@
+HSIZE_T = @HSIZE_T@
+HSSIZE_T = @HSSIZE_T@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+INTERNAL_DEBUG_OUTPUT = @INTERNAL_DEBUG_OUTPUT@
+JAR = @JAR@
+JAVA = @JAVA@
+JAVAC = @JAVAC@
+JAVACFLAGS = @JAVACFLAGS@
+JAVADOC = @JAVADOC@
+JAVAFLAGS = @JAVAFLAGS@
+JAVAPREFIX = @JAVAPREFIX@
+JAVA_JUNIT = @JAVA_JUNIT@
+JAVA_PATH_NAME = @JAVA_PATH_NAME@
+JAVA_VERSION = @JAVA_VERSION@
+JNIFLAGS = @JNIFLAGS@
+JUNIT = @JUNIT@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LL_PATH = @LL_PATH@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_STATIC_EXEC = @LT_STATIC_EXEC@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+METADATATRACEFILE = @METADATATRACEFILE@
+MKDIR_P = @MKDIR_P@
+MPE = @MPE@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
+OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@
+PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@
+PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@
+PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@
+PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@
+PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@
+PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@
+PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@
+PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@
+PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@
+PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@
+PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@
+PAC_FORTRAN_NUM_INTEGER_KINDS = @PAC_FORTRAN_NUM_INTEGER_KINDS@
+PARALLEL = @PARALLEL@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PROFILING = @PROFILING@
+RANLIB = @RANLIB@
+ROOT = @ROOT@
+RUNPARALLEL = @RUNPARALLEL@
+RUNSERIAL = @RUNSERIAL@
+R_INTEGER = @R_INTEGER@
+R_LARGE = @R_LARGE@
+SEARCH = @SEARCH@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SIZE_T = @SIZE_T@
+STATIC_EXEC = @STATIC_EXEC@
+STATIC_SHARED = @STATIC_SHARED@
+STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
+STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
+TESTPARALLEL = @TESTPARALLEL@
+TESTS_JUNIT = @TESTS_JUNIT@
+THREADSAFE = @THREADSAFE@
+TIME = @TIME@
+TR = @TR@
+TRACE_API = @TRACE_API@
+UNAME_INFO = @UNAME_INFO@
+USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@
+USE_FILTER_SZIP = @USE_FILTER_SZIP@
+USINGMEMCHECKER = @USINGMEMCHECKER@
+UUDECODE = @UUDECODE@
+VERSION = @VERSION@
+WORDS_BIGENDIAN = @WORDS_BIGENDIAN@
+_ACJNI_JAVAC = @_ACJNI_JAVAC@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+
+# Install directories that automake doesn't know about
+docdir = $(exec_prefix)/doc
+dvidir = @dvidir@
+enable_shared = @enable_shared@
+enable_static = @enable_static@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+# Shell commands used in Makefiles
+RM = rm -f
+CP = cp
+
+# Some machines need a command to run executables; this is that command
+# so that our tests will run.
+# We use RUNEXEC instead of RUNSERIAL directly because it may be that
+# some tests need to be run with a different command. Older versions
+# of the makefiles used the command
+# $(LIBTOOL) --mode=execute
+# in some directories, for instance.
+RUNEXEC = $(RUNSERIAL)
+
+# Libraries to link to while building
+LIBHDF5 = $(top_builddir)/src/libhdf5.la
+LIBH5TEST = $(top_builddir)/test/libh5test.la
+LIBH5F = $(top_builddir)/fortran/src/libhdf5_fortran.la
+LIBH5FTEST = $(top_builddir)/fortran/test/libh5test_fortran.la
+LIBH5CPP = $(top_builddir)/c++/src/libhdf5_cpp.la
+LIBH5JNI = $(top_builddir)/java/src/jni/libhdf5_java.la
+LIBH5TOOLS = $(top_builddir)/tools/lib/libh5tools.la
+LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
+LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
+LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
+
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
+
+# Scripts used to build examples
+# If only shared libraries have been installed, have h5cc build examples with
+# shared libraries instead of static libraries
+H5CC = ${DESTDIR}$(bindir)/h5cc
+H5CC_PP = ${DESTDIR}$(bindir)/h5pcc
+H5FC = ${DESTDIR}$(bindir)/h5fc
+H5FC_PP = ${DESTDIR}$(bindir)/h5pfc
+H5CPP = ${DESTDIR}$(bindir)/h5c++
+ACLOCAL_AMFLAGS = "-I m4"
+
+# The trace script; this is used on source files from the C library to
+# insert tracing macros.
+TRACE = perl $(top_srcdir)/bin/trace
+
+# .chkexe files are used to mark tests that have run successfully.
+# .chklog files are output from those tests.
+# *.clog and *.clog2 are from the MPE option.
+CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2
+
+# All subdirectories
+SUBDIRS = gif2h5 h5watch
+
+# Automake needs to be taught how to build lib, dyn, progs and tests targets.
+# These will be filled in automatically for the most part (e.g.,
+# lib_LIBRARIES are built for lib target), but EXTRA_LIB, EXTRA_PROG, and
+# EXTRA_TEST variables are supplied to allow the user to force targets to
+# be built at certain times.
+LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \
+ $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB)
+
+DYN = $(dyn_LTLIBRARIES)
+PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \
+ $(EXTRA_PROG)
+
+chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
+dyndir = $(libdir)
+TEST_EXTENSIONS = .sh
+SH_LOG_COMPILER = $(SHELL)
+AM_SH_LOG_FLAGS =
+TEST_PROG_CHKEXE = $(TEST_PROG:=.chkexe_)
+TEST_PROG_PARA_CHKEXE = $(TEST_PROG_PARA:=.chkexe_)
+TEST_SCRIPT_CHKSH = $(TEST_SCRIPT:=.chkexe_)
+TEST_SCRIPT_PARA_CHKSH = $(TEST_SCRIPT_PARA:=.chkexe_)
+all: all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .log .sh .sh$(EXEEXT) .trs
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/commence.am $(top_srcdir)/config/conclude.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hl/tools/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign hl/tools/Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+$(top_srcdir)/config/commence.am $(top_srcdir)/config/conclude.am $(am__empty):
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+# (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+ @fail=; \
+ if $(am__make_keepgoing); then \
+ failcom='fail=yes'; \
+ else \
+ failcom='exit 1'; \
+ fi; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.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; }; \
+ 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; \
+ else \
+ echo "$@: invalid 'result_count' usage" >&2; exit 4; \
+ fi; \
+ shift; \
+ desc=$$1 count=$$2; \
+ if test $$maybe_colorize = yes && test $$count -gt 0; then \
+ color_start=$$3 color_end=$$std; \
+ else \
+ color_start= color_end=; \
+ 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
+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 $$?
+.sh.log:
+ @p='$<'; \
+ $(am__set_b); \
+ $(am__check_pre) $(SH_LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_SH_LOG_DRIVER_FLAGS) $(SH_LOG_DRIVER_FLAGS) -- $(SH_LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+@am__EXEEXT_TRUE@.sh$(EXEEXT).log:
+@am__EXEEXT_TRUE@ @p='$<'; \
+@am__EXEEXT_TRUE@ $(am__set_b); \
+@am__EXEEXT_TRUE@ $(am__check_pre) $(SH_LOG_DRIVER) --test-name "$$f" \
+@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
+@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_SH_LOG_DRIVER_FLAGS) $(SH_LOG_DRIVER_FLAGS) -- $(SH_LOG_COMPILE) \
+@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ $(am__make_dryrun) \
+ || test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: check-recursive
+all-am: Makefile all-local
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "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:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool \
+ mostlyclean-local
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: $(am__recursive_targets) check-am install-am install-strip
+
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am all-local \
+ check check-TESTS check-am clean clean-generic clean-libtool \
+ cscopelist-am ctags ctags-am distclean distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool mostlyclean-local pdf pdf-am ps ps-am \
+ recheck tags tags-am uninstall uninstall-am
+
+.PRECIOUS: Makefile
+
+
+# List all build rules defined by HDF5 Makefiles as "PHONY" targets here.
+# This tells the Makefiles that these targets are not files to be built but
+# commands that should be executed even if a file with the same name already
+# exists.
+.PHONY: build-check-clean build-check-p build-check-s build-lib build-progs \
+ build-tests check-clean check-install check-p check-s check-vfd \
+ install-doc lib progs tests uninstall-doc _exec_check-s _test help
+
+help:
+ @$(top_srcdir)/bin/makehelp
+
+# lib/progs/tests targets recurse into subdirectories. build-* targets
+# build files in this directory.
+build-dyn: $(DYN)
+build-lib: $(LIB)
+build-progs: $(LIB) $(PROGS)
+build-tests: $(LIB) $(PROGS) $(chk_TESTS)
+
+# General rule for recursive building targets.
+# BUILT_SOURCES contain targets that need to be built before anything else
+# in the directory (e.g., for Fortran type detection)
+lib dyn progs tests check-s check-p :: $(BUILT_SOURCES)
+ @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1;
+ @for d in X $(SUBDIRS); do \
+ if test $$d != X && test $$d != .; then \
+ (set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
+ fi; \
+ done
+
+# General rule for recursive cleaning targets. Like the rule above,
+# but doesn't require building BUILT_SOURCES.
+check-clean ::
+ @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1;
+ @for d in X $(SUBDIRS); do \
+ if test $$d != X && test $$d != .; then \
+ (set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
+ fi; \
+ done
+
+# Tell Automake to build tests when the user types `make all' (this is
+# not its default behavior). Also build EXTRA_LIB and EXTRA_PROG since
+# Automake won't build them automatically, either.
+all-local: $(EXTRA_LIB) $(EXTRA_PROG) $(chk_TESTS)
+
+# make install-doc doesn't do anything outside of doc directory, but
+# Makefiles should recognize it.
+# UPDATE: docs no longer reside in this build tree, so this target
+# is depreciated.
+install-doc uninstall-doc:
+ @echo "Nothing to be done."
+
+# clean up files generated by tests so they can be re-run.
+build-check-clean:
+ $(RM) -rf $(CHECK_CLEANFILES)
+
+# run check-clean whenever mostlyclean is run
+mostlyclean-local: build-check-clean
+
+# check-install is just a synonym for installcheck
+check-install: installcheck
+
+# Run each test in order, passing $(TEST_FLAGS) to the program.
+# Since tests are done in a shell loop, "make -i" does apply inside it.
+# Set HDF5_Make_Ignore to a non-blank string to ignore errors inside the loop.
+# The timestamps give a rough idea how much time the tests use.
+#
+# Note that targets in chk_TESTS (defined above) will be built when the user
+# types 'make tests' or 'make check', but only programs in TEST_PROG,
+# TEST_PROG_PARA, or TEST_SCRIPT will actually be executed.
+check-TESTS: test
+
+test _test:
+ @$(MAKE) build-check-s
+ @$(MAKE) build-check-p
+
+# Actual execution of check-s.
+build-check-s: $(LIB) $(PROGS) $(chk_TESTS)
+ @if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \
+ echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \
+ fi
+ @$(MAKE) $(AM_MAKEFLAGS) _exec_check-s
+ @if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \
+ echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` ended `date`===";\
+ fi
+
+_exec_check-s: $(TEST_PROG_CHKEXE) $(TEST_SCRIPT_CHKSH)
+
+# The dummy.chkexe here prevents the target from being
+# empty if there are no tests in the current directory.
+# $${log} is the log file.
+# $${tname} is the name of test.
+$(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_:
+ @if test "X$@" != "X.chkexe_" && test "X$@" != "Xdummy.chkexe_"; then \
+ tname=$(@:.chkexe_=)$(EXEEXT);\
+ log=$(@:.chkexe_=.chklog); \
+ echo "============================"; \
+ if $(top_srcdir)/bin/newer $(@:.chkexe_=.chkexe) $${tname}; then \
+ echo "No need to test $${tname} again."; \
+ else \
+ echo "============================" > $${log}; \
+ if test "X$(FORTRAN_API)" = "Xyes"; then \
+ echo "Fortran API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ elif test "X$(CXX_API)" = "Xyes"; then \
+ echo "C++ API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log};\
+ else \
+ echo "Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ fi; \
+ echo "============================" >> $${log}; \
+ srcdir="$(srcdir)" \
+ $(TIME) $(RUNEXEC) ./$${tname} $(TEST_FLAGS) >> $${log} 2>&1 \
+ && touch $(@:.chkexe_=.chkexe) || \
+ (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
+ (cat $${log} && false) || exit 1; \
+ echo "" >> $${log}; \
+ echo "Finished testing $${tname} $(TEST_FLAGS)" >> $${log}; \
+ echo "============================" >> $${log}; \
+ echo "Finished testing $${tname} $(TEST_FLAGS)"; \
+ cat $${log}; \
+ fi; \
+ fi
+
+# The dummysh.chkexe here prevents the target from being
+# empty if there are no tests in the current directory.
+# $${log} is the log file.
+# $${tname} is the name of test.
+$(TEST_SCRIPT_CHKSH) $(TEST_SCRIPT_PARA_CHKSH) dummysh.chkexe_:
+ @if test "X$@" != "X.chkexe_" && test "X$@" != "Xdummysh.chkexe_"; then \
+ cmd=$(@:.chkexe_=);\
+ tname=`basename $$cmd`;\
+ chkname=`basename $(@:.chkexe_=.chkexe)`;\
+ log=`basename $(@:.chkexe_=.chklog)`; \
+ echo "============================"; \
+ if $(top_srcdir)/bin/newer $${chkname} $$cmd $(SCRIPT_DEPEND); then \
+ echo "No need to test $${tname} again."; \
+ else \
+ echo "============================" > $${log}; \
+ if test "X$(FORTRAN_API)" = "Xyes"; then \
+ echo "Fortran API: Testing $${tname} $(TEST_FLAGS)"; \
+ echo "Fortran API: $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ elif test "X$(CXX_API)" = "Xyes"; then \
+ echo "C++ API: Testing $${tname} $(TEST_FLAGS)"; \
+ echo "C++ API: $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ else \
+ echo "Testing $${tname} $(TEST_FLAGS)"; \
+ echo "$${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ fi; \
+ echo "============================" >> $${log}; \
+ RUNSERIAL="$(RUNSERIAL)" RUNPARALLEL="$(RUNPARALLEL)" \
+ srcdir="$(srcdir)" \
+ $(TIME) $(SHELL) $$cmd $(TEST_FLAGS) >> $${log} 2>&1 \
+ && touch $${chkname} || \
+ (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
+ (cat $${log} && false) || exit 1; \
+ echo "" >> $${log}; \
+ echo "Finished testing $${tname} $(TEST_FLAGS)" >> $${log}; \
+ echo "============================" >> $${log}; \
+ echo "Finished testing $${tname} $(TEST_FLAGS)"; \
+ cat $${log}; \
+ fi; \
+ echo "============================"; \
+ fi
+
+# Actual execution of check-p.
+build-check-p: $(LIB) $(PROGS) $(chk_TESTS)
+ @if test -n "$(TEST_PROG_PARA)$(TEST_SCRIPT_PARA)"; then \
+ echo "===Parallel tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \
+ fi
+ @if test -n "$(TEST_PROG_PARA)"; then \
+ echo "**** Hint ****"; \
+ echo "Parallel test files reside in the current directory" \
+ "by default."; \
+ echo "Set HDF5_PARAPREFIX to use another directory. E.g.,"; \
+ echo " HDF5_PARAPREFIX=/PFS/user/me"; \
+ echo " export HDF5_PARAPREFIX"; \
+ echo " make check"; \
+ echo "**** end of Hint ****"; \
+ fi
+ @for test in $(TEST_PROG_PARA) dummy; do \
+ if test $$test != dummy; then \
+ $(MAKE) $(AM_MAKEFLAGS) $$test.chkexe_ \
+ RUNEXEC="$(RUNPARALLEL)" || exit 1; \
+ fi; \
+ done
+ @for test in $(TEST_SCRIPT_PARA) dummy; do \
+ if test $$test != dummy; then \
+ $(MAKE) $(AM_MAKEFLAGS) $$test.chkexe_ || exit 1; \
+ fi; \
+ done
+ @if test -n "$(TEST_PROG_PARA)$(TEST_SCRIPT_PARA)"; then \
+ echo "===Parallel tests in `echo ${PWD} | sed -e s:.*/::` ended `date`===";\
+ fi
+
+# Run test with different Virtual File Driver
+check-vfd: $(LIB) $(PROGS) $(chk_TESTS)
+ @for vfd in $(VFD_LIST) dummy; do \
+ if test $$vfd != dummy; then \
+ echo "============================"; \
+ echo "Testing Virtual File Driver $$vfd"; \
+ echo "============================"; \
+ $(MAKE) $(AM_MAKEFLAGS) check-clean || exit 1; \
+ HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \
+ fi; \
+ done
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/hl/tools/gif2h5/CMakeLists.txt b/hl/tools/gif2h5/CMakeLists.txt
new file mode 100644
index 0000000..9d7a406
--- /dev/null
+++ b/hl/tools/gif2h5/CMakeLists.txt
@@ -0,0 +1,70 @@
+cmake_minimum_required (VERSION 3.2.2)
+PROJECT (HDF5_HL_TOOLS_GIF2H5)
+
+#-----------------------------------------------------------------------------
+# Define Sources
+#-----------------------------------------------------------------------------
+set (GIF2H5_SOURCES
+ ${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/gif.h
+ ${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/decompress.c
+ ${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/gif2hdf.c
+ ${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/gif2mem.c
+ ${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/gifread.c
+ ${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/writehdf.c
+)
+
+#-- Add gif2hdf5 program
+INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib)
+INCLUDE_DIRECTORIES (${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR})
+
+add_executable (gif2h5 ${GIF2H5_SOURCES})
+TARGET_NAMING (gif2h5 STATIC)
+TARGET_C_PROPERTIES (gif2h5 STATIC " " " ")
+target_link_libraries (gif2h5 ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
+set_target_properties (gif2h5 PROPERTIES FOLDER tools/hl)
+set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};gif2h5")
+
+#-- Add h52gif program
+set (hdf2gif_SOURCES
+ ${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/hdf2gif.c
+ ${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/hdfgifwr.c
+)
+add_executable (h52gif ${hdf2gif_SOURCES})
+TARGET_NAMING (h52gif STATIC)
+TARGET_C_PROPERTIES (h52gif STATIC " " " ")
+target_link_libraries (h52gif ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
+set_target_properties (h52gif PROPERTIES FOLDER tools/hl)
+set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h52gif")
+
+if (BUILD_TESTING)
+ # --------------------------------------------------------------------
+ # This executable can generate the actual test files - Currently not
+ # used in the CMake Build system as we rely on the test files that are
+ # shipped with HDF5 source archives
+ # --------------------------------------------------------------------
+ if (HDF5_BUILD_GENERATORS)
+ add_executable (hl_h52gifgentest ${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/h52gifgentst.c)
+ TARGET_NAMING (hl_h52gifgentest STATIC)
+ TARGET_C_PROPERTIES (hl_h52gifgentest STATIC " " " ")
+ target_link_libraries (hl_h52gifgentest ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET})
+ set_target_properties (hl_h52gifgentest PROPERTIES FOLDER generator/tools/hl)
+
+# add_test (NAME hl_h52gifgentest COMMAND $<TARGET_FILE:hl_h52gifgentest>)
+ endif ()
+
+ include (CMakeTests.cmake)
+endif ()
+
+#-----------------------------------------------------------------------------
+# Add file(s) to CMake Install
+#-----------------------------------------------------------------------------
+if (HDF5_EXPORTED_TARGETS)
+ install (
+ TARGETS
+ gif2h5
+ h52gif
+ EXPORT
+ ${HDF5_EXPORTED_TARGETS}
+ RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT hltoolsapplications
+ )
+endif ()
diff --git a/hl/tools/gif2h5/CMakeTests.cmake b/hl/tools/gif2h5/CMakeTests.cmake
new file mode 100644
index 0000000..61c004e
--- /dev/null
+++ b/hl/tools/gif2h5/CMakeTests.cmake
@@ -0,0 +1,56 @@
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+#
+
+##############################################################################
+##############################################################################
+### T E S T I N G ###
+##############################################################################
+##############################################################################
+
+# Make testfiles dir under build dir
+file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+
+#
+# copy test files from source to build dir
+#
+HDFTEST_COPY_FILE("${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/testfiles/image1.gif" "${PROJECT_BINARY_DIR}/testfiles/image1.gif" "gif2h5_files")
+HDFTEST_COPY_FILE("${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/testfiles/h52giftst.h5" "${PROJECT_BINARY_DIR}/testfiles/h52giftst.h5" "gif2h5_files")
+HDFTEST_COPY_FILE("${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/testfiles/ex_image2.h5" "${PROJECT_BINARY_DIR}/testfiles/ex_image2.h5" "gif2h5_files")
+add_custom_target(gif2h5_files ALL COMMENT "Copying files needed by gif2h5 tests" DEPENDS ${gif2h5_files_list})
+
+# Remove any output file left over from previous test run
+add_test (
+ NAME HL_TOOLS-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ image1.gif
+ image1.h5
+ image.gif
+ image24.gif
+)
+
+add_test (NAME HL_TOOLS_gif2h5 COMMAND $<TARGET_FILE:gif2h5> testfiles/image1.gif image1.h5)
+set_tests_properties (HL_TOOLS_gif2h5 PROPERTIES DEPENDS HL_TOOLS-clear-objects)
+
+add_test (NAME HL_TOOLS_h52gif COMMAND $<TARGET_FILE:h52gif> testfiles/h52giftst.h5 image1.gif -i image)
+set_tests_properties (HL_TOOLS_h52gif PROPERTIES DEPENDS HL_TOOLS-clear-objects)
+
+add_test (NAME HL_TOOLS_h52gif_none COMMAND $<TARGET_FILE:h52gif> testfiles/h52giftst.h5 image.gif -i nosuch_image)
+set_tests_properties (HL_TOOLS_h52gif_none PROPERTIES WILL_FAIL "true")
+set_tests_properties (HL_TOOLS_h52gif_none PROPERTIES DEPENDS HL_TOOLS-clear-objects)
+
+#add_test (NAME HL_TOOLS_h52gifpal COMMAND $<TARGET_FILE:h52gif> testfiles/h52giftst.h5 image.gif -i palette)
+#set_tests_properties (HL_TOOLS_h52gifpal PROPERTIES WILL_FAIL "true")
+
+add_test (NAME HL_TOOLS_h52gif24bits COMMAND $<TARGET_FILE:h52gif> testfiles/ex_image2.h5 image24.gif -i image24bitpixel)
+set_tests_properties (HL_TOOLS_h52gif24bits PROPERTIES WILL_FAIL "true")
+set_tests_properties (HL_TOOLS_h52gif24bits PROPERTIES DEPENDS HL_TOOLS-clear-objects)
diff --git a/hl/tools/gif2h5/Makefile.am b/hl/tools/gif2h5/Makefile.am
new file mode 100644
index 0000000..d30d66a
--- /dev/null
+++ b/hl/tools/gif2h5/Makefile.am
@@ -0,0 +1,49 @@
+#
+# Copyright by The HDF Group.
+# Copyright by the Board of Trustees of the University of Illinois.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+##
+## Makefile.am
+## Run automake to generate a Makefile.in from this file.
+#
+# HDF5 Library Makefile(.in)
+#
+
+include $(top_srcdir)/config/commence.am
+
+# Include src and tools/lib directories
+AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib -I$(top_srcdir)/hl/src
+
+# These are our main targets, the tools
+
+TEST_SCRIPT=h52giftest.sh
+check_SCRIPTS=$(TEST_SCRIPT)
+
+bin_PROGRAMS=gif2h5 h52gif
+noinst_PROGRAMS=h52gifgentst
+
+# Add h52gif and gif2h5 specific linker flags here
+h52gif_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS)
+gif2h5_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS)
+
+gif2h5_SOURCES=gif2hdf.c gif2mem.c decompress.c gifread.c writehdf.c
+
+h52gif_SOURCES=hdf2gif.c hdfgifwr.c
+
+h52gifgentst_SOURCES=h52gifgentst.c
+
+# Programs all depend on the hdf5 library, the tools library, and the HL
+# library.
+LDADD=$(LIBH5_HL) $(LIBH5TOOLS) $(LIBHDF5)
+
+CHECK_CLEANFILES+=*.h5
+CHECK_CLEANFILES+=*.gif
+
+include $(top_srcdir)/config/conclude.am
diff --git a/hl/tools/gif2h5/Makefile.in b/hl/tools/gif2h5/Makefile.in
new file mode 100644
index 0000000..b950a06
--- /dev/null
+++ b/hl/tools/gif2h5/Makefile.in
@@ -0,0 +1,1504 @@
+# Makefile.in generated by automake 1.15 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+#
+# Copyright by The HDF Group.
+# Copyright by the Board of Trustees of the University of Illinois.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+#
+# HDF5 Library Makefile(.in)
+#
+
+VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+bin_PROGRAMS = gif2h5$(EXEEXT) h52gif$(EXEEXT)
+noinst_PROGRAMS = h52gifgentst$(EXEEXT)
+TESTS = $(TEST_SCRIPT)
+subdir = hl/tools/gif2h5
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \
+ $(top_srcdir)/m4/aclocal_fc.m4 \
+ $(top_srcdir)/m4/ax_check_class.m4 \
+ $(top_srcdir)/m4/ax_check_classpath.m4 \
+ $(top_srcdir)/m4/ax_check_java_home.m4 \
+ $(top_srcdir)/m4/ax_check_junit.m4 \
+ $(top_srcdir)/m4/ax_java_options.m4 \
+ $(top_srcdir)/m4/ax_jni_include_dir.m4 \
+ $(top_srcdir)/m4/ax_prog_jar.m4 \
+ $(top_srcdir)/m4/ax_prog_java.m4 \
+ $(top_srcdir)/m4/ax_prog_java_works.m4 \
+ $(top_srcdir)/m4/ax_prog_javac.m4 \
+ $(top_srcdir)/m4/ax_prog_javac_works.m4 \
+ $(top_srcdir)/m4/ax_prog_javadoc.m4 \
+ $(top_srcdir)/m4/ax_try_compile_java.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/H5config.h \
+ $(top_builddir)/fortran/src/H5config_f.inc
+CONFIG_CLEAN_FILES = h52giftest.sh
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS)
+am_gif2h5_OBJECTS = gif2hdf.$(OBJEXT) gif2mem.$(OBJEXT) \
+ decompress.$(OBJEXT) gifread.$(OBJEXT) writehdf.$(OBJEXT)
+gif2h5_OBJECTS = $(am_gif2h5_OBJECTS)
+gif2h5_LDADD = $(LDADD)
+gif2h5_DEPENDENCIES = $(LIBH5_HL) $(LIBH5TOOLS) $(LIBHDF5)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 =
+gif2h5_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(gif2h5_LDFLAGS) $(LDFLAGS) -o $@
+am_h52gif_OBJECTS = hdf2gif.$(OBJEXT) hdfgifwr.$(OBJEXT)
+h52gif_OBJECTS = $(am_h52gif_OBJECTS)
+h52gif_LDADD = $(LDADD)
+h52gif_DEPENDENCIES = $(LIBH5_HL) $(LIBH5TOOLS) $(LIBHDF5)
+h52gif_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(h52gif_LDFLAGS) $(LDFLAGS) -o $@
+am_h52gifgentst_OBJECTS = h52gifgentst.$(OBJEXT)
+h52gifgentst_OBJECTS = $(am_h52gifgentst_OBJECTS)
+h52gifgentst_LDADD = $(LDADD)
+h52gifgentst_DEPENDENCIES = $(LIBH5_HL) $(LIBH5TOOLS) $(LIBHDF5)
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src
+depcomp = $(SHELL) $(top_srcdir)/bin/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo " CC " $@;
+am__v_CC_1 =
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo " CCLD " $@;
+am__v_CCLD_1 =
+SOURCES = $(gif2h5_SOURCES) $(h52gif_SOURCES) $(h52gifgentst_SOURCES)
+DIST_SOURCES = $(gif2h5_SOURCES) $(h52gif_SOURCES) \
+ $(h52gifgentst_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+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
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+am__tty_colors_dummy = \
+ mgn= red= grn= lgn= blu= brg= std=; \
+ am__color_tests=no
+am__tty_colors = { \
+ $(am__tty_colors_dummy); \
+ if test "X$(AM_COLOR_TESTS)" = Xno; then \
+ am__color_tests=no; \
+ elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
+ am__color_tests=yes; \
+ elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
+ am__color_tests=yes; \
+ fi; \
+ if test $$am__color_tests = yes; then \
+ red=''; \
+ grn=''; \
+ lgn=''; \
+ blu=''; \
+ mgn=''; \
+ brg=''; \
+ 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
+am__test_logs1 = $(TESTS:=.log)
+am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log)
+TEST_LOGS = $(am__test_logs2:.sh.log=.log)
+SH_LOG_DRIVER = $(SHELL) $(top_srcdir)/bin/test-driver
+SH_LOG_COMPILE = $(SH_LOG_COMPILER) $(AM_SH_LOG_FLAGS) $(SH_LOG_FLAGS)
+am__set_b = \
+ case '$@' in \
+ */*) \
+ case '$*' in \
+ */*) b='$*';; \
+ *) b=`echo '$@' | sed 's/\.log$$//'`; \
+ esac;; \
+ *) \
+ b='$*';; \
+ esac
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/h52giftest.sh.in \
+ $(top_srcdir)/bin/depcomp $(top_srcdir)/bin/test-driver \
+ $(top_srcdir)/config/commence.am \
+ $(top_srcdir)/config/conclude.am
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ADD_PARALLEL_FILES = @ADD_PARALLEL_FILES@
+AMTAR = @AMTAR@
+
+# H5_CFLAGS holds flags that should be used when building hdf5,
+# but which should not be exported to h5cc for building other programs.
+# AM_CFLAGS is an automake construct which should be used by Makefiles
+# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
+# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well.
+AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
+
+# Include src and tools/lib directories
+AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@ -I$(top_srcdir)/src \
+ -I$(top_srcdir)/tools/lib -I$(top_srcdir)/hl/src
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
+AM_JAVACFLAGS = @AM_JAVACFLAGS@
+AM_JAVAFLAGS = @AM_JAVAFLAGS@
+AM_JNIFLAGS = @AM_JNIFLAGS@
+AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
+AR = @AR@
+ASSERTS = @ASSERTS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BUILD_MODE = @BUILD_MODE@
+BYTESEX = @BYTESEX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CC_VERSION = @CC_VERSION@
+CFLAGS = @CFLAGS@
+CODESTACK = @CODESTACK@
+CONFIG_DATE = @CONFIG_DATE@
+CONFIG_MODE = @CONFIG_MODE@
+CONFIG_USER = @CONFIG_USER@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CXX_VERSION = @CXX_VERSION@
+CYGPATH_W = @CYGPATH_W@
+DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
+DEV_WARNINGS = @DEV_WARNINGS@
+DIRECT_VFD = @DIRECT_VFD@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+EXTERNAL_FILTERS = @EXTERNAL_FILTERS@
+
+# Make sure that these variables are exported to the Makefiles
+F9XMODEXT = @F9XMODEXT@
+F9XMODFLAG = @F9XMODFLAG@
+F9XSUFFIXFLAG = @F9XSUFFIXFLAG@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FCFLAGS_f90 = @FCFLAGS_f90@
+FCLIBS = @FCLIBS@
+FC_VERSION = @FC_VERSION@
+FGREP = @FGREP@
+FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@
+FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
+FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
+FSEARCH_DIRS = @FSEARCH_DIRS@
+Fortran_COMPILER_ID = @Fortran_COMPILER_ID@
+GREP = @GREP@
+H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@
+H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@
+H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@
+H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@
+H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@
+H5_CFLAGS = @H5_CFLAGS@
+H5_CLASSPATH = @H5_CLASSPATH@
+H5_CPPFLAGS = @H5_CPPFLAGS@
+H5_CXXFLAGS = @H5_CXXFLAGS@
+H5_FCFLAGS = @H5_FCFLAGS@
+H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@
+H5_JAVACFLAGS = @H5_JAVACFLAGS@
+H5_JAVAFLAGS = @H5_JAVAFLAGS@
+H5_JNIFLAGS = @H5_JNIFLAGS@
+H5_LDFLAGS = @H5_LDFLAGS@
+H5_VERSION = @H5_VERSION@
+HADDR_T = @HADDR_T@
+HAVE_DMALLOC = @HAVE_DMALLOC@
+HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@
+HAVE_PTHREAD = @HAVE_PTHREAD@
+HDF5_HL = @HDF5_HL@
+HDF5_INTERFACES = @HDF5_INTERFACES@
+HDF_CXX = @HDF_CXX@
+HDF_FORTRAN = @HDF_FORTRAN@
+HDF_JAVA = @HDF_JAVA@
+HID_T = @HID_T@
+HL = @HL@
+HL_FOR = @HL_FOR@
+HSIZE_T = @HSIZE_T@
+HSSIZE_T = @HSSIZE_T@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+INTERNAL_DEBUG_OUTPUT = @INTERNAL_DEBUG_OUTPUT@
+JAR = @JAR@
+JAVA = @JAVA@
+JAVAC = @JAVAC@
+JAVACFLAGS = @JAVACFLAGS@
+JAVADOC = @JAVADOC@
+JAVAFLAGS = @JAVAFLAGS@
+JAVAPREFIX = @JAVAPREFIX@
+JAVA_JUNIT = @JAVA_JUNIT@
+JAVA_PATH_NAME = @JAVA_PATH_NAME@
+JAVA_VERSION = @JAVA_VERSION@
+JNIFLAGS = @JNIFLAGS@
+JUNIT = @JUNIT@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LL_PATH = @LL_PATH@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_STATIC_EXEC = @LT_STATIC_EXEC@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+METADATATRACEFILE = @METADATATRACEFILE@
+MKDIR_P = @MKDIR_P@
+MPE = @MPE@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
+OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@
+PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@
+PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@
+PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@
+PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@
+PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@
+PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@
+PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@
+PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@
+PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@
+PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@
+PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@
+PAC_FORTRAN_NUM_INTEGER_KINDS = @PAC_FORTRAN_NUM_INTEGER_KINDS@
+PARALLEL = @PARALLEL@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PROFILING = @PROFILING@
+RANLIB = @RANLIB@
+ROOT = @ROOT@
+RUNPARALLEL = @RUNPARALLEL@
+RUNSERIAL = @RUNSERIAL@
+R_INTEGER = @R_INTEGER@
+R_LARGE = @R_LARGE@
+SEARCH = @SEARCH@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SIZE_T = @SIZE_T@
+STATIC_EXEC = @STATIC_EXEC@
+STATIC_SHARED = @STATIC_SHARED@
+STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
+STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
+TESTPARALLEL = @TESTPARALLEL@
+TESTS_JUNIT = @TESTS_JUNIT@
+THREADSAFE = @THREADSAFE@
+TIME = @TIME@
+TR = @TR@
+TRACE_API = @TRACE_API@
+UNAME_INFO = @UNAME_INFO@
+USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@
+USE_FILTER_SZIP = @USE_FILTER_SZIP@
+USINGMEMCHECKER = @USINGMEMCHECKER@
+UUDECODE = @UUDECODE@
+VERSION = @VERSION@
+WORDS_BIGENDIAN = @WORDS_BIGENDIAN@
+_ACJNI_JAVAC = @_ACJNI_JAVAC@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+
+# Install directories that automake doesn't know about
+docdir = $(exec_prefix)/doc
+dvidir = @dvidir@
+enable_shared = @enable_shared@
+enable_static = @enable_static@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+# Shell commands used in Makefiles
+RM = rm -f
+CP = cp
+
+# Some machines need a command to run executables; this is that command
+# so that our tests will run.
+# We use RUNEXEC instead of RUNSERIAL directly because it may be that
+# some tests need to be run with a different command. Older versions
+# of the makefiles used the command
+# $(LIBTOOL) --mode=execute
+# in some directories, for instance.
+RUNEXEC = $(RUNSERIAL)
+
+# Libraries to link to while building
+LIBHDF5 = $(top_builddir)/src/libhdf5.la
+LIBH5TEST = $(top_builddir)/test/libh5test.la
+LIBH5F = $(top_builddir)/fortran/src/libhdf5_fortran.la
+LIBH5FTEST = $(top_builddir)/fortran/test/libh5test_fortran.la
+LIBH5CPP = $(top_builddir)/c++/src/libhdf5_cpp.la
+LIBH5JNI = $(top_builddir)/java/src/jni/libhdf5_java.la
+LIBH5TOOLS = $(top_builddir)/tools/lib/libh5tools.la
+LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
+LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
+LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
+
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
+
+# Scripts used to build examples
+# If only shared libraries have been installed, have h5cc build examples with
+# shared libraries instead of static libraries
+H5CC = ${DESTDIR}$(bindir)/h5cc
+H5CC_PP = ${DESTDIR}$(bindir)/h5pcc
+H5FC = ${DESTDIR}$(bindir)/h5fc
+H5FC_PP = ${DESTDIR}$(bindir)/h5pfc
+H5CPP = ${DESTDIR}$(bindir)/h5c++
+ACLOCAL_AMFLAGS = "-I m4"
+
+# The trace script; this is used on source files from the C library to
+# insert tracing macros.
+TRACE = perl $(top_srcdir)/bin/trace
+
+# .chkexe files are used to mark tests that have run successfully.
+# .chklog files are output from those tests.
+# *.clog and *.clog2 are from the MPE option.
+CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 *.h5 *.gif
+
+# These are our main targets, the tools
+TEST_SCRIPT = h52giftest.sh
+check_SCRIPTS = $(TEST_SCRIPT)
+
+# Add h52gif and gif2h5 specific linker flags here
+h52gif_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS)
+gif2h5_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS)
+gif2h5_SOURCES = gif2hdf.c gif2mem.c decompress.c gifread.c writehdf.c
+h52gif_SOURCES = hdf2gif.c hdfgifwr.c
+h52gifgentst_SOURCES = h52gifgentst.c
+
+# Programs all depend on the hdf5 library, the tools library, and the HL
+# library.
+LDADD = $(LIBH5_HL) $(LIBH5TOOLS) $(LIBHDF5)
+
+# Automake needs to be taught how to build lib, dyn, progs and tests targets.
+# These will be filled in automatically for the most part (e.g.,
+# lib_LIBRARIES are built for lib target), but EXTRA_LIB, EXTRA_PROG, and
+# EXTRA_TEST variables are supplied to allow the user to force targets to
+# be built at certain times.
+LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \
+ $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB)
+
+DYN = $(dyn_LTLIBRARIES)
+PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \
+ $(EXTRA_PROG)
+
+chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
+dyndir = $(libdir)
+TEST_EXTENSIONS = .sh
+SH_LOG_COMPILER = $(SHELL)
+AM_SH_LOG_FLAGS =
+TEST_PROG_CHKEXE = $(TEST_PROG:=.chkexe_)
+TEST_PROG_PARA_CHKEXE = $(TEST_PROG_PARA:=.chkexe_)
+TEST_SCRIPT_CHKSH = $(TEST_SCRIPT:=.chkexe_)
+TEST_SCRIPT_PARA_CHKSH = $(TEST_SCRIPT_PARA:=.chkexe_)
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .log .o .obj .sh .sh$(EXEEXT) .trs
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/commence.am $(top_srcdir)/config/conclude.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hl/tools/gif2h5/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign hl/tools/gif2h5/Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+$(top_srcdir)/config/commence.am $(top_srcdir)/config/conclude.am $(am__empty):
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+h52giftest.sh: $(top_builddir)/config.status $(srcdir)/h52giftest.sh.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
+ fi; \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed 's/$(EXEEXT)$$//' | \
+ while read p p1; do if test -f $$p \
+ || test -f $$p1 \
+ ; then echo "$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n;h' \
+ -e 's|.*|.|' \
+ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+ sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) files[d] = files[d] " " $$1; \
+ else { print "f", $$3 "/" $$4, $$1; } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-binPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+ -e 's/$$/$(EXEEXT)/' \
+ `; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+ @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+
+clean-noinstPROGRAMS:
+ @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+
+gif2h5$(EXEEXT): $(gif2h5_OBJECTS) $(gif2h5_DEPENDENCIES) $(EXTRA_gif2h5_DEPENDENCIES)
+ @rm -f gif2h5$(EXEEXT)
+ $(AM_V_CCLD)$(gif2h5_LINK) $(gif2h5_OBJECTS) $(gif2h5_LDADD) $(LIBS)
+
+h52gif$(EXEEXT): $(h52gif_OBJECTS) $(h52gif_DEPENDENCIES) $(EXTRA_h52gif_DEPENDENCIES)
+ @rm -f h52gif$(EXEEXT)
+ $(AM_V_CCLD)$(h52gif_LINK) $(h52gif_OBJECTS) $(h52gif_LDADD) $(LIBS)
+
+h52gifgentst$(EXEEXT): $(h52gifgentst_OBJECTS) $(h52gifgentst_DEPENDENCIES) $(EXTRA_h52gifgentst_DEPENDENCIES)
+ @rm -f h52gifgentst$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(h52gifgentst_OBJECTS) $(h52gifgentst_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/decompress.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gif2hdf.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gif2mem.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gifread.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h52gifgentst.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hdf2gif.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hdfgifwr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/writehdf.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.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; }; \
+ 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; \
+ else \
+ echo "$@: invalid 'result_count' usage" >&2; exit 4; \
+ fi; \
+ shift; \
+ desc=$$1 count=$$2; \
+ if test $$maybe_colorize = yes && test $$count -gt 0; then \
+ color_start=$$3 color_end=$$std; \
+ else \
+ color_start= color_end=; \
+ 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
+recheck: all $(check_SCRIPTS)
+ @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 $$?
+.sh.log:
+ @p='$<'; \
+ $(am__set_b); \
+ $(am__check_pre) $(SH_LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_SH_LOG_DRIVER_FLAGS) $(SH_LOG_DRIVER_FLAGS) -- $(SH_LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+@am__EXEEXT_TRUE@.sh$(EXEEXT).log:
+@am__EXEEXT_TRUE@ @p='$<'; \
+@am__EXEEXT_TRUE@ $(am__set_b); \
+@am__EXEEXT_TRUE@ $(am__check_pre) $(SH_LOG_DRIVER) --test-name "$$f" \
+@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
+@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_SH_LOG_DRIVER_FLAGS) $(SH_LOG_DRIVER_FLAGS) -- $(SH_LOG_COMPILE) \
+@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) $(check_SCRIPTS)
+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: check-am
+all-am: Makefile $(PROGRAMS) all-local
+installdirs:
+ for dir in "$(DESTDIR)$(bindir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "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:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool \
+ clean-noinstPROGRAMS mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool mostlyclean-local
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS
+
+.MAKE: check-am install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am all-local check check-TESTS \
+ check-am clean clean-binPROGRAMS clean-generic clean-libtool \
+ clean-noinstPROGRAMS cscopelist-am ctags ctags-am distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-binPROGRAMS install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool mostlyclean-local pdf \
+ pdf-am ps ps-am recheck tags tags-am uninstall uninstall-am \
+ uninstall-binPROGRAMS
+
+.PRECIOUS: Makefile
+
+
+# List all build rules defined by HDF5 Makefiles as "PHONY" targets here.
+# This tells the Makefiles that these targets are not files to be built but
+# commands that should be executed even if a file with the same name already
+# exists.
+.PHONY: build-check-clean build-check-p build-check-s build-lib build-progs \
+ build-tests check-clean check-install check-p check-s check-vfd \
+ install-doc lib progs tests uninstall-doc _exec_check-s _test help
+
+help:
+ @$(top_srcdir)/bin/makehelp
+
+# lib/progs/tests targets recurse into subdirectories. build-* targets
+# build files in this directory.
+build-dyn: $(DYN)
+build-lib: $(LIB)
+build-progs: $(LIB) $(PROGS)
+build-tests: $(LIB) $(PROGS) $(chk_TESTS)
+
+# General rule for recursive building targets.
+# BUILT_SOURCES contain targets that need to be built before anything else
+# in the directory (e.g., for Fortran type detection)
+lib dyn progs tests check-s check-p :: $(BUILT_SOURCES)
+ @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1;
+ @for d in X $(SUBDIRS); do \
+ if test $$d != X && test $$d != .; then \
+ (set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
+ fi; \
+ done
+
+# General rule for recursive cleaning targets. Like the rule above,
+# but doesn't require building BUILT_SOURCES.
+check-clean ::
+ @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1;
+ @for d in X $(SUBDIRS); do \
+ if test $$d != X && test $$d != .; then \
+ (set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
+ fi; \
+ done
+
+# Tell Automake to build tests when the user types `make all' (this is
+# not its default behavior). Also build EXTRA_LIB and EXTRA_PROG since
+# Automake won't build them automatically, either.
+all-local: $(EXTRA_LIB) $(EXTRA_PROG) $(chk_TESTS)
+
+# make install-doc doesn't do anything outside of doc directory, but
+# Makefiles should recognize it.
+# UPDATE: docs no longer reside in this build tree, so this target
+# is depreciated.
+install-doc uninstall-doc:
+ @echo "Nothing to be done."
+
+# clean up files generated by tests so they can be re-run.
+build-check-clean:
+ $(RM) -rf $(CHECK_CLEANFILES)
+
+# run check-clean whenever mostlyclean is run
+mostlyclean-local: build-check-clean
+
+# check-install is just a synonym for installcheck
+check-install: installcheck
+
+# Run each test in order, passing $(TEST_FLAGS) to the program.
+# Since tests are done in a shell loop, "make -i" does apply inside it.
+# Set HDF5_Make_Ignore to a non-blank string to ignore errors inside the loop.
+# The timestamps give a rough idea how much time the tests use.
+#
+# Note that targets in chk_TESTS (defined above) will be built when the user
+# types 'make tests' or 'make check', but only programs in TEST_PROG,
+# TEST_PROG_PARA, or TEST_SCRIPT will actually be executed.
+check-TESTS: test
+
+test _test:
+ @$(MAKE) build-check-s
+ @$(MAKE) build-check-p
+
+# Actual execution of check-s.
+build-check-s: $(LIB) $(PROGS) $(chk_TESTS)
+ @if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \
+ echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \
+ fi
+ @$(MAKE) $(AM_MAKEFLAGS) _exec_check-s
+ @if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \
+ echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` ended `date`===";\
+ fi
+
+_exec_check-s: $(TEST_PROG_CHKEXE) $(TEST_SCRIPT_CHKSH)
+
+# The dummy.chkexe here prevents the target from being
+# empty if there are no tests in the current directory.
+# $${log} is the log file.
+# $${tname} is the name of test.
+$(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_:
+ @if test "X$@" != "X.chkexe_" && test "X$@" != "Xdummy.chkexe_"; then \
+ tname=$(@:.chkexe_=)$(EXEEXT);\
+ log=$(@:.chkexe_=.chklog); \
+ echo "============================"; \
+ if $(top_srcdir)/bin/newer $(@:.chkexe_=.chkexe) $${tname}; then \
+ echo "No need to test $${tname} again."; \
+ else \
+ echo "============================" > $${log}; \
+ if test "X$(FORTRAN_API)" = "Xyes"; then \
+ echo "Fortran API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ elif test "X$(CXX_API)" = "Xyes"; then \
+ echo "C++ API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log};\
+ else \
+ echo "Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ fi; \
+ echo "============================" >> $${log}; \
+ srcdir="$(srcdir)" \
+ $(TIME) $(RUNEXEC) ./$${tname} $(TEST_FLAGS) >> $${log} 2>&1 \
+ && touch $(@:.chkexe_=.chkexe) || \
+ (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
+ (cat $${log} && false) || exit 1; \
+ echo "" >> $${log}; \
+ echo "Finished testing $${tname} $(TEST_FLAGS)" >> $${log}; \
+ echo "============================" >> $${log}; \
+ echo "Finished testing $${tname} $(TEST_FLAGS)"; \
+ cat $${log}; \
+ fi; \
+ fi
+
+# The dummysh.chkexe here prevents the target from being
+# empty if there are no tests in the current directory.
+# $${log} is the log file.
+# $${tname} is the name of test.
+$(TEST_SCRIPT_CHKSH) $(TEST_SCRIPT_PARA_CHKSH) dummysh.chkexe_:
+ @if test "X$@" != "X.chkexe_" && test "X$@" != "Xdummysh.chkexe_"; then \
+ cmd=$(@:.chkexe_=);\
+ tname=`basename $$cmd`;\
+ chkname=`basename $(@:.chkexe_=.chkexe)`;\
+ log=`basename $(@:.chkexe_=.chklog)`; \
+ echo "============================"; \
+ if $(top_srcdir)/bin/newer $${chkname} $$cmd $(SCRIPT_DEPEND); then \
+ echo "No need to test $${tname} again."; \
+ else \
+ echo "============================" > $${log}; \
+ if test "X$(FORTRAN_API)" = "Xyes"; then \
+ echo "Fortran API: Testing $${tname} $(TEST_FLAGS)"; \
+ echo "Fortran API: $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ elif test "X$(CXX_API)" = "Xyes"; then \
+ echo "C++ API: Testing $${tname} $(TEST_FLAGS)"; \
+ echo "C++ API: $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ else \
+ echo "Testing $${tname} $(TEST_FLAGS)"; \
+ echo "$${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ fi; \
+ echo "============================" >> $${log}; \
+ RUNSERIAL="$(RUNSERIAL)" RUNPARALLEL="$(RUNPARALLEL)" \
+ srcdir="$(srcdir)" \
+ $(TIME) $(SHELL) $$cmd $(TEST_FLAGS) >> $${log} 2>&1 \
+ && touch $${chkname} || \
+ (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
+ (cat $${log} && false) || exit 1; \
+ echo "" >> $${log}; \
+ echo "Finished testing $${tname} $(TEST_FLAGS)" >> $${log}; \
+ echo "============================" >> $${log}; \
+ echo "Finished testing $${tname} $(TEST_FLAGS)"; \
+ cat $${log}; \
+ fi; \
+ echo "============================"; \
+ fi
+
+# Actual execution of check-p.
+build-check-p: $(LIB) $(PROGS) $(chk_TESTS)
+ @if test -n "$(TEST_PROG_PARA)$(TEST_SCRIPT_PARA)"; then \
+ echo "===Parallel tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \
+ fi
+ @if test -n "$(TEST_PROG_PARA)"; then \
+ echo "**** Hint ****"; \
+ echo "Parallel test files reside in the current directory" \
+ "by default."; \
+ echo "Set HDF5_PARAPREFIX to use another directory. E.g.,"; \
+ echo " HDF5_PARAPREFIX=/PFS/user/me"; \
+ echo " export HDF5_PARAPREFIX"; \
+ echo " make check"; \
+ echo "**** end of Hint ****"; \
+ fi
+ @for test in $(TEST_PROG_PARA) dummy; do \
+ if test $$test != dummy; then \
+ $(MAKE) $(AM_MAKEFLAGS) $$test.chkexe_ \
+ RUNEXEC="$(RUNPARALLEL)" || exit 1; \
+ fi; \
+ done
+ @for test in $(TEST_SCRIPT_PARA) dummy; do \
+ if test $$test != dummy; then \
+ $(MAKE) $(AM_MAKEFLAGS) $$test.chkexe_ || exit 1; \
+ fi; \
+ done
+ @if test -n "$(TEST_PROG_PARA)$(TEST_SCRIPT_PARA)"; then \
+ echo "===Parallel tests in `echo ${PWD} | sed -e s:.*/::` ended `date`===";\
+ fi
+
+# Run test with different Virtual File Driver
+check-vfd: $(LIB) $(PROGS) $(chk_TESTS)
+ @for vfd in $(VFD_LIST) dummy; do \
+ if test $$vfd != dummy; then \
+ echo "============================"; \
+ echo "Testing Virtual File Driver $$vfd"; \
+ echo "============================"; \
+ $(MAKE) $(AM_MAKEFLAGS) check-clean || exit 1; \
+ HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \
+ fi; \
+ done
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/hl/tools/gif2h5/decompress.c b/hl/tools/gif2h5/decompress.c
new file mode 100644
index 0000000..453db12
--- /dev/null
+++ b/hl/tools/gif2h5/decompress.c
@@ -0,0 +1,313 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "gif.h"
+
+WORD iWIDE, iHIGH, eWIDE, eHIGH, expand, numcols, strip, nostrip;
+unsigned long cols[256];
+char *cmd;
+
+FILE *fp;
+
+static WORD
+ XC = 0, YC = 0, /* Output X and Y coords of current pixel */
+ InitCodeSize, /* Starting code size, used during Clear */
+ CodeSize, /* Code size, read from GIF header */
+ BytesPerScanline, /* Bytes per scanline in output raster */
+ IWidth, IHeight; /* image dimensions */
+static int
+ BitOffset = 0, /* Bit Offset of next code */
+ Pass = 0, /* Used by output routine if WORDerlaced pic */
+ OutCount = 0, /* Decompressor output 'stack count' */
+ Code, /* Value returned by ReadCode */
+ MaxCode, /* limiting value for current code size */
+ ClearCode, /* GIF clear code */
+ EOFCode, /* GIF end-of-information code */
+ CurCode, OldCode, InCode, /* Decompressor variables */
+ FirstFree, /* First free code, generated per GIF spec */
+ FreeCode, /* Decompressor, next free slot in hash table */
+ FinChar, /* Decompressor variable */
+ DataMask, /* AND mask for data size */
+ ReadMask; /* Code AND mask for current code size */
+
+/*MODIFICATIONS*/
+BYTE tempbyte[10];
+BYTE * tempBYTEptr[10];
+WORD tempint[10];
+WORD ImageCount = 0;
+/*END MODIFICATION*/
+
+boolean Interlace, HasColormap;
+
+BYTE *Image; /* The result array */
+BYTE *RawGIF; /* The heap array to hold it, raw */
+BYTE *Raster; /* The raster data stream, unblocked */
+
+/* The hash table used by the decompressor */
+
+int Prefix[4096];
+int Suffix[4096];
+
+/* An output array used by the decompressor */
+
+int OutCode[1025];
+
+/* The color map, read from the GIF header */
+
+int numused;
+
+/*
+ * Fetch the next code from the raster data stream. The codes can be any
+ * length from 3 to 12 bits, packed WORDo 8-bit BYTEs, so we have to maWORDain
+ * our location in the Raster array as a BIT Offset. We compute the BYTE
+ * Offset WORDo the raster array by dividing this by 8, pick up three BYTEs,
+ * compute the bit Offset WORDo our 24-bit chunk, shift to bring the desired
+ * code to the bottom, then mask it off and return it.
+ */
+static int
+ReadCode(void)
+{
+ int RawCode, ByteOffset;
+
+ ByteOffset = BitOffset / 8;
+ RawCode = Raster[ByteOffset] + (0x100 * Raster[ByteOffset + 1]);
+
+ if (CodeSize >= 8)
+ RawCode += (0x10000 * Raster[ByteOffset + 2]);
+
+ RawCode >>= (BitOffset % 8);
+ BitOffset += (int)CodeSize;
+ return (RawCode & ReadMask);
+}
+
+static void
+AddToPixel(BYTE Index)
+{
+ if (YC<IHeight)
+ *(Image + YC * BytesPerScanline + XC) = Index;
+
+
+
+ /* Update the X-coordinate, and if it overflows, update the
+ * Y-coordinate */
+ if (++XC == IWidth) {
+ /*
+ * If a non-WORDerlaced picture, just increment YC to the next scan
+ * line. If it's WORDerlaced, deal with the WORDerlace as described
+ * in the GIF spec. Put the decoded scan line out to the screen if we
+ * haven't gone past the bottom of it.
+ */
+ XC = 0;
+
+ if (!Interlace) {
+ YC++;
+ } else {
+ switch (Pass) {
+ case 0:
+ YC += 8;
+
+ if (YC >= IHeight) {
+ Pass++;
+ YC = 4;
+ }
+
+ break;
+ case 1:
+ YC += 8;
+
+ if (YC >= IHeight) {
+ Pass++;
+ YC = 2;
+ }
+
+ break;
+ case 2:
+ YC += 4;
+
+ if (YC >= IHeight) {
+ Pass++;
+ YC = 1;
+ }
+
+ break;
+ case 3:
+ YC += 2;
+ break;
+ default:
+ break;
+ }
+ }
+ }
+}
+
+/* Main routine. Convert a GIF image to an HDF image */
+
+BYTE *
+Decompress(GIFIMAGEDESC *GifImageDesc, GIFHEAD *GifHead)
+{
+ int i;
+
+ XC = 0;
+ YC = 0;
+ Pass = 0;
+ OutCount = 0;
+ BitOffset = 0;
+
+ DataMask = (1 << ((GifHead->PackedField & 0x07) +1)) -1;
+ Raster = GifImageDesc->GIFImage;
+
+ /* Check for image seperator */
+
+ /* Now read in values from the image descriptor */
+ IWidth = GifImageDesc->ImageWidth;
+ IHeight = GifImageDesc->ImageHeight;
+ Interlace = GifImageDesc->PackedField & 0x40;
+
+ /*
+ * Note that I ignore the possible existence of a local color map. I'm
+ * told there aren't many files around that use them, and the spec says
+ * it's defined for future use. This could lead to an error reading some
+ * files.
+ */
+
+ /*
+ * Start reading the raster data. First we get the WORDial code size and
+ * compute decompressor constant values, based on this code size.
+ */
+
+ CodeSize = GifImageDesc->CodeSize;
+ ClearCode = (1 << CodeSize);
+ EOFCode = ClearCode + 1;
+ FreeCode = FirstFree = ClearCode + 2;
+
+ /*
+ * The GIF spec has it that the code size is the code size used to compute
+ * the above values is the code size given in the file, but the code size
+ * used in compression/decompression is the code size given in the file
+ * plus one. (thus the ++).
+ */
+
+ CodeSize++;
+ InitCodeSize = CodeSize;
+ MaxCode = (1 << CodeSize);
+ ReadMask = MaxCode - 1;
+
+ /*
+ * Read the raster data. Here we just transpose it from the GIF array to
+ * the Raster array, turning it from a series of blocks WORDo one long
+ * data stream, which makes life much easier for ReadCode().
+ */
+
+ /* Allocate the Image */
+
+ if (!(Image = (BYTE *)malloc((size_t)IWidth*(size_t)IHeight))) {
+ printf("Out of memory");
+ exit(EXIT_FAILURE);
+ }
+
+ BytesPerScanline = IWidth;
+
+ /*
+ * Decompress the file, continuing until you see the GIF EOF code. One
+ * obvious enhancement is to add checking for corrupt files here.
+ */
+
+ Code = ReadCode();
+
+ while (Code != EOFCode) {
+ /*
+ * Clear code sets everything back to its initial value, then reads
+ * the immediately subsequent code as uncompressed data.
+ */
+ if (Code == ClearCode) {
+ CodeSize = InitCodeSize;
+ MaxCode = (1 << CodeSize);
+ ReadMask = MaxCode - 1;
+ FreeCode = FirstFree;
+ CurCode = OldCode = Code = ReadCode();
+ FinChar = CurCode & DataMask;
+ AddToPixel((BYTE)FinChar);
+ } else {
+ /*
+ * If not a clear code, then must be data: save same as CurCode
+ * and InCode
+ */
+ CurCode = InCode = Code;
+
+ /*
+ * If greater or equal to FreeCode, not in the hash table yet;
+ * repeat the last character decoded
+ */
+ if (CurCode >= FreeCode) {
+ CurCode = OldCode;
+ OutCode[OutCount++] = FinChar;
+ }
+
+ /*
+ * Unless this code is raw data, pursue the chain poWORDed to by
+ * CurCode through the hash table to its end; each code in the
+ * chain puts its associated output code on the output queue.
+ */
+ while (CurCode > DataMask) {
+ if (OutCount > 1024) {
+ /*return error message*/
+ }
+
+ OutCode[OutCount++] = Suffix[CurCode];
+ CurCode = Prefix[CurCode];
+ }
+
+ /* The last code in the chain is treated as raw data. */
+ FinChar = CurCode & DataMask;
+ OutCode[OutCount++] = FinChar;
+
+ /*
+ * Now we put the data out to the Output routine. It's been
+ * stacked LIFO, so deal with it that way...
+ */
+ for (i = OutCount - 1; i >= 0; i--)
+ AddToPixel((BYTE)OutCode[i]);
+
+ OutCount = 0;
+
+ /*
+ * Build the hash table on-the-fly. No table is stored in the
+ * file.
+ */
+ Prefix[FreeCode] = OldCode;
+ Suffix[FreeCode] = FinChar;
+ OldCode = InCode;
+
+ /*
+ * PoWORD to the next slot in the table. If we exceed the current
+ * MaxCode value, increment the code size unless it's already 12.
+ * If it is, do nothing: the next code decompressed better be
+ * CLEAR
+ */
+ FreeCode++;
+
+ if (FreeCode >= MaxCode)
+ if (CodeSize < 12) {
+ CodeSize++;
+ MaxCode *= 2;
+ ReadMask = (1 << CodeSize) - 1;
+ }
+ }
+
+ Code = ReadCode();
+ }
+
+ return Image;
+}
diff --git a/hl/tools/gif2h5/gif.h b/hl/tools/gif2h5/gif.h
new file mode 100644
index 0000000..ed1cc81
--- /dev/null
+++ b/hl/tools/gif2h5/gif.h
@@ -0,0 +1,180 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * Title: GIF.H
+ * Purpose: GIF Header file
+ */
+#ifndef GIF_H_
+#define GIF_H_ 1
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "hdf5.h"
+
+#define MAX_PAL 768
+
+/* typedef H5T_NATIVE_UINT8 BYTE; */
+typedef unsigned char BYTE;
+
+/* typedef H5T_NATIVE_UINT16 WORD; */
+typedef unsigned long WORD;
+
+typedef char CHAR;
+typedef unsigned char boolean;
+
+#define false 0
+#define true 1
+
+/* Set the EndianOrder.
+** The GIF Reader file should do this.
+** Set EndianOrder = 0 if machine is little endian
+** EndianOrder = 1 if machine is big endian.
+*/
+extern int EndianOrder;
+
+/*
+** The GIF header format.
+**
+** This structure actually contains the header, logical screen
+** descriptor, and the global color table for the GIF image.
+*/
+typedef struct _GifHeader { /* Offset Description */
+ BYTE PackedField; /* 0Ah Color Information */
+ WORD TableSize;
+ BYTE ImageCount; /* Keep a count of the number of images */
+ BYTE CommentCount;
+ BYTE ApplicationCount;
+ BYTE PlainTextCount;
+ BYTE HDFPalette[256][3];
+ BYTE HeaderDump[6]; /* BYTE array to dump header contents */
+ BYTE LSDDump[7]; /* Logical Screen Descriptor dump */
+} GIFHEAD;
+
+
+/*
+** The GIF Image Descriptor.
+*/
+typedef struct _GifImageDescriptor {
+ WORD ImageWidth; /* Width of the image in pixels */
+ WORD ImageHeight; /* Height of the image in pixels */
+ BYTE PackedField; /* Image and Color Table Data Information */
+ WORD TableSize;
+ WORD CodeSize; /* Minimum LZW CodeSize for image data */
+ BYTE HDFPalette[256][3];
+ BYTE GIDDump[9]; /* GifImageDescriptor dump */
+
+ BYTE *Image; /* Decompressed Raster Image */
+ BYTE *GIFImage;
+} GIFIMAGEDESC;
+
+/*
+** GIF 89a Graphic Control Extension Block
+*/
+typedef struct _GifGraphicControlExtension {
+ BYTE GCEDump[5]; /* Graphic Control Extension Dump */
+} GIFGRAPHICCONTROL;
+
+/*
+** GIF 89a Plain Text Extension Block
+*/
+typedef struct _GifPlainTextExtension {
+ BYTE PTEDump[15]; /* Plain Text Extension Dump */
+ BYTE *PlainTextData; /* Plain Text data sub-blocks */
+ WORD DataSize;
+} GIFPLAINTEXT;
+
+
+/*
+** GIF 89a Application Extension Block
+*/
+typedef struct _GifApplicationExtension {
+ BYTE AEDump[14]; /* Application Extension Dump */
+ BYTE *ApplicationData; /* Application data sub-blocks */
+ WORD DataSize;
+} GIFAPPLICATION;
+
+/*
+** GIF 89a Comment Extension Block
+*/
+typedef struct _GifCommentExtension {
+ BYTE CEDump[2]; /* Comment Extension Dump */
+ BYTE *CommentData; /* Comment data sub-blocks */
+ WORD DataSize;
+ BYTE Terminator; /* Block Terminator (always 0) */
+} GIFCOMMENT;
+
+/*
+** GIF to HDF Memory Struct
+** Purpose : The gif to hdf structure is used to pass all the
+** gif data to the memory, which gets caught by the hdf driver
+** Its the drivers job to put the data in the appropriate places
+** in the HDF file.
+** I have assumed that the ImageDescriptors and GraphicControls follow
+** one another, ie. I have not associated them with each other. The driver
+** must assume a 1-1 correspondance. The same discussion with plain text
+** extension.
+*/
+typedef struct _GifToMem {
+ GIFHEAD *GifHeader;
+ GIFIMAGEDESC **GifImageDesc;
+ GIFGRAPHICCONTROL **GifGraphicControlExtension;
+ GIFPLAINTEXT **GifPlainTextExtension;
+ GIFAPPLICATION **GifApplicationExtension;
+ GIFCOMMENT **GifCommentExtension;
+} GIFTOMEM;
+
+/*
+** Function Prototypes
+*/
+
+/* GIF2MEM.C */
+int Gif2Mem(BYTE *, GIFTOMEM *);
+
+/* GIFREAD.C */
+int ReadGifHeader(GIFHEAD *, BYTE **);
+int ReadGifImageDesc(GIFIMAGEDESC *, BYTE **);
+int ReadGifGraphicControl(GIFGRAPHICCONTROL *, BYTE **);
+int ReadGifPlainText(GIFPLAINTEXT *, BYTE **);
+int ReadGifApplication(GIFAPPLICATION *, BYTE **);
+int ReadGifComment(GIFCOMMENT *, BYTE **);
+
+/* HDFGIFWR.C */
+int hdfWriteGIF(FILE *fp, BYTE *pic, int ptype, int w, int h, BYTE *rmap,
+ BYTE *gmap, BYTE *bmap, BYTE *pc2ncmap, int numcols,
+ int colorstyle, int BitsPerPixel);
+
+/* WRITEHDF.C */
+int WriteHDF(GIFTOMEM , CHAR * );
+
+/* Function: ReadHDF
+** Return: 0 on completion without error, -1 on error
+** Input: CHAR *h5_file - HDF file name
+** CHAR *dset_name - Name of the HDF Image dataset
+** CHAR *pal_name - Name of the HDF palette
+** Output: BYTE* data - the HDF Image to be converted
+** BYTE palette[256][3] - the corresponding palette
+** hsize_t* image_size - the size of each dimension of the image
+*/
+int ReadHDF(BYTE** data, BYTE palette[256][3], hsize_t *image_size,
+ CHAR *h5_file, CHAR *dset_name, CHAR *pal_name);
+
+BYTE *Decompress(GIFIMAGEDESC *, GIFHEAD *);
+BYTE GetByte(BYTE *);
+WORD GetWord(BYTE *);
+
+void cleanup(BYTE*);
+
+#endif /* GIF_H_ */
diff --git a/hl/tools/gif2h5/gif2hdf.c b/hl/tools/gif2h5/gif2hdf.c
new file mode 100644
index 0000000..2e06d34
--- /dev/null
+++ b/hl/tools/gif2h5/gif2hdf.c
@@ -0,0 +1,163 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "gif.h"
+#include "h5tools.h"
+#include "h5tools_utils.h"
+
+
+int
+main(int argv , char *argc[])
+{
+ GIFTOMEM GifMemoryStruct;
+ GIFIMAGEDESC gifImageDesc;
+
+ FILE *fpGif;
+
+ /* replacing int32 with long */
+ long i, ImageCount;
+ long filesize;
+
+ BYTE *MemGif;
+ BYTE *StartPos;
+
+ char *GIFFileName;
+ char *HDFFileName;
+
+ /*
+ * Initialize all GifMemoryStruct pointers to null to prevent hassles
+ * later on
+ */
+ GifMemoryStruct.GifHeader = NULL;
+ GifMemoryStruct.GifImageDesc = NULL;
+ GifMemoryStruct.GifGraphicControlExtension = NULL;
+ GifMemoryStruct.GifPlainTextExtension = NULL;
+ GifMemoryStruct.GifApplicationExtension = NULL;
+ GifMemoryStruct.GifCommentExtension = NULL;
+
+ /* Initialize h5tools lib */
+ h5tools_init();
+
+ if ( argc[1] && (strcmp("-V",argc[1])==0) )
+ {
+ print_version("gif2h5");
+ exit(EXIT_SUCCESS);
+
+ }
+
+ if (argv < 3) {
+ printf("Usage: gif2h5 <GIFFILE> <HDFFILE>\n");
+ fprintf(stdout, " gif2h5 -V \n");
+ fprintf(stdout, " Print HDF5 library version and exit\n");
+ exit(EXIT_FAILURE);
+ }
+
+ GIFFileName = argc[1];
+ HDFFileName = argc[2];
+
+ if (!(fpGif = fopen(GIFFileName,"rb"))) {
+ printf("Unable to open GIF file for reading.\n");
+ exit(EXIT_FAILURE);
+ }
+
+ /* Get the whole file into memory. Mem's much faster than I/O */
+ fseek(fpGif, 0L , 2);
+ filesize = ftell(fpGif);
+ fseek(fpGif, 0L , 0);
+
+ if (filesize == 0)
+ printf("File Size Zero");
+
+ if (!(MemGif = StartPos = (BYTE *)malloc((size_t)filesize))) {
+ printf("Out of memory");
+ exit(EXIT_FAILURE);
+ }
+
+ if (fread(MemGif,(size_t)filesize,1,fpGif) != 1) {
+ printf("Corrupted Input File");
+ exit(EXIT_FAILURE);
+ }
+
+ fseek(fpGif,0L,0);
+
+ /*
+ * Call Gif2Mem and break the whole file into parts. Gif2Mem also calls
+ * decompresses the images so we don't have to worry about that
+ */
+ Gif2Mem(MemGif, &GifMemoryStruct);
+
+ if (ferror(fpGif)) {
+ printf("File Stream Error\n\n");
+ exit(EXIT_FAILURE);
+ }
+
+ fclose(fpGif);
+
+ /*
+ * Call WriteHDF from here. Go ahead and change WriteHDF to write whatever
+ * format you want
+ */
+ if (WriteHDF(GifMemoryStruct , HDFFileName))
+ printf("HDF Write Error\n\n");
+
+ /* Free all buffers */
+ /* replacing int32 with long */
+ ImageCount = (long)((GifMemoryStruct.GifHeader)->ImageCount);
+
+ for(i = 0; i < ImageCount ; i++) {
+ gifImageDesc = *(GifMemoryStruct.GifImageDesc[i]);
+
+ if (gifImageDesc.Image != NULL)
+ free(gifImageDesc.Image);
+
+ if (GifMemoryStruct.GifImageDesc[i] != NULL)
+ {
+ free(GifMemoryStruct.GifImageDesc[i]);
+ GifMemoryStruct.GifImageDesc[i] = NULL;
+ }
+
+ if (GifMemoryStruct.GifGraphicControlExtension[i] != NULL)
+ {
+ free(GifMemoryStruct.GifGraphicControlExtension[i]);
+ GifMemoryStruct.GifGraphicControlExtension[i] = NULL;
+ }
+ }
+
+ free(StartPos);
+ if (GifMemoryStruct.GifHeader != NULL)
+ {
+ free(GifMemoryStruct.GifHeader);
+ GifMemoryStruct.GifHeader = NULL;
+ }
+ if (GifMemoryStruct.GifApplicationExtension != NULL)
+ {
+ free(GifMemoryStruct.GifApplicationExtension);
+ GifMemoryStruct.GifApplicationExtension = NULL;
+ }
+ if (GifMemoryStruct.GifImageDesc != NULL)
+ {
+ free(GifMemoryStruct.GifImageDesc);
+ GifMemoryStruct.GifImageDesc = NULL;
+ }
+ if (GifMemoryStruct.GifGraphicControlExtension != NULL)
+ {
+ free(GifMemoryStruct.GifGraphicControlExtension);
+ GifMemoryStruct.GifGraphicControlExtension = NULL;
+ }
+
+
+ return EXIT_SUCCESS;
+}
diff --git a/hl/tools/gif2h5/gif2mem.c b/hl/tools/gif2h5/gif2mem.c
new file mode 100644
index 0000000..40b5583
--- /dev/null
+++ b/hl/tools/gif2h5/gif2mem.c
@@ -0,0 +1,339 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * This file contains snippets of code from James Murray's original file to
+ * display the GIF header information, but most of it has been modified to
+ * suit gif2hdf
+ */
+
+/****************************************************************************\
+** Title: GIFHEAD.C **
+** Purpose: Display the data in a GIF image file. **
+** Version: 1.0 **
+** Date: March 1992 **
+** Author: James D. Murray, Anaheim, CA, USA **
+** C Compilers: Borland C++ v2.0, Microsoft C v6.00a **
+** **
+** GIFHEAD displays all real information contained within a GIF image **
+** file, including all color tables and extension block information. **
+** GIFHEAD reads both GIF 87a abd 89a-format files. **
+** **
+** Copyright (C) 1991-92 by Graphics Software Labs. All rights reserved. **
+\****************************************************************************/
+#include <stdio.h>
+
+#include "gif.h"
+
+int
+Gif2Mem(BYTE *MemGif, GIFTOMEM *GifMemoryStruct)
+{
+ /*
+ * The gif structure outline for passing data to memory is given in gif.h.
+ * These pointers are redunant, should take them out in ver. 2
+ */
+ GIFHEAD *gifHead; /* GIF Header structure */
+ GIFIMAGEDESC **gifImageDesc; /* Logical Image Descriptor struct */
+ GIFPLAINTEXT **gifPlainText; /* Plain Text Extension structure */
+ GIFAPPLICATION **gifApplication; /* Application Extension structure */
+ GIFCOMMENT **gifComment; /* Comment Extension structure */
+ GIFGRAPHICCONTROL **gifGraphicControl; /* Graphic Control Extension strct */
+
+ register WORD i; /* Loop counter */
+ BYTE Identifier; /* Extension block identifier holder */
+ BYTE Label; /* Extension block label holder */
+ BYTE ImageCount; /* Count of the number of images in the file */
+ BYTE ImageArray; /* Keep the size of the array to store Images */
+ BYTE CommentCount;
+ BYTE CommentArray;
+ BYTE ApplicationCount;
+ BYTE ApplicationArray;
+ BYTE PlainTextCount;
+ BYTE PlainTextArray;
+ BYTE GCEflag;
+ BYTE aTemp;
+ BYTE j;
+ BYTE w; /* Two more variables needed only while testing */
+ BYTE *b; /* Endian Ordering */
+
+ /* Allocate memory for the GIF structures */
+ /* Plug the structs into GifMemoryStruct at the end */
+ /****************************************************/
+ if (!(gifHead = (GIFHEAD *)malloc(sizeof(GIFHEAD)))) {
+ printf("Could not allocate memory for gifHead\n");
+ exit(EXIT_FAILURE);
+ }
+
+ /*
+ * The next three have to grow dynamically so we leave them for now and
+ * let realloc handle it later on.
+ */
+ gifImageDesc = NULL;
+ gifPlainText = NULL;
+ gifGraphicControl = NULL;
+ gifComment = NULL;
+ gifApplication = NULL;
+
+ /******************************/
+ /* Memory allocation complete */
+ /******************************/
+
+ /* Carry out Endian Testing and set Endian Order */
+ w = 0x0001;
+ b = (BYTE *) &w;
+ EndianOrder = (b[0] ? 1 : 0);
+
+ /* Read the GIF image file header information */
+ ReadGifHeader(gifHead, &MemGif);
+
+ /* Check for FILE stream error */
+#if 0
+ if (ferror(fpGif))
+ {
+ fputs("GIFHEAD: Error reading header information!\n", stderr);
+ exit(EXIT_FAILURE);
+ }
+#endif /* 0 */
+
+ /*
+ * Identify, read, and display block information.
+ */
+ ImageCount = ImageArray = 0;
+ CommentCount = CommentArray = 0;
+ ApplicationCount = ApplicationArray = 0;
+ PlainTextCount = PlainTextArray = 0;
+ GCEflag = 0;
+
+ for (;;) {
+ Identifier = *MemGif++;
+
+ switch (Identifier) {
+ case 0x3B: /* Trailer */
+ /*
+ * The counts are stored to make it easier while putting stuff
+ * into the HDF file and then deallocating space.
+ */
+ gifHead->ImageCount = ImageCount;
+ gifHead->CommentCount = CommentCount;
+ gifHead->ApplicationCount = ApplicationCount;
+ gifHead->PlainTextCount = PlainTextCount;
+
+ /* putting stuff into the gif2mem structure */
+ GifMemoryStruct->GifHeader = gifHead;
+ GifMemoryStruct->GifImageDesc = gifImageDesc;
+ GifMemoryStruct->GifPlainTextExtension = gifPlainText;
+ GifMemoryStruct->GifApplicationExtension = gifApplication;
+ GifMemoryStruct->GifCommentExtension = gifComment;
+ GifMemoryStruct->GifGraphicControlExtension = gifGraphicControl;
+
+ /* return the struct */
+ return 0;
+
+ case 0x2C: /* Image Descriptor */
+ /*
+ * If there was no image descriptor before this increase image
+ * count. If an imagedescriptor was present, reset GCEflag
+ */
+ if (GCEflag == 0)
+ ImageCount++;
+ else
+ GCEflag = 0;
+
+ if (ImageCount > ImageArray) {
+ aTemp = ImageArray;
+ ImageArray = (BYTE)((ImageArray << 1) + 1);
+ if (!(gifImageDesc = (GIFIMAGEDESC **)realloc(gifImageDesc,
+ sizeof(GIFIMAGEDESC *) * ImageArray))) {
+ printf("Out of memory!");
+ exit(EXIT_FAILURE);
+ }
+
+ if (!(gifGraphicControl = (GIFGRAPHICCONTROL **)realloc(
+ gifGraphicControl,
+ sizeof(GIFGRAPHICCONTROL *) * ImageArray))) {
+ printf("Out of memory!");
+ exit(EXIT_FAILURE);
+ }
+
+ for (j = aTemp ; j < ImageArray ; j++) {
+ gifGraphicControl[j] = NULL;
+ gifImageDesc[j] = NULL;
+ }
+ }
+
+ if(!(gifImageDesc[ImageCount-1] = (GIFIMAGEDESC*)malloc(sizeof(GIFIMAGEDESC)))) {
+ printf("Out of memory!");
+ exit(EXIT_FAILURE);
+ }
+
+
+ if (ReadGifImageDesc(gifImageDesc[ImageCount-1], &MemGif) == -1)
+ fputs("Error reading Image Descriptor information\n", stderr);
+
+ /* Decompress the Image */
+ gifImageDesc[ImageCount-1]->Image = Decompress(gifImageDesc[ImageCount-1],
+ gifHead);
+ free(gifImageDesc[ImageCount-1]->GIFImage);
+
+ /*
+ * Convert the local palette into an HDF compatible palette In
+ * case the local color table is present, it is written out as
+ * the HDFPalette If it is absent the global table is written
+ * as the HDFPalette.
+ */
+ if (!((gifImageDesc[ImageCount-1]->PackedField) & 0x80)) {
+ /* Check to see if the global color table exists.... */
+ if (gifHead->PackedField & 0x80) {
+ for (i=0 ; i<gifHead->TableSize ; i++) {
+ gifImageDesc[ImageCount-1]->HDFPalette[i][0] =
+ gifHead->HDFPalette[i][0];
+ gifImageDesc[ImageCount-1]->HDFPalette[i][1] =
+ gifHead->HDFPalette[i][1];
+ gifImageDesc[ImageCount-1]->HDFPalette[i][2] =
+ gifHead->HDFPalette[i][2];
+ }
+ }
+
+ gifImageDesc[ImageCount-1]->TableSize = gifHead->TableSize;
+ }
+
+ break;
+
+ case 0x21: /* Extension Block */
+ Label = *MemGif++;
+
+ switch (Label) {
+ case 0x01: /* Plain Text Extension */
+ puts("Plain Text Extension\n");
+ PlainTextCount++;
+
+ if (PlainTextCount > PlainTextArray)
+ PlainTextArray = (BYTE)((PlainTextArray << 1) + 1);
+
+ if (!(gifPlainText = (GIFPLAINTEXT **)realloc(gifPlainText , sizeof(GIFPLAINTEXT *) * PlainTextArray))) {
+ printf("Out of memory!");
+ exit(EXIT_FAILURE);
+ }
+
+ if(!(gifPlainText[PlainTextCount - 1] = (GIFPLAINTEXT*)malloc(sizeof(GIFPLAINTEXT)))) {
+ printf("Out of memory!");
+ exit(EXIT_FAILURE);
+ }
+
+ if (ReadGifPlainText(gifPlainText[PlainTextCount - 1], &MemGif))
+ fprintf(stderr,
+ "Error reading Plain Text Extension information.\n");
+
+ break;
+
+ case 0xFE: /* Comment Extension */
+ CommentCount++;
+
+ if (CommentCount > CommentArray)
+ CommentArray = (BYTE)((CommentArray << 1) + 1);
+
+ if (!(gifComment = (GIFCOMMENT **)realloc(gifComment , sizeof(GIFCOMMENT *) * CommentArray))) {
+ printf("Out of memory!");
+ exit(EXIT_FAILURE);
+ }
+
+ if(!(gifComment[CommentCount - 1] = (GIFCOMMENT *)malloc(sizeof(GIFCOMMENT)))) {
+ printf("Out of memory!");
+ exit(EXIT_FAILURE);
+ }
+
+
+ if (ReadGifComment(gifComment[CommentCount - 1], &MemGif))
+ fprintf(stderr,
+ "Error reading Comment Extension information\n");
+
+ break;
+
+ case 0xF9: /* Graphic Control Extension */
+ if (GCEflag == 0 )
+ ImageCount++;
+
+ GCEflag = 1;
+
+ if (ImageCount > ImageArray) {
+ aTemp = ImageArray;
+ ImageArray = (BYTE)((ImageArray << 1) + 1);
+
+ if (!(gifGraphicControl = (GIFGRAPHICCONTROL **)realloc(gifGraphicControl , sizeof(GIFGRAPHICCONTROL *) * ImageArray))) {
+ printf("Out of memory!");
+ exit(EXIT_FAILURE);
+ }
+
+ if (!(gifImageDesc = (GIFIMAGEDESC **)realloc(gifImageDesc , sizeof(GIFIMAGEDESC *) * ImageArray))) {
+ printf("Out of memory!");
+ exit(EXIT_FAILURE);
+ }
+
+ for (j = aTemp ; j < ImageArray ; j++) {
+ gifGraphicControl[j] = NULL;
+ gifImageDesc[j] = NULL;
+ }
+ }
+
+ if(!(gifGraphicControl[ImageCount-1] = (GIFGRAPHICCONTROL*)malloc(sizeof(GIFGRAPHICCONTROL)))) {
+ printf("Out of memory!");
+ exit(EXIT_FAILURE);
+ }
+
+
+ if (ReadGifGraphicControl(gifGraphicControl[ImageCount-1], &MemGif))
+ fprintf(stderr,
+ "Error reading Graphic Control Extension information\n");
+
+ if (!*MemGif++ == 0)
+ fprintf(stderr,
+ "Error reading Graphic Control Extension\n");
+
+ break;
+
+ case 0xFF: /* Application Extension */
+ ApplicationCount++;
+
+ if (ApplicationCount > ApplicationArray)
+ ApplicationArray = (BYTE)((ApplicationArray << 1) + 1);
+
+ if (!(gifApplication = (GIFAPPLICATION **)realloc(gifApplication , sizeof(GIFAPPLICATION *) * ApplicationArray))) {
+ printf("Out of memory!");
+ exit(EXIT_FAILURE);
+ }
+
+ if(!(gifApplication[ApplicationCount - 1] = (GIFAPPLICATION *)malloc(sizeof(GIFAPPLICATION)))) {
+ printf("Out of memory!");
+ exit(EXIT_FAILURE);
+ }
+
+
+ if (ReadGifApplication(gifApplication[ApplicationCount - 1], &MemGif))
+ fprintf(stderr,
+ "Error reading Application Extension information\n");
+
+ break;
+
+ default:
+ printf("Unknown Extension Label: 0x%02x\n", Label);
+ break;
+ }
+
+ break;
+
+ default:
+ fprintf(stderr,
+ "Unknown Block Separator Character: 0x%02x\n", Identifier);
+ }
+ }
+}
diff --git a/hl/tools/gif2h5/gifread.c b/hl/tools/gif2h5/gifread.c
new file mode 100644
index 0000000..948e112
--- /dev/null
+++ b/hl/tools/gif2h5/gifread.c
@@ -0,0 +1,401 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "gif.h"
+
+int EndianOrder;
+
+static BYTE *ReadDataSubBlocks(BYTE **MemGif2, WORD *DSize);
+
+WORD
+GetWord(BYTE *MemGif)
+{
+ WORD w;
+
+ if (EndianOrder == 1) {
+ /* LittleEndian */
+ w = (WORD) (*MemGif++ & 0xFF);
+ w |= (WORD) ((*MemGif++ & 0xFF) << 0x08);
+ } else {
+ w = (WORD) (*MemGif++ & 0xFF);
+ w = ((WORD) (*MemGif++ & 0xFF)) | (w << 0x08);
+ }
+
+ return w;
+}
+
+BYTE
+GetByte(BYTE *MemGif)
+{
+ return *MemGif;
+}
+
+/*
+ * Read a GIF image BYTE Header.
+ *
+ * This function reads the Header, Logical Screen Descriptor, and
+ * Global Color Table (if any) from a GIF image file. The information
+ * is stored in a GIFHEAD structure.
+ *
+ * Returns: -1 if a FILE stream error occured during the read,
+ * otherwise 0 if no error occured.
+ */
+int
+ReadGifHeader(GIFHEAD *GifHead, /* Pointer to GIF header structure */
+ BYTE **MemGif2) /* GIF image file input FILE stream */
+{
+ WORD i; /* Loop counter */
+ WORD tableSize; /* Number of entires in the Global Color Table */
+
+ GifHead->TableSize = 0;
+ for (i = 0 ; i < 6 ; i++) {
+ GifHead->HeaderDump[i] = *(*MemGif2)++;
+ }
+
+ if (strncmp((const char *)GifHead->HeaderDump , "GIF" , (size_t)3)) {
+ printf("The file does not appear to be a valid GIF file.\n");
+ exit(EXIT_FAILURE);
+ }
+
+ for (i = 0 ; i < 7 ; i++) {
+ GifHead->LSDDump[i] = *(*MemGif2)++;
+ }
+
+ GifHead->PackedField = GifHead->LSDDump[4];
+
+ /* Check if a Global Color Table is present */
+ if (GifHead->PackedField & 0x80) {
+ /* Read number of color table entries */
+ tableSize = (WORD) (1L << ((GifHead->PackedField & 0x07) + 1));
+ GifHead->TableSize = tableSize;
+
+ /* Read the Global Color Table */
+
+ /*
+ * There are some changes made here apart from just reading in the
+ * global color table as would seem intuitively obvious. The colors
+ * are stored in the bottom part of the palette as opposed to the top
+ */
+
+ for (i = 0; i < tableSize; i++) {
+ GifHead->HDFPalette[i][0] = *(*MemGif2)++;
+ GifHead->HDFPalette[i][1] = *(*MemGif2)++;
+ GifHead->HDFPalette[i][2] = *(*MemGif2)++;
+ }
+ }
+
+ /* Check for a FILE stream error */
+#if 0
+ if (ferror(FpGif))
+ return -1;
+#endif /* 0 */
+
+ return 0; /* No FILE stream error occured */
+}
+
+
+/*
+** Read a GIF Local Image Descriptor.
+**
+** This function reads the Local Image Descriptor, and Local Color
+** Table (if any) from a GIF image file. The information is stored
+** in a GIFIMAGEDESC structure.
+**
+** Note that the ImageSeparator field value in the GIFIMAGEDESC
+** structure is assigned by the function calling ReadGifImageDesc().
+**
+** Returns: -1 if a FILE stream error occured during the read,
+** otherwise 0 if no error occured.
+*/
+int
+ReadGifImageDesc(
+ GIFIMAGEDESC *GifImageDesc, /* Pointer to GIF image descriptor structure */
+ BYTE **MemGif2 /* GIF image file input FILE stream */
+ )
+{
+ WORD i; /* Loop counter */
+ WORD tableSize; /* Number of entries in the Local Color Table */
+ /* BYTE Interlace; */ /* PackedField & 0x20 gives information on interlacing */
+ BYTE *TempPtr;
+ int ch , ch1;
+
+ GifImageDesc->TableSize = 0;
+ for (i = 0 ; i < 9 ; i++) {
+ GifImageDesc->GIDDump[i] = *(*MemGif2)++;
+ }
+
+ /*
+ ** Get the relevant fields. I need ImageWidth and Height actively hence I have
+ ** taken information from those fields. I intend to keep the GifImageDesc data
+ ** structure as it is so that anyone needing the rest of the fields can do so
+ ** quickly.
+ */
+
+ if (EndianOrder == 1) /* LittleEndian */
+ {
+ GifImageDesc->ImageWidth = (WORD) (GifImageDesc->GIDDump[4] & 0xFF);
+ GifImageDesc->ImageWidth |= (WORD) ((GifImageDesc->GIDDump[5] & 0xFF) << 0x08);
+
+ GifImageDesc->ImageHeight = (WORD) (GifImageDesc->GIDDump[6] & 0xFF);
+ GifImageDesc->ImageHeight |= (WORD) ((GifImageDesc->GIDDump[7] & 0xFF) << 0x08);
+
+ }
+ else
+ {
+ GifImageDesc->ImageWidth = (WORD) (GifImageDesc->GIDDump[4] & 0xFF);
+ GifImageDesc->ImageWidth = ((WORD) (GifImageDesc->GIDDump[5] & 0xFF)) | (GifImageDesc->ImageWidth << 0x08);
+
+ GifImageDesc->ImageHeight = (WORD) (GifImageDesc->GIDDump[6] & 0xFF);
+ GifImageDesc->ImageHeight = ((WORD) (GifImageDesc->GIDDump[7] & 0xFF)) | (GifImageDesc->ImageWidth << 0x08);
+
+
+ }
+
+ GifImageDesc->PackedField = GifImageDesc->GIDDump[8];
+
+ /* Interlace = GifImageDesc->PackedField & 0x20; */
+
+ /* Check if a Local Color Table is present */
+ if (GifImageDesc->PackedField & 0x80)
+ {
+ /* Read number of color table entries */
+ tableSize = (WORD) (1L << ((GifImageDesc->PackedField & 0x07) + 1));
+ GifImageDesc->TableSize = tableSize;
+ /* Read the Local Color Table */
+ for (i = 0; i < tableSize; i++)
+ {
+ GifImageDesc->HDFPalette[i][0] = *(*MemGif2)++;
+ GifImageDesc->HDFPalette[i][1] = *(*MemGif2)++;
+ GifImageDesc->HDFPalette[i][2] = *(*MemGif2)++;
+ }
+ }
+
+ /*
+ ** Get LZW minimum Code Size
+ */
+ GifImageDesc->CodeSize = (WORD)*(*MemGif2)++;
+
+ /*GifImageDesc->GIFImage = ReadDataSubBlocks(FpGif);*/
+ if (!(GifImageDesc->GIFImage = (BYTE *)malloc((GifImageDesc->ImageWidth) * (GifImageDesc->ImageHeight)))) {
+ printf("Out of memory");
+ exit(EXIT_FAILURE);
+ }
+
+
+ TempPtr = GifImageDesc->GIFImage;
+ do
+ {
+ ch = ch1 = (int)*(*MemGif2)++;
+ while (ch--) *TempPtr++ = *(*MemGif2)++;
+ }
+ while (ch1);
+
+
+ return(0); /* No FILE stream error occured */
+}
+
+
+/*
+** Read a GIF Graphic Control Extension block.
+**
+** Note that the Introducer and Label field values in the GIFGRAPHICCONTROL
+** structure are assigned by the function calling ReadGifGraphicControl().
+**
+** Returns: -1 if a FILE stream error occured during the read,
+** otherwise 0 if no error occured.
+*/
+int
+ReadGifGraphicControl(
+ GIFGRAPHICCONTROL *GifGraphicControl, /* Pointer to GC Extension structure */
+ BYTE **MemGif2 /* GIF image file input FILE stream */
+ )
+{
+ int i;
+
+ for (i = 0 ; i < 5 ; i++) {
+ GifGraphicControl->GCEDump[i] = *(*MemGif2)++;
+ }
+
+ return(0); /* No FILE stream error occured */
+}
+
+
+/*
+** Read a GIF Plain Text Extension block.
+**
+** Note that the Introducer and Label field values in the GIFLPLAINTEXT
+** structure are assigned by the function calling ReadGifPlainText().
+**
+** Returns: -1 if a FILE stream error occured during the read,
+** otherwise 0 if no error occured.
+*/
+int
+ReadGifPlainText(
+ GIFPLAINTEXT *GifPlainText, /* Pointer to Plain Text Extension structure */
+ BYTE **MemGif2 /* GIF image file input FILE stream */
+ )
+{
+ int i;
+
+ for (i = 0 ; i < 13 ; i++) {
+ GifPlainText->PTEDump[i] = *(*MemGif2)++;
+ }
+
+ /* Read in the Plain Text data sub-blocks */
+ if (!(GifPlainText->PlainTextData = ReadDataSubBlocks(MemGif2 , &(GifPlainText->DataSize))))
+ return(1);
+
+ /*
+ GifPlainText->Terminator = 0;
+ */
+
+ /* Check for a FILE stream error */
+ /*
+ if (ferror(FpGif))
+ return(-1);
+ */
+
+ return(0); /* No FILE stream error occured */
+}
+
+
+/*
+** Read a GIF Application Extension block.
+**
+** Note that the Introducer and Label field values in the GIFAPPLICATION
+** structure are assigned by the function calling ReadGifApplication().
+**
+** Returns: -1 if a FILE stream error occured during the read,
+** otherwise 0 if no error occured.
+*/
+int
+ReadGifApplication(
+ GIFAPPLICATION *GifApplication, /* Pointer to Application Extension structure */
+ BYTE **MemGif2 /* GIF image file input FILE stream */
+ )
+{
+ int i;
+
+ for (i = 0 ; i < 12 ; i++) {
+ GifApplication->AEDump[i] = *(*MemGif2)++;
+ }
+
+ /* Read in the Plain Text data sub-blocks */
+ if (!(GifApplication->ApplicationData = ReadDataSubBlocks(MemGif2 , &(GifApplication->DataSize))))
+ return(1);
+ /*
+ GifApplication->Terminator = 0;
+ */
+
+ /* Check for a FILE stream error */
+ /*
+ if (ferror(FpGif))
+ return(-1);
+ */
+
+ return(0); /* No FILE stream error occured */
+}
+
+
+/*
+** Read a GIF Comment Extension block.
+**
+** Note that the Introducer and Label field values in the GIFCOMMENT
+** structure are assigned by the function calling ReadGifComment().
+**
+** Returns: -1 if a FILE stream error occured during the read,
+** otherwise 0 if no error occured.
+*/
+int
+ReadGifComment(
+ GIFCOMMENT *GifComment, /* Pointer to GIF Comment Extension structure */
+ BYTE **MemGif2 /* GIF image file input FILE stream */
+ )
+{
+
+ /* Read in the Plain Text data sub-blocks */
+ if (!(GifComment->CommentData = ReadDataSubBlocks(MemGif2 , &(GifComment->DataSize))))
+ return(1);
+
+ GifComment->Terminator = 0;
+
+ return(0); /* No FILE stream error occured */
+}
+
+
+/*
+** Read one or more GIF data sub-blocks and write the information
+** to a buffer.
+**
+** A GIF "sub-block" is a single count byte followed by 1 to 255
+** additional data bytes.
+**
+** Returns: A NULL pointer if a memory allocation error occured,
+** otherwise a valid pointer if no error occured.
+*/
+static BYTE *
+ReadDataSubBlocks(BYTE **MemGif2, /* GIF image file input FILE stream */
+ WORD *DSize)
+{
+ BYTE *ptr1; /* Pointer used to "walk the heap" */
+ BYTE *ptr2; /* Pointer used to mark the top of the heap */
+ BYTE dataSize; /* Size of the current data sub-block being read */
+ WORD bufSize; /* Total size of the Plain Text data buffer */
+ int tempcount = 0;
+
+ bufSize = 0; /* The output buffer is empty */
+
+ dataSize = *(*MemGif2)++; /* Get the size of the first sub-block */
+
+ /* Allocate initial data buffer */
+ if (!(ptr1 = ptr2 = (BYTE *) malloc((size_t)dataSize + 1))) {
+ printf("Out of memory. Allocation of memory for data sub-blocks for\neither Comment, Plain Text or Application Extensions failed");
+ return((BYTE *) NULL);
+ }
+ for (;;)
+ {
+ tempcount++;
+ bufSize += (dataSize); /* Running total of the buffer size */
+ *DSize = bufSize;
+
+#ifdef COMMENTED_OUT
+ *ptr1++ = dataSize; /* Write the data count */
+#endif /* COMMENTED_OUT */
+ while (dataSize--) /* Read/write the Plain Text data */
+ *ptr1++ = *(*MemGif2)++;
+
+ /* Check if there is another data sub-block */
+ if ((dataSize = *(*MemGif2)++) == 0)
+ break; /* Block Terminator encountered */
+
+ /* Increase the buffer size to accomodate the next sub-block */
+ if (!(ptr1 = ptr2 = (BYTE *) realloc(ptr2, bufSize + dataSize + 1)))
+ return((BYTE *) NULL);
+
+
+ ptr1 += bufSize; /* Move pointer to the end of the data */
+
+
+ }
+
+ *ptr1++ = '\0';
+
+ return(ptr2); /* Return a pointer to the sub-block data */
+}
+
+
+
+
+
diff --git a/hl/tools/gif2h5/h52gifgentst.c b/hl/tools/gif2h5/h52gifgentst.c
new file mode 100644
index 0000000..655563c
--- /dev/null
+++ b/hl/tools/gif2h5/h52gifgentst.c
@@ -0,0 +1,108 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+#include <assert.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include "hdf5.h"
+#include "H5IMpublic.h"
+
+/*-------------------------------------------------------------------------
+ * Program: h52gifgentst
+ *
+ * Purpose: generate files for h52gif testing
+ *
+ * Programmer: Pedro Vicente, pvn@hdfgroup.org
+ *
+ * Date: March 15, 2007
+ *
+ *-------------------------------------------------------------------------
+ */
+
+#define FILENAME "h52giftst.h5"
+#define WIDTH 400
+#define HEIGHT 200
+#define PAL_ENTRIES 256
+#define IMAGE1_NAME "image"
+#define PAL_NAME "palette"
+
+/*-------------------------------------------------------------------------
+ * Function: main
+ *
+ * Purpose: main program
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int main(void)
+{
+ hid_t fid;
+ int i, j, n, space;
+ unsigned char *buf;
+ unsigned char pal[ PAL_ENTRIES * 3 ]; /* palette array */
+ hsize_t pal_dims[2] = {PAL_ENTRIES,3}; /* palette dimensions */
+ hsize_t width = WIDTH;
+ hsize_t height = HEIGHT;
+
+ /* Allocate buffer */
+ if(NULL == (buf = (unsigned char *)malloc(WIDTH * HEIGHT)))
+ return EXIT_FAILURE;
+
+ /* create a file */
+ if ((fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT))<0)
+ return EXIT_FAILURE;
+
+ /* create an image */
+ space = WIDTH*HEIGHT / PAL_ENTRIES;
+ for (i=0, j=0, n=0; i < WIDTH*HEIGHT; i++, j++ )
+ {
+ buf[i] = (unsigned char)n;
+ if ( j > space )
+ {
+ n++;
+ j=0;
+ }
+
+ }
+
+ /* make the image */
+ if (H5IMmake_image_8bit( fid, IMAGE1_NAME, width, height, buf )<0)
+ return EXIT_FAILURE;
+
+ /*-------------------------------------------------------------------------
+ * define a palette, blue to red tones
+ *-------------------------------------------------------------------------
+ */
+ for ( i=0, n=0; i<PAL_ENTRIES*3; i+=3, n++)
+ {
+ pal[i] = (unsigned char)n; /* red */
+ pal[i+1] = (unsigned char)0; /* green */
+ pal[i+2] = (unsigned char)(255-n); /* blue */
+ }
+
+ /* make a palette */
+ if (H5IMmake_palette( fid, PAL_NAME, pal_dims, pal )<0)
+ return EXIT_FAILURE;
+
+ /* attach the palette to the image */
+ if (H5IMlink_palette( fid, IMAGE1_NAME, PAL_NAME )<0)
+ return EXIT_FAILURE;
+
+ if(H5Fclose(fid)<0)
+ return EXIT_FAILURE;
+
+ free(buf);
+
+ return EXIT_SUCCESS;
+}
+
diff --git a/hl/tools/gif2h5/h52giftest.sh.in b/hl/tools/gif2h5/h52giftest.sh.in
new file mode 100644
index 0000000..5643e30
--- /dev/null
+++ b/hl/tools/gif2h5/h52giftest.sh.in
@@ -0,0 +1,96 @@
+#!/bin/sh
+#
+# Copyright by The HDF Group.
+# Copyright by the Board of Trustees of the University of Illinois.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+#
+# HDF Utilities Test script
+
+
+TESTFILE1="$srcdir/testfiles/h52giftst.h5"
+TESTFILE2="$srcdir/testfiles/image1.gif"
+TESTFILE3="$srcdir/testfiles/ex_image2.h5"
+
+# initialize errors variable
+errors=0
+
+TESTING() {
+ SPACES=" "
+ echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012'
+}
+
+
+
+# Verify the test runs with success (return code is 0)
+TOOLTEST()
+{
+ # for now, discard any error messages generated.
+ $RUNSERIAL $* > /dev/null 2>&1
+
+ RET=$?
+ if [ $RET = 0 ] ; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ errors="` expr $errors + 1 `";
+ fi
+
+}
+
+# Verify the test runs with failure (return code is not 0)
+# Use for testing if tool can handle error conditions like
+# illegal input, bad arguments, exeeding limits, ...
+TOOLTESTFAIL()
+{
+ # for now, discard any error messages generated.
+ $RUNSERIAL $* > /dev/null 2>&1
+
+ RET=$?
+ if [ $RET != 0 ] ; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ errors="` expr $errors + 1 `";
+ fi
+}
+
+
+# Positive tests for gif2h5
+echo "**validate the gif2h5 tool processes input correctly..."
+TESTING "./gif2h5 image1.gif image1.h5"
+TOOLTEST ./gif2h5 $TESTFILE2 image1.h5
+echo ""
+
+# Positive tests for h52gif
+echo "**validate the h52gif tool processes input correctly..."
+TESTING "./h52gif h52giftst.h5 image1.gif -i image"
+TOOLTEST ./h52gif $TESTFILE1 image1.gif -i image
+echo ""
+
+# Negative tests.
+echo "**verify that the h52gif tool handles error conditions correctly..."
+# nonexisting dataset name
+TESTING "./h52gif h52giftst.h5 image.gif -i nosuch_image"
+TOOLTESTFAIL "./h52gif $TESTFILE1 image.gif -i nosuch_image"
+# this test should have failed but it did not. Comment it out for now.
+#TESTING "./h52gif h52giftst.h5 image.gif -i palette"
+#TOOLTESTFAIL "./h52gif $TESTFILE1 image.gif -i palette"
+TESTING "./h52gif h52giftst.h5 image24.gif -i image24bitpixel"
+TOOLTESTFAIL "./h52gif $TESTFILE3 image24.gif -i image24bitpixel"
+echo ""
+
+# all done. summarize results.
+if test $errors -eq 0 ; then
+ echo "All gif2h5 and h52gif tests passed."
+ exit 0
+else
+ echo "Some gif2h5 or h52gif tests failed with $errors errors."
+ exit 1
+fi
diff --git a/hl/tools/gif2h5/hdf2gif.c b/hl/tools/gif2h5/hdf2gif.c
new file mode 100644
index 0000000..ae63e92
--- /dev/null
+++ b/hl/tools/gif2h5/hdf2gif.c
@@ -0,0 +1,352 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+#include <stdio.h>
+#include <assert.h>
+#include "gif.h"
+#include "H5IMpublic.h"
+#include "h5tools.h"
+#include "h5tools_utils.h"
+
+#define IMAGE_WIDTH_MAX 65535 /* unsigned 16bits integer */
+#define IMAGE_HEIGHT_MAX 65535 /* unsigned 16bits integer */
+
+
+int EndianOrder;
+
+static void
+putword(int w, FILE *fp)
+{
+ /* writes a 16-bit integer in GIF order (LSB first) */
+ fputc(w &0xff, fp);
+ fputc((w>>8)&0xff,fp);
+}
+
+static void
+usage(void)
+{
+ printf("Usage: h52gif <h5_file> <gif_file> -i <h5_image>\n");
+ fprintf(stdout, " h52gif -V \n");
+ fprintf(stdout, " Print HDF5 library version and exit\n");
+ printf("h52gif expects *at least* one h5_image.\n");
+
+}
+
+FILE *fpGif = NULL;
+int main(int argc , char **argv)
+{
+ BYTE *Image;
+ void *edata;
+ H5E_auto2_t func;
+
+ /* compression structs */
+ CHAR *HDFName = NULL;
+ CHAR *GIFName = NULL;
+
+ BYTE* b;
+
+ BYTE GlobalPalette[256][3];
+ BYTE Red[256];
+ BYTE Green[256];
+ BYTE Blue[256];
+
+ int RWidth, RHeight;
+ int ColorMapSize, InitCodeSize, Background, BitsPerPixel;
+ int j,nc;
+ int i;
+ int numcols = 0;
+
+ BYTE pc2nc[256] , r1[256] , g1[256] , b1[256];
+
+ int arg_index = 2;
+ int bool_is_image = 0; /* 0 = false , 1 = true */
+ char *image_name = NULL;
+ int idx;
+
+ /* Disable error reporting */
+ H5Eget_auto2(H5E_DEFAULT, &func, &edata);
+ H5Eset_auto2(H5E_DEFAULT, NULL, NULL);
+
+ /* Initialize h5tools lib */
+ h5tools_init();
+
+ if ( argv[1] && (strcmp("-V",argv[1])==0) )
+ {
+ print_version("gif2h5");
+ exit(EXIT_SUCCESS);
+
+ }
+
+
+ if (argc < 4)
+ {
+ /* they didn't supply at least one image -- bail */
+ usage();
+ return EXIT_FAILURE;
+ }
+
+ HDFName = argv[1];
+ GIFName = argv[2];
+
+ /* get the options */
+ while (arg_index++ < argc - 1)
+ {
+ if (!strcmp(argv[arg_index] , "-i")) {
+ bool_is_image = 1;
+ continue;
+ }
+
+ if (bool_is_image)
+ {
+ /* allocate space to store the image name */
+ size_t len = strlen(argv[arg_index]);
+ image_name = (CHAR*) malloc( len + 1);
+ strcpy(image_name , argv[arg_index]);
+
+ bool_is_image = 0;
+ continue;
+ }
+
+ /* oops. This was not meant to happen */
+ usage();
+
+ goto out;
+ }
+
+ /* Do Endian Order testing and set Endian Order */
+ idx = 0x0001;
+ b = (BYTE *) &idx;
+ EndianOrder = (b[0] ? 1:0);
+
+ if (!(fpGif = fopen(GIFName , "wb")))
+ {
+ printf("Error opening gif file for output. Aborting.\n");
+ goto out;
+ }
+
+ Background = 0;
+ {
+ hsize_t width, height, planes;
+ hid_t fid;
+ char interlace[20];
+ hssize_t npals;
+ hsize_t pal_dims[2];
+ unsigned char *pal;
+
+ if ((fid = H5Fopen(HDFName , H5F_ACC_RDONLY , H5P_DEFAULT)) < 0)
+ {
+ fprintf(stderr , "Unable to open HDF file for input. Aborting.\n");
+ goto out;
+ }
+
+ /* read image */
+ if ( H5IMget_image_info( fid, image_name, &width, &height, &planes, interlace, &npals ) < 0 )
+ goto out;
+
+ if (width > IMAGE_WIDTH_MAX || height > IMAGE_HEIGHT_MAX){
+ fprintf(stderr, "HDF5 image is too large. Limit is %d by %d.\n", IMAGE_WIDTH_MAX, IMAGE_HEIGHT_MAX);
+ goto out;
+ }
+
+ /* tool can handle single plane images only. */
+ if (planes > 1){
+ fprintf(stderr, "Cannot handle multiple planes image\n");
+ goto out;
+ }
+
+ Image = (BYTE*) malloc( (size_t) width * (size_t) height );
+
+ if ( H5IMread_image( fid, image_name, Image ) < 0 )
+ goto out;
+
+ if (npals)
+ {
+ if ( H5IMget_palette_info( fid, image_name, 0, pal_dims ) < 0 )
+ goto out;
+
+ pal = (BYTE*) malloc( (size_t) pal_dims[0] * (size_t) pal_dims[1] );
+
+ if ( H5IMget_palette( fid, image_name, 0, pal ) < 0 )
+ goto out;
+
+ numcols = (int) pal_dims[0];
+
+ for (i = 0, j = 0 ; i < numcols ; j+=3, i++)
+ {
+ GlobalPalette[i][0] = pal[j];
+ GlobalPalette[i][1] = pal[j+1];
+ GlobalPalette[i][2] = pal[j+2];
+ }
+
+ free(pal);
+ }
+
+ H5Fclose(fid);
+
+ RWidth = (int)width;
+ RHeight = (int)height;
+
+
+ /*
+ * If the first image does not have a palette, I make my own global
+ * color table Obviously this is not the best thing to do, better
+ * steps would be:
+ *
+ * 1. Check for either a global palette or a global attribute called
+ * palette
+ * 2. Check for palettes in any of the other images.
+ */
+ if (!npals)
+ {
+ numcols = 256;
+ for (i = 0 ; i < numcols ; i++)
+ {
+ Red[i] = (BYTE)(255 - i);
+ Green[i] = (BYTE)(255 - i);
+ Blue[i] = (BYTE)(255 - i);
+ }
+ }
+ else
+ {
+ for (i = 0 ; i < numcols ; i++)
+ {
+ Red[i] = GlobalPalette[i][0];
+ Green[i] = GlobalPalette[i][1];
+ Blue[i] = GlobalPalette[i][2];
+ }
+ }
+
+ for (i = 0; i < numcols; i++)
+ {
+ pc2nc[i] = r1[i] = g1[i] = b1[i] = 0;
+ }
+
+ /* compute number of unique colors */
+ nc = 0;
+
+ for (i = 0; i < numcols; i++)
+ {
+ /* see if color #i is already used */
+ for (j = 0; j < i; j++)
+ {
+ if (Red[i] == Red[j] && Green[i] == Green[j] && Blue[i] == Blue[j])
+ break;
+ }
+
+ if (j==i)
+ {
+ /* wasn't found */
+ pc2nc[i] = (BYTE)nc;
+ r1[nc] = Red[i];
+ g1[nc] = Green[i];
+ b1[nc] = Blue[i];
+ nc++;
+ }
+ else
+ {
+ pc2nc[i] = pc2nc[j];
+ }
+ }
+
+ /* figure out 'BitsPerPixel' */
+ for (i = 1; i < 8; i++)
+ {
+ if ((1<<i) >= nc)
+ break;
+ }
+
+ BitsPerPixel = i;
+ ColorMapSize = 1 << BitsPerPixel;
+
+ if (BitsPerPixel <= 1)
+ InitCodeSize = 2;
+ else
+ InitCodeSize = BitsPerPixel;
+
+ if (!fpGif)
+ {
+ fprintf(stderr, "WriteGIF: file not open for writing\n" );
+ goto out;
+ }
+
+
+ fwrite("GIF87a", sizeof( char ), 6, fpGif); /* the GIF magic number */
+
+ putword(RWidth, fpGif); /* screen descriptor */
+ putword(RHeight, fpGif);
+
+ i = 0x00; /* No, there is no color map */
+ i |= (8-1)<<4; /* OR in the color resolution (hardwired 8) */
+ i |= (BitsPerPixel - 1); /* OR in the # of bits per pixel */
+ fputc(i,fpGif);
+
+ fputc(Background,fpGif); /* background color */
+ fputc(0, fpGif); /* future expansion byte */
+
+
+ /*
+ * Put Image Descriptor
+ * Hardwiring Left Offset and Top Offset to 0x00
+ */
+ fputc(0x2c , fpGif);
+ putword(0x00 , fpGif);
+ putword(0x00 , fpGif);
+ putword(RWidth , fpGif);
+ putword(RHeight , fpGif);
+
+ /* since we always have a local color palette ... */
+ fputc((0x80 | (BitsPerPixel - 1)) , fpGif);
+
+ for (i = 0; i < ColorMapSize; i++)
+ {
+ /* write out Global colormap */
+ fputc(r1[i], fpGif);
+ fputc(g1[i], fpGif);
+ fputc(b1[i], fpGif);
+ }
+
+ fputc(InitCodeSize , fpGif);
+
+ i = hdfWriteGIF(fpGif , Image , 0 , RHeight , RWidth , r1, g1 , b1 , pc2nc , 256 , 8 , BitsPerPixel);
+ fputc(0x00, fpGif);
+ free(Image);
+ }
+
+ if (fputc(';',fpGif) == EOF)
+ {
+ /* Write GIF file terminator */
+ fprintf(stderr , "Error!");
+ goto out;
+ }
+
+ if (fpGif != NULL)
+ fclose(fpGif);
+ if (image_name != NULL)
+ free(image_name);
+
+ H5Eset_auto2(H5E_DEFAULT, func, edata);
+
+ return EXIT_SUCCESS;
+
+
+out:
+
+ if (fpGif != NULL)
+ fclose(fpGif);
+ if (image_name != NULL)
+ free(image_name);
+
+ H5Eset_auto2(H5E_DEFAULT, func, edata);
+
+ return EXIT_FAILURE;
+}
diff --git a/hl/tools/gif2h5/hdfgifwr.c b/hl/tools/gif2h5/hdfgifwr.c
new file mode 100644
index 0000000..6f5ab58
--- /dev/null
+++ b/hl/tools/gif2h5/hdfgifwr.c
@@ -0,0 +1,455 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * hdfgifwr.c - handles writing of GIF files.
+ *
+ * Contains:
+ * hdfWriteGIF(fp, pic, ptype, w, h, rmap, gmap, bmap, numcols, colorstyle,
+ * comment)
+ *
+ * Note: slightly brain-damaged, in that it'll only write non-interlaced
+ * GIF files (in the interests of speed, or something)
+ */
+
+/*****************************************************************
+ * Portions of this code Copyright (C) 1989 by Michael Mauldin.
+ * Permission is granted to use this file in whole or in
+ * part for any purpose, educational, recreational or commercial,
+ * provided that this copyright notice is retained unchanged.
+ * This software is available to all free of charge by anonymous
+ * FTP and in the UUNET archives.
+ *
+ *
+ * Authors: Michael Mauldin (mlm@cs.cmu.edu)
+ * David Rowley (mgardi@watdcsu.waterloo.edu)
+ *
+ * Based on: compress.c - File compression ala IEEE Computer, June 1984.
+ *
+ * Spencer W. Thomas (decvax!harpo!utah-cs!utah-gr!thomas)
+ * Jim McKie (decvax!mcvax!jim)
+ * Steve Davies (decvax!vax135!petsd!peora!srd)
+ * Ken Turkowski (decvax!decwrl!turtlevax!ken)
+ * James A. Woods (decvax!ihnp4!ames!jaw)
+ * Joe Orost (decvax!vax135!petsd!joe)
+ *****************************************************************/
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "gif.h"
+
+typedef BYTE byte;
+typedef long int count_int;
+
+#ifdef __STDC__
+static void compress(int, FILE *, byte *, int);
+static void output(int);
+static void cl_block(void);
+static void cl_hash(count_int);
+static void char_init(void);
+static void char_out(int);
+static void flush_char(void);
+#else
+static void compress(), output(), cl_block(), cl_hash();
+static void char_init(), char_out(), flush_char();
+#endif /* __STDC__ */
+
+static byte pc2nc[256];
+
+/*************************************************************/
+int hdfWriteGIF(FILE *fp, byte *pic, int ptype, int w, int h, byte *rmap,
+ byte *gmap, byte *bmap, byte *pc2ncmap, int numcols,
+ int colorstyle, int BitsPerPixel)
+{
+ int InitCodeSize;
+ int i;
+ byte *pic8 = pic;
+
+ /* Shut compiler up... */
+ ptype=ptype;
+ rmap=rmap;
+ gmap=gmap;
+ bmap=bmap;
+ numcols=numcols;
+ colorstyle=colorstyle;
+
+ for (i = 0; i < 256; i++) {
+ pc2nc[i] = pc2ncmap[i];
+ }
+
+ if (BitsPerPixel <= 1)
+ InitCodeSize = 2;
+ else
+ InitCodeSize = BitsPerPixel;
+
+ if (!fp) {
+ fprintf(stderr, "WriteGIF: file not open for writing\n" );
+ return (1);
+ }
+
+ compress(InitCodeSize+1, fp, pic8, w*h);
+
+ if (ferror(fp))
+ return -1;
+
+ return 0 ;
+}
+
+/***********************************************************************/
+static unsigned long cur_accum = 0;
+static int cur_bits = 0;
+
+#define MAXCODE(n_bits) ( (1 << (n_bits)) - 1)
+#define XV_BITS 12 /* BITS was already defined on some systems */
+#define HSIZE 5003 /* 80% occupancy */
+
+typedef unsigned char char_type;
+
+static int n_bits; /* number of bits/code */
+static int maxbits = XV_BITS; /* user settable max # bits/code */
+static int maxcode; /* maximum code, given n_bits */
+static int maxmaxcode = 1 << XV_BITS; /* NEVER generate this */
+
+static count_int htab [HSIZE];
+static unsigned short codetab [HSIZE];
+
+#define HashTabOf(i) htab[i]
+#define CodeTabOf(i) codetab[i]
+
+static int hsize = HSIZE; /* for dynamic table sizing */
+
+/*
+ * To save much memory, we overlay the table used by compress() with those
+ * used by decompress(). The tab_prefix table is the same size and type as
+ * the codetab. The tab_suffix table needs 2**BITS characters. We get this
+ * from the beginning of htab. The output stack uses the rest of htab, and
+ * contains characters. There is plenty of room for any possible stack (stack
+ * used to be 8000 characters).
+ */
+
+static int free_ent = 0; /* first unused entry */
+
+/*
+ * block compression parameters -- after all codes are used up,
+ * and compression rate changes, start over.
+ */
+static int clear_flg = 0;
+
+static long int in_count = 1; /* length of input */
+static long int out_count = 0; /* # of codes output (for debugging) */
+
+/*
+ * compress stdin to stdout
+ *
+ * Algorithm: use open addressing double hashing (no chaining) on the prefix
+ * code / next character combination. We do a variant of Knuth's algorithm D
+ * (vol. 3, sec. 6.4) along with G. Knott's relatively-prime secondary probe.
+ * Here, the modular division first probe is gives way to a faster
+ * exclusive-or manipulation. Also do block compression with an adaptive
+ * reset, whereby the code table is cleared when the compression ratio
+ * decreases, but after the table fills. The variable-length output codes are
+ * re-sized at this point, and a special CLEAR code is generated for the
+ * decompressor. Late addition: construct the table according to file size
+ * for noticeable speed improvement on small files. Please direct questions
+ * about this implementation to ames!jaw.
+ */
+
+static int g_init_bits;
+static FILE *g_outfile;
+
+static int ClearCode;
+static int EOFCode;
+
+/********************************************************/
+static void compress(int init_bits, FILE *outfile, byte *data, int len)
+{
+ register long fcode;
+ register int i = 0;
+ register int c;
+ register int ent;
+ register int disp;
+ register int hsize_reg;
+ register int hshift;
+
+ /*
+ * Set up the globals: g_init_bits - initial number of bits g_outfile -
+ * pointer to output file
+ */
+ g_init_bits = init_bits;
+ g_outfile = outfile;
+
+ /* initialize 'compress' globals */
+ maxbits = XV_BITS;
+ maxmaxcode = 1<<XV_BITS;
+ memset(htab, 0, sizeof(htab));
+ memset(codetab, 0, sizeof(codetab));
+ hsize = HSIZE;
+ free_ent = 0;
+ clear_flg = 0;
+ in_count = 1;
+ out_count = 0;
+ cur_accum = 0;
+ cur_bits = 0;
+
+ /* Set up the necessary values */
+ out_count = 0;
+ clear_flg = 0;
+ in_count = 1;
+ maxcode = MAXCODE(n_bits = g_init_bits);
+
+ ClearCode = (1 << (init_bits - 1));
+ EOFCode = ClearCode + 1;
+ free_ent = ClearCode + 2;
+
+ char_init();
+ ent = pc2nc[*data++];
+ len--;
+
+ hshift = 0;
+ for (fcode = (long)hsize; fcode < 65536L; fcode *= 2L )
+ hshift++;
+
+ hshift = 8 - hshift; /* set hash code range bound */
+
+ hsize_reg = hsize;
+ cl_hash( (count_int) hsize_reg); /* clear hash table */
+
+ output(ClearCode);
+
+ while (len) {
+ c = pc2nc[*data++];
+ len--;
+ in_count++;
+
+ fcode = (long)(((long) c << maxbits) + ent);
+ i = (((int) c << hshift) ^ ent); /* xor hashing */
+
+ if ( HashTabOf (i) == fcode ) {
+ ent = CodeTabOf (i);
+ continue;
+ } else if ( (long)HashTabOf (i) < 0) {
+ /* empty slot */
+ goto nomatch;
+ }
+
+ disp = hsize_reg - i; /* secondary hash (after G. Knott) */
+
+ if ( i == 0 )
+ disp = 1;
+
+probe:
+ if ((i -= disp) < 0)
+ i += hsize_reg;
+
+ if (HashTabOf (i) == fcode) {
+ ent = CodeTabOf (i);
+ continue;
+ }
+
+ if ((long)HashTabOf (i) >= 0)
+ goto probe;
+
+nomatch:
+ output(ent);
+ out_count++;
+ ent = c;
+
+ if (free_ent < maxmaxcode) {
+ CodeTabOf (i) = (unsigned short)free_ent++; /* code -> hashtable */
+ HashTabOf (i) = fcode;
+ } else {
+ cl_block();
+ }
+ }
+
+ /* Put out the final code */
+ output(ent);
+ out_count++;
+ output(EOFCode);
+}
+
+
+/*****************************************************************
+ * TAG( output )
+ *
+ * Output the given code.
+ * Inputs:
+ * code: A n_bits-bit integer. If == -1, then EOF. This assumes
+ * that n_bits =< (long)wordsize - 1.
+ * Outputs:
+ * Outputs code to the file.
+ * Assumptions:
+ * Chars are 8 bits long.
+ * Algorithm:
+ * Maintain a BITS character long buffer (so that 8 codes will
+ * fit in it exactly). Use the VAX insv instruction to insert each
+ * code in turn. When the buffer fills up empty it and start over.
+ */
+
+static
+unsigned long masks[] = { 0x0000, 0x0001, 0x0003, 0x0007, 0x000F,
+ 0x001F, 0x003F, 0x007F, 0x00FF,
+ 0x01FF, 0x03FF, 0x07FF, 0x0FFF,
+ 0x1FFF, 0x3FFF, 0x7FFF, 0xFFFF };
+
+static void
+output(int code)
+{
+ cur_accum &= masks[cur_bits];
+
+ if (cur_bits > 0)
+ cur_accum |= (unsigned long)((long)code << cur_bits);
+ else
+ cur_accum = (unsigned long)code;
+
+ cur_bits += n_bits;
+
+ while( cur_bits >= 8 ) {
+ char_out( (int)((unsigned int) cur_accum & 0xff) );
+ cur_accum >>= 8;
+ cur_bits -= 8;
+ }
+
+ /*
+ * If the next entry is going to be too big for the code size, then
+ * increase it, if possible.
+ */
+ if (free_ent > maxcode || clear_flg) {
+ if (clear_flg) {
+ maxcode = MAXCODE (n_bits = g_init_bits);
+ clear_flg = 0;
+ } else {
+ n_bits++;
+
+ if ( n_bits == maxbits )
+ maxcode = maxmaxcode;
+ else
+ maxcode = MAXCODE(n_bits);
+ }
+ }
+
+ if (code == EOFCode) {
+ /* At EOF, write the rest of the buffer */
+ while( cur_bits > 0 ) {
+ char_out( (int)((unsigned int)cur_accum & 0xff) );
+ cur_accum >>= 8;
+ cur_bits -= 8;
+ }
+
+ flush_char();
+ fflush( g_outfile );
+
+#ifdef FOO
+ if(ferror( g_outfile))
+ FatalError("unable to write GIF file");
+#endif
+ }
+}
+
+/********************************/
+static void
+cl_block(void) /* table clear for block compress */
+{
+ /* Clear out the hash table */
+ cl_hash((count_int) hsize);
+ free_ent = ClearCode + 2;
+ clear_flg = 1;
+ output(ClearCode);
+}
+
+/********************************/
+static void
+cl_hash(count_int hashsize) /* reset code table */
+{
+ count_int *htab_p = htab+hashsize;
+ long i, m1 = -1;
+
+ i = hashsize - 16;
+
+ do { /* might use Sys V memset(3) here */
+ *(htab_p-16) = m1;
+ *(htab_p-15) = m1;
+ *(htab_p-14) = m1;
+ *(htab_p-13) = m1;
+ *(htab_p-12) = m1;
+ *(htab_p-11) = m1;
+ *(htab_p-10) = m1;
+ *(htab_p-9) = m1;
+ *(htab_p-8) = m1;
+ *(htab_p-7) = m1;
+ *(htab_p-6) = m1;
+ *(htab_p-5) = m1;
+ *(htab_p-4) = m1;
+ *(htab_p-3) = m1;
+ *(htab_p-2) = m1;
+ *(htab_p-1) = m1;
+ htab_p -= 16;
+ } while ((i -= 16) >= 0);
+
+ for ( i += 16; i > 0; i-- )
+ *--htab_p = m1;
+}
+
+/******************************************************************************
+ *
+ * GIF Specific routines
+ *
+ ******************************************************************************/
+
+/*
+ * Number of characters so far in this 'packet'
+ */
+static int a_count;
+
+/*
+ * Set up the 'byte output' routine
+ */
+static void
+char_init(void)
+{
+ a_count = 0;
+}
+
+/*
+ * Define the storage for the packet accumulator
+ */
+static char accum[ 256 ];
+
+/*
+ * Add a character to the end of the current packet, and if it is 254
+ * characters, flush the packet to disk.
+ */
+static void
+char_out(int c)
+{
+ accum[ a_count++ ] = (char)c;
+
+ if (a_count >= 254)
+ flush_char();
+}
+
+/*
+ * Flush the packet to disk, and reset the accumulator
+ */
+static void
+flush_char(void)
+{
+ if (a_count > 0) {
+ fputc( a_count, g_outfile );
+ fwrite( accum, (size_t)1, (size_t)a_count, g_outfile);
+ a_count = 0;
+ }
+}
diff --git a/hl/tools/gif2h5/testfiles/README b/hl/tools/gif2h5/testfiles/README
new file mode 100644
index 0000000..a428d47
--- /dev/null
+++ b/hl/tools/gif2h5/testfiles/README
@@ -0,0 +1,6 @@
+ex_image2.h5
+ Generated by hl/examples/ex_image2.c
+5giftst.h5:
+ Generated by ../h52gifgentst.c
+image1.gif:
+ To be determined.
diff --git a/hl/tools/gif2h5/testfiles/ex_image2.h5 b/hl/tools/gif2h5/testfiles/ex_image2.h5
new file mode 100644
index 0000000..a36df1b
--- /dev/null
+++ b/hl/tools/gif2h5/testfiles/ex_image2.h5
Binary files differ
diff --git a/hl/tools/gif2h5/testfiles/h52giftst.h5 b/hl/tools/gif2h5/testfiles/h52giftst.h5
new file mode 100644
index 0000000..a827b3b
--- /dev/null
+++ b/hl/tools/gif2h5/testfiles/h52giftst.h5
Binary files differ
diff --git a/hl/tools/gif2h5/testfiles/image1.gif b/hl/tools/gif2h5/testfiles/image1.gif
new file mode 100644
index 0000000..b90b23a
--- /dev/null
+++ b/hl/tools/gif2h5/testfiles/image1.gif
Binary files differ
diff --git a/hl/tools/gif2h5/writehdf.c b/hl/tools/gif2h5/writehdf.c
new file mode 100644
index 0000000..b656c36
--- /dev/null
+++ b/hl/tools/gif2h5/writehdf.c
@@ -0,0 +1,124 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+#include <string.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "gif.h"
+#include "H5IMpublic.h"
+
+#define PAL_NAME "global"
+
+/*-------------------------------------------------------------------------
+ * Function: WriteHDF
+ *
+ * Purpose: Write the GIF image with the HDF5 Image API
+ *
+ * Programmer: Unknown
+ *
+ * Modifications: pvn
+ * Use the HDF5 IMAGE API to write the HDF5 image and pallete
+ *
+ * Date: January, 31, 2006
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int
+WriteHDF(GIFTOMEM GifMemoryStruct, char *HDFName)
+{
+ GIFHEAD gifHead; /* GIF Header structure */
+ GIFIMAGEDESC *gifImageDesc; /* Logical Image Descriptor struct */
+ int has_pal=0;
+
+ long ImageCount; /* number of images */
+#ifdef UNUSED
+ long CommentCount, /* number of comments */
+ ApplicationCount, /* number of application extensions */
+ PlainTextCount; /* number of plain text extensions */
+#endif /* UNUSED */
+
+ char ImageName[256]; /* Image name for the Image */
+
+ /* H5 variables */
+ hid_t file_id; /* H5 file id */
+
+ /* temp counter */
+ int i;
+
+ /* get the GIFMem stuff */
+ gifHead = *(GifMemoryStruct.GifHeader);
+
+ /* get some data from gifHead */
+ ImageCount = gifHead.ImageCount;
+#ifdef UNUSED
+ CommentCount = (WORD)gifHead.CommentCount;
+ ApplicationCount = (WORD)gifHead.ApplicationCount;
+ PlainTextCount = (WORD)gifHead.PlainTextCount;
+#endif /* UNUSED */
+
+ if ((file_id = H5Fcreate(HDFName , H5F_ACC_TRUNC , H5P_DEFAULT , H5P_DEFAULT)) < 0) {
+ /* error occured opening the HDF File for write */
+ fprintf(stderr , "HDF file could not be opened for writing\n");
+ fprintf(stderr , "NOTE: GIF file must be present in the same directory as the binary on UNIX systems.\n");
+ exit(1);
+ }
+
+ /* first create the global palette if there is one */
+ if (gifHead.PackedField & 0x80) { /* global palette exists */
+ hsize_t dims[2]; /* specify the dimensions of the palette */
+
+ /* size of the palette is tablesize (rows) X 3 (columns) */
+ dims[0] = gifHead.TableSize;
+ dims[1] = 3;
+
+ /* make a palette */
+ if (H5IMmake_palette(file_id,PAL_NAME,dims,(unsigned char *)gifHead.HDFPalette)<0)
+ return -1;
+
+ has_pal=1;
+ }
+
+ for(i = 0; i < ImageCount; i++) {
+ hsize_t dims[2]; /* dimensions for the dataset */
+ /* get the gifImageDesc */
+ gifImageDesc = GifMemoryStruct.GifImageDesc[i];
+
+ /* set the dimensions */
+ dims[0] = gifImageDesc->ImageHeight;
+ dims[1] = gifImageDesc->ImageWidth;
+
+ /* create the image name */
+ sprintf(ImageName , "Image%d" , i);
+
+ /* write image */
+ if (H5IMmake_image_8bit(file_id,ImageName,dims[1],dims[0],(gifImageDesc->Image))<0)
+ return -1;
+
+ /* attach the palette to the image dataset */
+ if (has_pal)
+ {
+ if (H5IMlink_palette(file_id,ImageName,PAL_NAME)<0)
+ return -1;
+ }
+ }
+
+ /* close the H5 file */
+ if (H5Fclose(file_id) < 0) {
+ fprintf(stderr , "Could not close HDF5 file. Aborting...\n");
+ return -1;
+ }
+
+ return 0;
+}
+
diff --git a/hl/tools/h5watch/CMakeLists.txt b/hl/tools/h5watch/CMakeLists.txt
new file mode 100644
index 0000000..fde40e3
--- /dev/null
+++ b/hl/tools/h5watch/CMakeLists.txt
@@ -0,0 +1,65 @@
+cmake_minimum_required (VERSION 3.2.2)
+PROJECT (HDF5_HL_TOOLS_H5WATCH)
+
+#-----------------------------------------------------------------------------
+# Define Sources
+#-----------------------------------------------------------------------------
+set (H5WATCH_SOURCES
+ ${HDF5_HL_TOOLS_H5WATCH_SOURCE_DIR}/h5watch
+)
+
+#-- Add h5watch program
+include_directories (${HDF5_TOOLS_DIR}/lib)
+include_directories (${HDF5_HL_TOOLS_DIR}/src)
+include_directories (${HDF5_HL_TOOLS_H5WATCH_SOURCE_DIR})
+
+add_executable (h5watch ${H5WATCH_SOURCES})
+TARGET_NAMING (h5watch STATIC)
+TARGET_C_PROPERTIES (h5watch STATIC " " " ")
+target_link_libraries (h5watch ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
+set_target_properties (h5watch PROPERTIES FOLDER tools/hl)
+
+if (BUILD_TESTING)
+ include_directories (${HDF5_TEST_SRC_DIR})
+ include_directories(${HDF5_HL_SRC_DIR}/test)
+ #-- Add swmr_check_compat_vfd program
+ set (hl_swmr_check_compat_vfd_SOURCES
+ ${HDF5_HL_TOOLS_H5WATCH_SOURCE_DIR}/swmr_check_compat_vfd.c
+ )
+ add_executable (hl_swmr_check_compat_vfd ${hl_swmr_check_compat_vfd_SOURCES})
+ TARGET_NAMING (hl_swmr_check_compat_vfd STATIC)
+ TARGET_C_PROPERTIES (hl_swmr_check_compat_vfd STATIC " " " ")
+ target_link_libraries (hl_swmr_check_compat_vfd ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
+ set_target_properties (hl_swmr_check_compat_vfd PROPERTIES FOLDER tools/hl)
+
+ #-- Add extend_dset program
+ set (extend_dset_SOURCES
+ ${HDF5_HL_TOOLS_H5WATCH_SOURCE_DIR}/extend_dset.c
+ )
+ add_executable (extend_dset ${extend_dset_SOURCES})
+ TARGET_NAMING (extend_dset STATIC)
+ TARGET_C_PROPERTIES (extend_dset STATIC " " " ")
+ target_link_libraries (extend_dset ${HDF5_HL_LIB_TARGET} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
+ set_target_properties (extend_dset PROPERTIES FOLDER tools/hl)
+
+ add_executable (h5watchgentest ${HDF5_HL_TOOLS_H5WATCH_SOURCE_DIR}/h5watchgentest.c)
+ TARGET_NAMING (h5watchgentest STATIC)
+ TARGET_C_PROPERTIES (h5watchgentest STATIC " " " ")
+ target_link_libraries (h5watchgentest ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET})
+ set_target_properties (h5watchgentest PROPERTIES FOLDER generator/tools/hl)
+
+ include (CMakeTests.cmake)
+endif ()
+
+#-----------------------------------------------------------------------------
+# Add file(s) to CMake Install
+#-----------------------------------------------------------------------------
+if (HDF5_EXPORTED_TARGETS)
+ install (
+ TARGETS
+ h5watch
+ EXPORT
+ ${HDF5_EXPORTED_TARGETS}
+ RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT hltoolsapplications
+ )
+endif ()
diff --git a/hl/tools/h5watch/CMakeTests.cmake b/hl/tools/h5watch/CMakeTests.cmake
new file mode 100644
index 0000000..35e7829
--- /dev/null
+++ b/hl/tools/h5watch/CMakeTests.cmake
@@ -0,0 +1,188 @@
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+#
+
+##############################################################################
+##############################################################################
+### T E S T I N G ###
+##############################################################################
+##############################################################################
+
+set (H5WATCH_TEST_FILES
+ w-help1.ddl
+ w-err-cmpd1.ddl
+ w-err-cmpd2.ddl
+ w-err-cmpd3.ddl
+ w-err-cmpd4.ddl
+ w-err-cmpd5.ddl
+ w-err-dset1.ddl
+ w-err-dset2.ddl
+ w-err-dset-nomax.ddl
+ w-err-dset-none.ddl
+ w-err-file.ddl
+ w-err-poll.ddl
+ w-err-poll0.ddl
+ w-err-width.ddl
+ w-ext-cmpd.ddl
+ w-ext-cmpd-esc.ddl
+ w-ext-cmpd-esc-f1.ddl
+ w-ext-cmpd-esc-f3.ddl
+ w-ext-cmpd-esc-ff2.ddl
+ w-ext-cmpd-f1.ddl
+ w-ext-cmpd-f2.ddl
+ w-ext-cmpd-ff3.ddl
+ w-ext-cmpd-label.ddl
+ w-ext-cmpd-two.ddl
+ w-ext-cmpd-two-f1.ddl
+ w-ext-cmpd-two-f3.ddl
+ w-ext-cmpd-two-ff2.ddl
+ w-ext-early.ddl
+ w-ext-late.ddl
+ w-ext-one.ddl
+ w-ext-one-d.ddl
+ w-ext-one-simple.ddl
+ w-ext-two.ddl
+ w-ext-two-d.ddl
+ w-ext-two-width.ddl
+)
+
+# make test dir
+file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+add_custom_target(h5watch-files ALL COMMENT "Copying files needed by h5watch tests")
+
+foreach (h5watch_file ${H5WATCH_TEST_FILES})
+ set (dest "${PROJECT_BINARY_DIR}/testfiles/${h5watch_file}")
+ #message (STATUS " Copying ${h5watch_file}")
+ add_custom_command (
+ TARGET h5watch-files
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${HDF5_HL_TOOLS_DIR}/testfiles/${h5watch_file} ${dest}
+ )
+endforeach ()
+
+##############################################################################
+##############################################################################
+### T H E T E S T S M A C R O S ###
+##############################################################################
+##############################################################################
+
+ macro (ADD_H5_TEST resultfile resultcode)
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
+ NAME H5WATCH_ARGS-h5watch-${resultfile}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5watch>"
+ -D "TEST_ARGS:STRING=${ARGN}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
+ -D "TEST_OUTPUT=${resultfile}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=${resultfile}.ddl"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ set_tests_properties (H5WATCH_ARGS-h5watch-${resultfile} PROPERTIES DEPENDS ${last_test})
+ set (last_test "H5WATCH_ARGS-h5watch-${resultfile}")
+ endif ()
+ endmacro ()
+
+ macro (ADD_H5_WATCH resultfile resultcode)
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
+ NAME H5WATCH-${resultfile}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ${resultfile}.h5
+ )
+ set_tests_properties (H5WATCH-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ add_test (
+ NAME H5WATCH-${resultfile}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5watch>"
+ -D "TEST_ARGS:STRING=${ARGN}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
+ -D "TEST_OUTPUT=${resultfile}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=${resultfile}.txt"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ set_tests_properties (H5WATCH-${resultfile} PROPERTIES DEPENDS H5WATCH-${resultfile}-clear-objects)
+ endif ()
+ endmacro ()
+
+##############################################################################
+##############################################################################
+### T H E T E S T S ###
+##############################################################################
+##############################################################################
+
+# Check to see if the VFD specified by the HDF5_DRIVER environment variable
+# supports SWMR.
+set (SWMR_INCOMPAT ${hl_swmr_check_compat_vfd})
+
+if (NOT SWMR_INCOMPAT)
+# Remove any output file left over from previous test run
+ add_test (
+ NAME H5WATCH-clearall-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ WATCH.h5
+ )
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5WATCH-clearall-objects PROPERTIES DEPENDS ${last_test})
+ endif ()
+ set (last_test "H5WATCH-clearall-objects")
+
+#################################################################################################
+# #
+# WATCH.h5: file with various types of datasets for testing-- #
+# The following datasets are chunked, H5D_ALLOC_TIME_INCR, max. dimensional setting: #
+# DSET_ONE: one-dimensional dataset #
+# DSET_TWO: two-dimensional dataset #
+# DSET_CMPD: one-dimensional dataset with compound type #
+# DSET_CMPD_ESC: one-dimensional dataset with compound type & escape/separator characters #
+# DSET_CMPD_TWO: two-dimensional dataset with compound type #
+# #
+# The following datasets are one-dimensional, chunked, max. dimension setting: #
+# DSET_ALLOC_EARLY: dataset with H5D_ALLOC_TIME_EARLY #
+# DSET_ALLOC_LATE: dataset H5D_ALLOC_TIME_LATE #
+# #
+# The following datasets are one-dimensional: #
+# DSET_NONE: fixed dimension setting, contiguous, H5D_ALLOC_TIME_LATE #
+# DSET_NOMAX: fixed dimension setting, chunked, H5D_ALLOC_TIME_INCR #
+# #
+#################################################################################################
+# create the output files to be used.
+ add_test (NAME H5WATCH-h5watchgentest COMMAND $<TARGET_FILE:h5watchgentest>)
+ set_tests_properties (H5WATCH-h5watchgentest PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ set_tests_properties (H5WATCH-h5watchgentest PROPERTIES DEPENDS "H5WATCH-clearall-objects")
+ set (last_test "H5WATCH-h5watchgentest")
+
+# Test on --help options
+ ADD_H5_TEST (w-help1 0 --help)
+#
+# Tests on expected failures
+ ADD_H5_TEST (w-err-dset1 1 WATCH.h5)
+ ADD_H5_TEST (w-err-dset2 1 WATCH.h5/group/DSET_CMPD)
+ ADD_H5_TEST (w-err-dset-none 1 WATCH.h5/DSET_NONE)
+ ADD_H5_TEST (w-err-dset-nomax 1 WATCH.h5/DSET_NOMAX)
+ ADD_H5_TEST (w-err-file 1 ../WATCH.h5/DSET_CMPD)
+ ADD_H5_TEST (w-err-width 1 --width=-8 WATCH.h5/DSET_ONE)
+ ADD_H5_TEST (w-err-poll 1 --polling=-8 WATCH.h5/DSET_ONE)
+ ADD_H5_TEST (w-err-poll0 1 --polling=0 WATCH.h5/DSET_ONE)
+#
+# Tests on invalid field names via --fields option for a compound typed dataset: DSET_CMPD
+ ADD_H5_TEST (w-err-cmpd1 1 --fields=fieldx WATCH.h5/DSET_CMPD)
+ ADD_H5_TEST (w-err-cmpd2 1 --fields=field1,field2. WATCH.h5/DSET_CMPD)
+ ADD_H5_TEST (w-err-cmpd3 1 --fields=field1,field2, WATCH.h5/DSET_CMPD)
+ ADD_H5_TEST (w-err-cmpd4 1 --fields=field1,field2.b.k WATCH.h5/DSET_CMPD)
+ ADD_H5_TEST (w-err-cmpd5 1 --fields=field1 --fields=field2.b.k WATCH.h5/DSET_CMPD)
+#
+endif ()
diff --git a/hl/tools/h5watch/Makefile.am b/hl/tools/h5watch/Makefile.am
new file mode 100644
index 0000000..c60fceb
--- /dev/null
+++ b/hl/tools/h5watch/Makefile.am
@@ -0,0 +1,50 @@
+#
+# Copyright by The HDF Group.
+# Copyright by the Board of Trustees of the University of Illinois.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+##
+## Makefile.am
+## Run automake to generate a Makefile.in from this file.
+#
+# HDF5 Library Makefile(.in)
+#
+
+include $(top_srcdir)/config/commence.am
+
+# Include src and tools/lib directories
+AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib -I$(top_srcdir)/hl/src -I$(top_srcdir)/hl/test
+
+# These are our main targets, the tools
+TEST_SCRIPT=testh5watch.sh
+check_SCRIPTS=$(TEST_SCRIPT)
+SCRIPT_DEPEND=swmr_check_compat_vfd$(EXEEXT) extend_dset$(EXEEXT) h5watch$(EXEEXT)
+
+bin_PROGRAMS=h5watch
+noinst_PROGRAMS=swmr_check_compat_vfd h5watchgentest extend_dset
+
+# Add h5watch specific linker flags here
+h5watch_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS)
+
+# Programs all depend on the hdf5 library, the tools library, and the HL
+# library.
+LDADD=$(LIBH5_HL) $(LIBH5TOOLS) $(LIBHDF5)
+
+# Add extend_dset specific preprocessor flags here
+# (add the main test subdirectory to the include file path)
+extend_dset_CPPFLAGS=$(AM_CPPFLAGS) -I$(top_srcdir)/test
+# Add extend_dset specific library flags here
+# (add the main test library to the list of libraries)
+extend_dset_LDADD=$(LDADD) $(LIBH5TEST) $(LIBHDF5)
+
+#
+CHECK_CLEANFILES+=*.h5
+DISTCLEANFILES=testh5watch.sh
+
+include $(top_srcdir)/config/conclude.am
diff --git a/hl/tools/h5watch/Makefile.in b/hl/tools/h5watch/Makefile.in
new file mode 100644
index 0000000..3f91984
--- /dev/null
+++ b/hl/tools/h5watch/Makefile.in
@@ -0,0 +1,1529 @@
+# Makefile.in generated by automake 1.15 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+#
+# Copyright by The HDF Group.
+# Copyright by the Board of Trustees of the University of Illinois.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+#
+# HDF5 Library Makefile(.in)
+#
+
+VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+bin_PROGRAMS = h5watch$(EXEEXT)
+noinst_PROGRAMS = swmr_check_compat_vfd$(EXEEXT) \
+ h5watchgentest$(EXEEXT) extend_dset$(EXEEXT)
+TESTS = $(TEST_SCRIPT)
+subdir = hl/tools/h5watch
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \
+ $(top_srcdir)/m4/aclocal_fc.m4 \
+ $(top_srcdir)/m4/ax_check_class.m4 \
+ $(top_srcdir)/m4/ax_check_classpath.m4 \
+ $(top_srcdir)/m4/ax_check_java_home.m4 \
+ $(top_srcdir)/m4/ax_check_junit.m4 \
+ $(top_srcdir)/m4/ax_java_options.m4 \
+ $(top_srcdir)/m4/ax_jni_include_dir.m4 \
+ $(top_srcdir)/m4/ax_prog_jar.m4 \
+ $(top_srcdir)/m4/ax_prog_java.m4 \
+ $(top_srcdir)/m4/ax_prog_java_works.m4 \
+ $(top_srcdir)/m4/ax_prog_javac.m4 \
+ $(top_srcdir)/m4/ax_prog_javac_works.m4 \
+ $(top_srcdir)/m4/ax_prog_javadoc.m4 \
+ $(top_srcdir)/m4/ax_try_compile_java.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/H5config.h \
+ $(top_builddir)/fortran/src/H5config_f.inc
+CONFIG_CLEAN_FILES = testh5watch.sh
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS)
+extend_dset_SOURCES = extend_dset.c
+extend_dset_OBJECTS = extend_dset-extend_dset.$(OBJEXT)
+extend_dset_DEPENDENCIES = $(LDADD) $(LIBH5TEST) $(LIBHDF5)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 =
+h5watch_SOURCES = h5watch.c
+h5watch_OBJECTS = h5watch.$(OBJEXT)
+h5watch_LDADD = $(LDADD)
+h5watch_DEPENDENCIES = $(LIBH5_HL) $(LIBH5TOOLS) $(LIBHDF5)
+h5watch_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(h5watch_LDFLAGS) $(LDFLAGS) -o $@
+h5watchgentest_SOURCES = h5watchgentest.c
+h5watchgentest_OBJECTS = h5watchgentest.$(OBJEXT)
+h5watchgentest_LDADD = $(LDADD)
+h5watchgentest_DEPENDENCIES = $(LIBH5_HL) $(LIBH5TOOLS) $(LIBHDF5)
+swmr_check_compat_vfd_SOURCES = swmr_check_compat_vfd.c
+swmr_check_compat_vfd_OBJECTS = swmr_check_compat_vfd.$(OBJEXT)
+swmr_check_compat_vfd_LDADD = $(LDADD)
+swmr_check_compat_vfd_DEPENDENCIES = $(LIBH5_HL) $(LIBH5TOOLS) \
+ $(LIBHDF5)
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src
+depcomp = $(SHELL) $(top_srcdir)/bin/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo " CC " $@;
+am__v_CC_1 =
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo " CCLD " $@;
+am__v_CCLD_1 =
+SOURCES = extend_dset.c h5watch.c h5watchgentest.c \
+ swmr_check_compat_vfd.c
+DIST_SOURCES = extend_dset.c h5watch.c h5watchgentest.c \
+ swmr_check_compat_vfd.c
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+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
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+am__tty_colors_dummy = \
+ mgn= red= grn= lgn= blu= brg= std=; \
+ am__color_tests=no
+am__tty_colors = { \
+ $(am__tty_colors_dummy); \
+ if test "X$(AM_COLOR_TESTS)" = Xno; then \
+ am__color_tests=no; \
+ elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
+ am__color_tests=yes; \
+ elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
+ am__color_tests=yes; \
+ fi; \
+ if test $$am__color_tests = yes; then \
+ red=''; \
+ grn=''; \
+ lgn=''; \
+ blu=''; \
+ mgn=''; \
+ brg=''; \
+ 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
+am__test_logs1 = $(TESTS:=.log)
+am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log)
+TEST_LOGS = $(am__test_logs2:.sh.log=.log)
+SH_LOG_DRIVER = $(SHELL) $(top_srcdir)/bin/test-driver
+SH_LOG_COMPILE = $(SH_LOG_COMPILER) $(AM_SH_LOG_FLAGS) $(SH_LOG_FLAGS)
+am__set_b = \
+ case '$@' in \
+ */*) \
+ case '$*' in \
+ */*) b='$*';; \
+ *) b=`echo '$@' | sed 's/\.log$$//'`; \
+ esac;; \
+ *) \
+ b='$*';; \
+ esac
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/testh5watch.sh.in \
+ $(top_srcdir)/bin/depcomp $(top_srcdir)/bin/test-driver \
+ $(top_srcdir)/config/commence.am \
+ $(top_srcdir)/config/conclude.am
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ADD_PARALLEL_FILES = @ADD_PARALLEL_FILES@
+AMTAR = @AMTAR@
+
+# H5_CFLAGS holds flags that should be used when building hdf5,
+# but which should not be exported to h5cc for building other programs.
+# AM_CFLAGS is an automake construct which should be used by Makefiles
+# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
+# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well.
+AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
+
+# Include src and tools/lib directories
+AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@ -I$(top_srcdir)/src \
+ -I$(top_srcdir)/tools/lib -I$(top_srcdir)/hl/src \
+ -I$(top_srcdir)/hl/test
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
+AM_JAVACFLAGS = @AM_JAVACFLAGS@
+AM_JAVAFLAGS = @AM_JAVAFLAGS@
+AM_JNIFLAGS = @AM_JNIFLAGS@
+AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
+AR = @AR@
+ASSERTS = @ASSERTS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BUILD_MODE = @BUILD_MODE@
+BYTESEX = @BYTESEX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CC_VERSION = @CC_VERSION@
+CFLAGS = @CFLAGS@
+CODESTACK = @CODESTACK@
+CONFIG_DATE = @CONFIG_DATE@
+CONFIG_MODE = @CONFIG_MODE@
+CONFIG_USER = @CONFIG_USER@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CXX_VERSION = @CXX_VERSION@
+CYGPATH_W = @CYGPATH_W@
+DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
+DEV_WARNINGS = @DEV_WARNINGS@
+DIRECT_VFD = @DIRECT_VFD@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+EXTERNAL_FILTERS = @EXTERNAL_FILTERS@
+
+# Make sure that these variables are exported to the Makefiles
+F9XMODEXT = @F9XMODEXT@
+F9XMODFLAG = @F9XMODFLAG@
+F9XSUFFIXFLAG = @F9XSUFFIXFLAG@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FCFLAGS_f90 = @FCFLAGS_f90@
+FCLIBS = @FCLIBS@
+FC_VERSION = @FC_VERSION@
+FGREP = @FGREP@
+FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@
+FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
+FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
+FSEARCH_DIRS = @FSEARCH_DIRS@
+Fortran_COMPILER_ID = @Fortran_COMPILER_ID@
+GREP = @GREP@
+H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@
+H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@
+H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@
+H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@
+H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@
+H5_CFLAGS = @H5_CFLAGS@
+H5_CLASSPATH = @H5_CLASSPATH@
+H5_CPPFLAGS = @H5_CPPFLAGS@
+H5_CXXFLAGS = @H5_CXXFLAGS@
+H5_FCFLAGS = @H5_FCFLAGS@
+H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@
+H5_JAVACFLAGS = @H5_JAVACFLAGS@
+H5_JAVAFLAGS = @H5_JAVAFLAGS@
+H5_JNIFLAGS = @H5_JNIFLAGS@
+H5_LDFLAGS = @H5_LDFLAGS@
+H5_VERSION = @H5_VERSION@
+HADDR_T = @HADDR_T@
+HAVE_DMALLOC = @HAVE_DMALLOC@
+HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@
+HAVE_PTHREAD = @HAVE_PTHREAD@
+HDF5_HL = @HDF5_HL@
+HDF5_INTERFACES = @HDF5_INTERFACES@
+HDF_CXX = @HDF_CXX@
+HDF_FORTRAN = @HDF_FORTRAN@
+HDF_JAVA = @HDF_JAVA@
+HID_T = @HID_T@
+HL = @HL@
+HL_FOR = @HL_FOR@
+HSIZE_T = @HSIZE_T@
+HSSIZE_T = @HSSIZE_T@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+INTERNAL_DEBUG_OUTPUT = @INTERNAL_DEBUG_OUTPUT@
+JAR = @JAR@
+JAVA = @JAVA@
+JAVAC = @JAVAC@
+JAVACFLAGS = @JAVACFLAGS@
+JAVADOC = @JAVADOC@
+JAVAFLAGS = @JAVAFLAGS@
+JAVAPREFIX = @JAVAPREFIX@
+JAVA_JUNIT = @JAVA_JUNIT@
+JAVA_PATH_NAME = @JAVA_PATH_NAME@
+JAVA_VERSION = @JAVA_VERSION@
+JNIFLAGS = @JNIFLAGS@
+JUNIT = @JUNIT@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LL_PATH = @LL_PATH@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_STATIC_EXEC = @LT_STATIC_EXEC@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+METADATATRACEFILE = @METADATATRACEFILE@
+MKDIR_P = @MKDIR_P@
+MPE = @MPE@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
+OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@
+PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@
+PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@
+PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@
+PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@
+PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@
+PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@
+PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@
+PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@
+PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@
+PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@
+PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@
+PAC_FORTRAN_NUM_INTEGER_KINDS = @PAC_FORTRAN_NUM_INTEGER_KINDS@
+PARALLEL = @PARALLEL@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PROFILING = @PROFILING@
+RANLIB = @RANLIB@
+ROOT = @ROOT@
+RUNPARALLEL = @RUNPARALLEL@
+RUNSERIAL = @RUNSERIAL@
+R_INTEGER = @R_INTEGER@
+R_LARGE = @R_LARGE@
+SEARCH = @SEARCH@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SIZE_T = @SIZE_T@
+STATIC_EXEC = @STATIC_EXEC@
+STATIC_SHARED = @STATIC_SHARED@
+STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
+STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
+TESTPARALLEL = @TESTPARALLEL@
+TESTS_JUNIT = @TESTS_JUNIT@
+THREADSAFE = @THREADSAFE@
+TIME = @TIME@
+TR = @TR@
+TRACE_API = @TRACE_API@
+UNAME_INFO = @UNAME_INFO@
+USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@
+USE_FILTER_SZIP = @USE_FILTER_SZIP@
+USINGMEMCHECKER = @USINGMEMCHECKER@
+UUDECODE = @UUDECODE@
+VERSION = @VERSION@
+WORDS_BIGENDIAN = @WORDS_BIGENDIAN@
+_ACJNI_JAVAC = @_ACJNI_JAVAC@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+
+# Install directories that automake doesn't know about
+docdir = $(exec_prefix)/doc
+dvidir = @dvidir@
+enable_shared = @enable_shared@
+enable_static = @enable_static@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+# Shell commands used in Makefiles
+RM = rm -f
+CP = cp
+
+# Some machines need a command to run executables; this is that command
+# so that our tests will run.
+# We use RUNEXEC instead of RUNSERIAL directly because it may be that
+# some tests need to be run with a different command. Older versions
+# of the makefiles used the command
+# $(LIBTOOL) --mode=execute
+# in some directories, for instance.
+RUNEXEC = $(RUNSERIAL)
+
+# Libraries to link to while building
+LIBHDF5 = $(top_builddir)/src/libhdf5.la
+LIBH5TEST = $(top_builddir)/test/libh5test.la
+LIBH5F = $(top_builddir)/fortran/src/libhdf5_fortran.la
+LIBH5FTEST = $(top_builddir)/fortran/test/libh5test_fortran.la
+LIBH5CPP = $(top_builddir)/c++/src/libhdf5_cpp.la
+LIBH5JNI = $(top_builddir)/java/src/jni/libhdf5_java.la
+LIBH5TOOLS = $(top_builddir)/tools/lib/libh5tools.la
+LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
+LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
+LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
+
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
+
+# Scripts used to build examples
+# If only shared libraries have been installed, have h5cc build examples with
+# shared libraries instead of static libraries
+H5CC = ${DESTDIR}$(bindir)/h5cc
+H5CC_PP = ${DESTDIR}$(bindir)/h5pcc
+H5FC = ${DESTDIR}$(bindir)/h5fc
+H5FC_PP = ${DESTDIR}$(bindir)/h5pfc
+H5CPP = ${DESTDIR}$(bindir)/h5c++
+ACLOCAL_AMFLAGS = "-I m4"
+
+# The trace script; this is used on source files from the C library to
+# insert tracing macros.
+TRACE = perl $(top_srcdir)/bin/trace
+
+# .chkexe files are used to mark tests that have run successfully.
+# .chklog files are output from those tests.
+# *.clog and *.clog2 are from the MPE option.
+
+#
+CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 *.h5
+
+# These are our main targets, the tools
+TEST_SCRIPT = testh5watch.sh
+check_SCRIPTS = $(TEST_SCRIPT)
+SCRIPT_DEPEND = swmr_check_compat_vfd$(EXEEXT) extend_dset$(EXEEXT) h5watch$(EXEEXT)
+
+# Add h5watch specific linker flags here
+h5watch_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS)
+
+# Programs all depend on the hdf5 library, the tools library, and the HL
+# library.
+LDADD = $(LIBH5_HL) $(LIBH5TOOLS) $(LIBHDF5)
+
+# Add extend_dset specific preprocessor flags here
+# (add the main test subdirectory to the include file path)
+extend_dset_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/test
+# Add extend_dset specific library flags here
+# (add the main test library to the list of libraries)
+extend_dset_LDADD = $(LDADD) $(LIBH5TEST) $(LIBHDF5)
+DISTCLEANFILES = testh5watch.sh
+
+# Automake needs to be taught how to build lib, dyn, progs and tests targets.
+# These will be filled in automatically for the most part (e.g.,
+# lib_LIBRARIES are built for lib target), but EXTRA_LIB, EXTRA_PROG, and
+# EXTRA_TEST variables are supplied to allow the user to force targets to
+# be built at certain times.
+LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \
+ $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB)
+
+DYN = $(dyn_LTLIBRARIES)
+PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \
+ $(EXTRA_PROG)
+
+chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
+dyndir = $(libdir)
+TEST_EXTENSIONS = .sh
+SH_LOG_COMPILER = $(SHELL)
+AM_SH_LOG_FLAGS =
+TEST_PROG_CHKEXE = $(TEST_PROG:=.chkexe_)
+TEST_PROG_PARA_CHKEXE = $(TEST_PROG_PARA:=.chkexe_)
+TEST_SCRIPT_CHKSH = $(TEST_SCRIPT:=.chkexe_)
+TEST_SCRIPT_PARA_CHKSH = $(TEST_SCRIPT_PARA:=.chkexe_)
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .log .o .obj .sh .sh$(EXEEXT) .trs
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/commence.am $(top_srcdir)/config/conclude.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hl/tools/h5watch/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign hl/tools/h5watch/Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+$(top_srcdir)/config/commence.am $(top_srcdir)/config/conclude.am $(am__empty):
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+testh5watch.sh: $(top_builddir)/config.status $(srcdir)/testh5watch.sh.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
+ fi; \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed 's/$(EXEEXT)$$//' | \
+ while read p p1; do if test -f $$p \
+ || test -f $$p1 \
+ ; then echo "$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n;h' \
+ -e 's|.*|.|' \
+ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+ sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) files[d] = files[d] " " $$1; \
+ else { print "f", $$3 "/" $$4, $$1; } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-binPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+ -e 's/$$/$(EXEEXT)/' \
+ `; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+ @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+
+clean-noinstPROGRAMS:
+ @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+
+extend_dset$(EXEEXT): $(extend_dset_OBJECTS) $(extend_dset_DEPENDENCIES) $(EXTRA_extend_dset_DEPENDENCIES)
+ @rm -f extend_dset$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(extend_dset_OBJECTS) $(extend_dset_LDADD) $(LIBS)
+
+h5watch$(EXEEXT): $(h5watch_OBJECTS) $(h5watch_DEPENDENCIES) $(EXTRA_h5watch_DEPENDENCIES)
+ @rm -f h5watch$(EXEEXT)
+ $(AM_V_CCLD)$(h5watch_LINK) $(h5watch_OBJECTS) $(h5watch_LDADD) $(LIBS)
+
+h5watchgentest$(EXEEXT): $(h5watchgentest_OBJECTS) $(h5watchgentest_DEPENDENCIES) $(EXTRA_h5watchgentest_DEPENDENCIES)
+ @rm -f h5watchgentest$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(h5watchgentest_OBJECTS) $(h5watchgentest_LDADD) $(LIBS)
+
+swmr_check_compat_vfd$(EXEEXT): $(swmr_check_compat_vfd_OBJECTS) $(swmr_check_compat_vfd_DEPENDENCIES) $(EXTRA_swmr_check_compat_vfd_DEPENDENCIES)
+ @rm -f swmr_check_compat_vfd$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(swmr_check_compat_vfd_OBJECTS) $(swmr_check_compat_vfd_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/extend_dset-extend_dset.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5watch.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5watchgentest.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swmr_check_compat_vfd.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+extend_dset-extend_dset.o: extend_dset.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(extend_dset_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT extend_dset-extend_dset.o -MD -MP -MF $(DEPDIR)/extend_dset-extend_dset.Tpo -c -o extend_dset-extend_dset.o `test -f 'extend_dset.c' || echo '$(srcdir)/'`extend_dset.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/extend_dset-extend_dset.Tpo $(DEPDIR)/extend_dset-extend_dset.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='extend_dset.c' object='extend_dset-extend_dset.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(extend_dset_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o extend_dset-extend_dset.o `test -f 'extend_dset.c' || echo '$(srcdir)/'`extend_dset.c
+
+extend_dset-extend_dset.obj: extend_dset.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(extend_dset_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT extend_dset-extend_dset.obj -MD -MP -MF $(DEPDIR)/extend_dset-extend_dset.Tpo -c -o extend_dset-extend_dset.obj `if test -f 'extend_dset.c'; then $(CYGPATH_W) 'extend_dset.c'; else $(CYGPATH_W) '$(srcdir)/extend_dset.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/extend_dset-extend_dset.Tpo $(DEPDIR)/extend_dset-extend_dset.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='extend_dset.c' object='extend_dset-extend_dset.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(extend_dset_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o extend_dset-extend_dset.obj `if test -f 'extend_dset.c'; then $(CYGPATH_W) 'extend_dset.c'; else $(CYGPATH_W) '$(srcdir)/extend_dset.c'; fi`
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.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; }; \
+ 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; \
+ else \
+ echo "$@: invalid 'result_count' usage" >&2; exit 4; \
+ fi; \
+ shift; \
+ desc=$$1 count=$$2; \
+ if test $$maybe_colorize = yes && test $$count -gt 0; then \
+ color_start=$$3 color_end=$$std; \
+ else \
+ color_start= color_end=; \
+ 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
+recheck: all $(check_SCRIPTS)
+ @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 $$?
+.sh.log:
+ @p='$<'; \
+ $(am__set_b); \
+ $(am__check_pre) $(SH_LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_SH_LOG_DRIVER_FLAGS) $(SH_LOG_DRIVER_FLAGS) -- $(SH_LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+@am__EXEEXT_TRUE@.sh$(EXEEXT).log:
+@am__EXEEXT_TRUE@ @p='$<'; \
+@am__EXEEXT_TRUE@ $(am__set_b); \
+@am__EXEEXT_TRUE@ $(am__check_pre) $(SH_LOG_DRIVER) --test-name "$$f" \
+@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
+@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_SH_LOG_DRIVER_FLAGS) $(SH_LOG_DRIVER_FLAGS) -- $(SH_LOG_COMPILE) \
+@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) $(check_SCRIPTS)
+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: check-am
+all-am: Makefile $(PROGRAMS) all-local
+installdirs:
+ for dir in "$(DESTDIR)$(bindir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "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:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool \
+ clean-noinstPROGRAMS mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool mostlyclean-local
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS
+
+.MAKE: check-am install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am all-local check check-TESTS \
+ check-am clean clean-binPROGRAMS clean-generic clean-libtool \
+ clean-noinstPROGRAMS cscopelist-am ctags ctags-am distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-binPROGRAMS install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool mostlyclean-local pdf \
+ pdf-am ps ps-am recheck tags tags-am uninstall uninstall-am \
+ uninstall-binPROGRAMS
+
+.PRECIOUS: Makefile
+
+
+# List all build rules defined by HDF5 Makefiles as "PHONY" targets here.
+# This tells the Makefiles that these targets are not files to be built but
+# commands that should be executed even if a file with the same name already
+# exists.
+.PHONY: build-check-clean build-check-p build-check-s build-lib build-progs \
+ build-tests check-clean check-install check-p check-s check-vfd \
+ install-doc lib progs tests uninstall-doc _exec_check-s _test help
+
+help:
+ @$(top_srcdir)/bin/makehelp
+
+# lib/progs/tests targets recurse into subdirectories. build-* targets
+# build files in this directory.
+build-dyn: $(DYN)
+build-lib: $(LIB)
+build-progs: $(LIB) $(PROGS)
+build-tests: $(LIB) $(PROGS) $(chk_TESTS)
+
+# General rule for recursive building targets.
+# BUILT_SOURCES contain targets that need to be built before anything else
+# in the directory (e.g., for Fortran type detection)
+lib dyn progs tests check-s check-p :: $(BUILT_SOURCES)
+ @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1;
+ @for d in X $(SUBDIRS); do \
+ if test $$d != X && test $$d != .; then \
+ (set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
+ fi; \
+ done
+
+# General rule for recursive cleaning targets. Like the rule above,
+# but doesn't require building BUILT_SOURCES.
+check-clean ::
+ @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1;
+ @for d in X $(SUBDIRS); do \
+ if test $$d != X && test $$d != .; then \
+ (set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
+ fi; \
+ done
+
+# Tell Automake to build tests when the user types `make all' (this is
+# not its default behavior). Also build EXTRA_LIB and EXTRA_PROG since
+# Automake won't build them automatically, either.
+all-local: $(EXTRA_LIB) $(EXTRA_PROG) $(chk_TESTS)
+
+# make install-doc doesn't do anything outside of doc directory, but
+# Makefiles should recognize it.
+# UPDATE: docs no longer reside in this build tree, so this target
+# is depreciated.
+install-doc uninstall-doc:
+ @echo "Nothing to be done."
+
+# clean up files generated by tests so they can be re-run.
+build-check-clean:
+ $(RM) -rf $(CHECK_CLEANFILES)
+
+# run check-clean whenever mostlyclean is run
+mostlyclean-local: build-check-clean
+
+# check-install is just a synonym for installcheck
+check-install: installcheck
+
+# Run each test in order, passing $(TEST_FLAGS) to the program.
+# Since tests are done in a shell loop, "make -i" does apply inside it.
+# Set HDF5_Make_Ignore to a non-blank string to ignore errors inside the loop.
+# The timestamps give a rough idea how much time the tests use.
+#
+# Note that targets in chk_TESTS (defined above) will be built when the user
+# types 'make tests' or 'make check', but only programs in TEST_PROG,
+# TEST_PROG_PARA, or TEST_SCRIPT will actually be executed.
+check-TESTS: test
+
+test _test:
+ @$(MAKE) build-check-s
+ @$(MAKE) build-check-p
+
+# Actual execution of check-s.
+build-check-s: $(LIB) $(PROGS) $(chk_TESTS)
+ @if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \
+ echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \
+ fi
+ @$(MAKE) $(AM_MAKEFLAGS) _exec_check-s
+ @if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \
+ echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` ended `date`===";\
+ fi
+
+_exec_check-s: $(TEST_PROG_CHKEXE) $(TEST_SCRIPT_CHKSH)
+
+# The dummy.chkexe here prevents the target from being
+# empty if there are no tests in the current directory.
+# $${log} is the log file.
+# $${tname} is the name of test.
+$(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_:
+ @if test "X$@" != "X.chkexe_" && test "X$@" != "Xdummy.chkexe_"; then \
+ tname=$(@:.chkexe_=)$(EXEEXT);\
+ log=$(@:.chkexe_=.chklog); \
+ echo "============================"; \
+ if $(top_srcdir)/bin/newer $(@:.chkexe_=.chkexe) $${tname}; then \
+ echo "No need to test $${tname} again."; \
+ else \
+ echo "============================" > $${log}; \
+ if test "X$(FORTRAN_API)" = "Xyes"; then \
+ echo "Fortran API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ elif test "X$(CXX_API)" = "Xyes"; then \
+ echo "C++ API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log};\
+ else \
+ echo "Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ fi; \
+ echo "============================" >> $${log}; \
+ srcdir="$(srcdir)" \
+ $(TIME) $(RUNEXEC) ./$${tname} $(TEST_FLAGS) >> $${log} 2>&1 \
+ && touch $(@:.chkexe_=.chkexe) || \
+ (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
+ (cat $${log} && false) || exit 1; \
+ echo "" >> $${log}; \
+ echo "Finished testing $${tname} $(TEST_FLAGS)" >> $${log}; \
+ echo "============================" >> $${log}; \
+ echo "Finished testing $${tname} $(TEST_FLAGS)"; \
+ cat $${log}; \
+ fi; \
+ fi
+
+# The dummysh.chkexe here prevents the target from being
+# empty if there are no tests in the current directory.
+# $${log} is the log file.
+# $${tname} is the name of test.
+$(TEST_SCRIPT_CHKSH) $(TEST_SCRIPT_PARA_CHKSH) dummysh.chkexe_:
+ @if test "X$@" != "X.chkexe_" && test "X$@" != "Xdummysh.chkexe_"; then \
+ cmd=$(@:.chkexe_=);\
+ tname=`basename $$cmd`;\
+ chkname=`basename $(@:.chkexe_=.chkexe)`;\
+ log=`basename $(@:.chkexe_=.chklog)`; \
+ echo "============================"; \
+ if $(top_srcdir)/bin/newer $${chkname} $$cmd $(SCRIPT_DEPEND); then \
+ echo "No need to test $${tname} again."; \
+ else \
+ echo "============================" > $${log}; \
+ if test "X$(FORTRAN_API)" = "Xyes"; then \
+ echo "Fortran API: Testing $${tname} $(TEST_FLAGS)"; \
+ echo "Fortran API: $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ elif test "X$(CXX_API)" = "Xyes"; then \
+ echo "C++ API: Testing $${tname} $(TEST_FLAGS)"; \
+ echo "C++ API: $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ else \
+ echo "Testing $${tname} $(TEST_FLAGS)"; \
+ echo "$${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ fi; \
+ echo "============================" >> $${log}; \
+ RUNSERIAL="$(RUNSERIAL)" RUNPARALLEL="$(RUNPARALLEL)" \
+ srcdir="$(srcdir)" \
+ $(TIME) $(SHELL) $$cmd $(TEST_FLAGS) >> $${log} 2>&1 \
+ && touch $${chkname} || \
+ (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
+ (cat $${log} && false) || exit 1; \
+ echo "" >> $${log}; \
+ echo "Finished testing $${tname} $(TEST_FLAGS)" >> $${log}; \
+ echo "============================" >> $${log}; \
+ echo "Finished testing $${tname} $(TEST_FLAGS)"; \
+ cat $${log}; \
+ fi; \
+ echo "============================"; \
+ fi
+
+# Actual execution of check-p.
+build-check-p: $(LIB) $(PROGS) $(chk_TESTS)
+ @if test -n "$(TEST_PROG_PARA)$(TEST_SCRIPT_PARA)"; then \
+ echo "===Parallel tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \
+ fi
+ @if test -n "$(TEST_PROG_PARA)"; then \
+ echo "**** Hint ****"; \
+ echo "Parallel test files reside in the current directory" \
+ "by default."; \
+ echo "Set HDF5_PARAPREFIX to use another directory. E.g.,"; \
+ echo " HDF5_PARAPREFIX=/PFS/user/me"; \
+ echo " export HDF5_PARAPREFIX"; \
+ echo " make check"; \
+ echo "**** end of Hint ****"; \
+ fi
+ @for test in $(TEST_PROG_PARA) dummy; do \
+ if test $$test != dummy; then \
+ $(MAKE) $(AM_MAKEFLAGS) $$test.chkexe_ \
+ RUNEXEC="$(RUNPARALLEL)" || exit 1; \
+ fi; \
+ done
+ @for test in $(TEST_SCRIPT_PARA) dummy; do \
+ if test $$test != dummy; then \
+ $(MAKE) $(AM_MAKEFLAGS) $$test.chkexe_ || exit 1; \
+ fi; \
+ done
+ @if test -n "$(TEST_PROG_PARA)$(TEST_SCRIPT_PARA)"; then \
+ echo "===Parallel tests in `echo ${PWD} | sed -e s:.*/::` ended `date`===";\
+ fi
+
+# Run test with different Virtual File Driver
+check-vfd: $(LIB) $(PROGS) $(chk_TESTS)
+ @for vfd in $(VFD_LIST) dummy; do \
+ if test $$vfd != dummy; then \
+ echo "============================"; \
+ echo "Testing Virtual File Driver $$vfd"; \
+ echo "============================"; \
+ $(MAKE) $(AM_MAKEFLAGS) check-clean || exit 1; \
+ HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \
+ fi; \
+ done
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/hl/tools/h5watch/extend_dset.c b/hl/tools/h5watch/extend_dset.c
new file mode 100644
index 0000000..957db10
--- /dev/null
+++ b/hl/tools/h5watch/extend_dset.c
@@ -0,0 +1,424 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+#include "h5hltest.h"
+
+/*
+ * Extending datasets in WATCH.h5 generated by h5watchgentest.c
+ */
+#define DSET_ONE "DSET_ONE"
+#define DSET_TWO "DSET_TWO"
+#define DSET_CMPD "DSET_CMPD"
+#define DSET_CMPD_ESC "DSET_CMPD_ESC"
+#define DSET_CMPD_TWO "DSET_CMPD_TWO"
+#define DSET_ALLOC_LATE "DSET_ALLOC_LATE"
+#define DSET_ALLOC_EARLY "DSET_ALLOC_EARLY"
+
+/* The message sent by this process (extend_dset) to the test script to start "h5watch" */
+#define WRITER_MESSAGE "writer_message"
+/* The message received from the test script to start extending dataset */
+#define READER_MESSAGE "reader_message"
+
+/* Size of data buffer */
+#define TEST_BUF_SIZE 100
+
+static herr_t extend_dset_two(const char *file, char *dname, int action1, int action2);
+static herr_t extend_dset_one(const char *file, char *dname, int action);
+
+
+/* Data structures for datasets with compound data type */
+typedef struct sub22_t {
+ unsigned int a;
+ unsigned int b;
+ unsigned int c;
+} sub22_t;
+
+typedef struct sub2_t {
+ unsigned int a;
+ sub22_t b;
+ unsigned int c;
+} sub2_t;
+
+typedef struct sub4_t {
+ unsigned int a;
+ unsigned int b;
+} sub4_t;
+
+typedef struct set_t {
+ unsigned int field1;
+ sub2_t field2;
+ double field3;
+ sub4_t field4;
+} set_t;
+
+/*
+ ***********************************************************************
+ *
+ * Extending a two-dimensional dataset by action1 and action2.
+ * --action1 and action2 can be a positive # or negative # or 0.
+ *
+ ***********************************************************************
+ */
+static herr_t
+extend_dset_two(const char *file, char *dname, int action1, int action2)
+{
+ hid_t fid = -1; /* file id */
+ hid_t fapl = -1; /* file access property list id */
+ hid_t did = -1; /* dataset id */
+ hid_t sid = -1; /* dataspace id */
+ hid_t dtid = -1; /* dataset's datatype id */
+ int ndims; /* # of dimension sizes */
+ unsigned i, j; /* local index variable */
+ hsize_t ext_dims[2]; /* new dimension sizes after extension */
+ hsize_t cur_dims[2]; /* current dimension sizes */
+ size_t dtype_size; /* size of the dataset's datatype */
+ unsigned num_elmts; /* number of elements in the dataset */
+ int *ibuf = NULL; /* buffer for storing retrieved elements (integer) */
+ set_t *cbuf = NULL; /* buffer for storing retrieved elemnets (compound) */
+
+ /* Allocate memory */
+ if(NULL == (ibuf = (int *)HDcalloc(TEST_BUF_SIZE, sizeof(int))))
+ goto error;
+ if(NULL == (cbuf = (set_t *)HDcalloc(TEST_BUF_SIZE, sizeof(set_t))))
+ goto error;
+
+ /* Create a copy of file access property list */
+ if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
+ goto error;
+
+ /* Set to use the latest library format */
+ if(H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
+ goto error;
+
+ /* Open the file and dataset with SWMR write */
+ if((fid = H5Fopen(file, H5F_ACC_RDWR|H5F_ACC_SWMR_WRITE, fapl)) < 0)
+ goto error;
+
+ if((did = H5Dopen2(fid, dname, H5P_DEFAULT)) < 0)
+ goto error;
+
+ /* Send message to the test script to start "h5watch" */
+ h5_send_message(WRITER_MESSAGE, NULL, NULL);
+
+ if((sid = H5Dget_space(did)) < 0)
+ goto error;
+
+ if((ndims = H5Sget_simple_extent_ndims(sid)) < 0)
+ goto error;
+
+ /* Get the size of the dataset's datatype */
+ if((dtype_size = H5LDget_dset_type_size(did, NULL)) == 0)
+ goto error;
+
+ /* Get the dataset's data type */
+ if((dtid = H5Tget_native_type(H5Dget_type(did), H5T_DIR_DEFAULT)) < 0)
+ goto error;
+
+ /* Wait for message from the test script to start extending dataset */
+ if(h5_wait_message(READER_MESSAGE) < 0)
+ goto error;
+
+ /* sleep to emulate about 2 seconds of application operation */
+ HDsleep(2);
+
+ /* Get current dimension sizes */
+ if(H5LDget_dset_dims(did, cur_dims) < 0)
+ goto error;
+
+ /* Set up the new extended dimension sizes */
+ ext_dims[0] = cur_dims[0] + (hsize_t)action1;
+ ext_dims[1] = cur_dims[1] + (hsize_t)action2;
+
+ /* Extend the dataset */
+ if(H5Dset_extent(did, ext_dims) < 0)
+ goto error;
+
+ num_elmts = 1;
+ for(j = 0; j < (unsigned)ndims; j++)
+ num_elmts *= (unsigned)ext_dims[j];
+
+ /* Compound type */
+ if(!HDstrcmp(dname, DSET_CMPD_TWO)) {
+
+ HDmemset(cbuf, 0, TEST_BUF_SIZE * sizeof(set_t));
+ for(j = 0; j < num_elmts; j++) {
+ cbuf[j].field1 = action1;
+ cbuf[j].field2.a = action1;
+ cbuf[j].field2.c = action1;
+ cbuf[j].field2.b.a = action1;
+ cbuf[j].field2.b.b = action1;
+ cbuf[j].field2.b.c = action1;
+ cbuf[j].field3 = action1;
+ cbuf[j].field4.a = action1;
+ cbuf[j].field4.b = action1;
+ } /* end for */
+
+ /* Write to the dataset */
+ if(H5Dwrite(did, dtid, H5S_ALL, H5S_ALL, H5P_DEFAULT, cbuf) < 0)
+ goto error;
+
+ } else { /* Integer type */
+ HDmemset(ibuf, 0, TEST_BUF_SIZE * sizeof(int));
+ for(j = 0; j < num_elmts; j++)
+ ibuf[j] = action1;
+
+ /* Write to the dataset */
+ if(H5Dwrite(did, dtid, H5S_ALL, H5S_ALL, H5P_DEFAULT, ibuf) < 0)
+ goto error;
+ } /* end if-else */
+
+ if(H5Dflush(did) < 0)
+ goto error;
+
+ /* Closing */
+ if(H5Tclose(dtid) < 0) goto error;
+ if(H5Dclose(did) < 0) goto error;
+ if(H5Pclose(fapl) < 0) goto error;
+ if(H5Fclose(fid) < 0) goto error;
+
+ if(ibuf) HDfree(ibuf);
+ if(cbuf) HDfree(cbuf);
+
+ return SUCCEED;
+
+error:
+ H5E_BEGIN_TRY
+ H5Tclose(dtid);
+ H5Dclose(did);
+ H5Pclose(fapl);
+ H5Fclose(fid);
+ H5E_END_TRY
+
+ if(ibuf)
+ HDfree(ibuf);
+ if(cbuf)
+ HDfree(cbuf);
+
+ return FAIL;
+
+} /* end extend_dset_two() */
+
+/*
+ ***********************************************************************
+ *
+ * Extending a one-dimensional dataset by action:
+ * --action can be a positive # or negative # or 0.
+ *
+ ***********************************************************************
+ */
+static herr_t
+extend_dset_one(const char *file, char *dname, int action)
+{
+ hid_t fid = -1; /* file id */
+ hid_t fapl = -1; /* file access property list id */
+ hid_t did = -1; /* dataset id */
+ hid_t dtid = -1; /* dataset's datatype id */
+ hid_t sid = -1; /* dataspace id */
+ hid_t mid = -1; /* memory space id */
+ unsigned i, j; /* local index variable */
+ hsize_t cur_dims[1]; /* current dimension sizes */
+ hsize_t ext_dims[1]; /* new dimension sizes after extension */
+ hsize_t offset[1]; /* starting offsets of appended data */
+ hsize_t count[1]; /* dimension sizes of appended data */
+ size_t dtype_size; /* size of the dataset's datatype */
+ int *ibuf = NULL; /* buffer for storing retrieved elements (integer) */
+ set_t *cbuf = NULL; /* buffer for storing retrieved elemnets (compound) */
+
+ /* Allocate memory */
+ if(NULL == (ibuf = (int *)HDcalloc(TEST_BUF_SIZE, sizeof(int))))
+ goto error;
+ if(NULL == (cbuf = (set_t *)HDcalloc(TEST_BUF_SIZE, sizeof(set_t))))
+ goto error;
+
+ /* Create a copy of file access property list */
+ if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
+ goto error;
+
+ /* Set to use the latest library format */
+ if(H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
+ goto error;
+
+ /* Open the file and dataset with SWMR write */
+ if((fid = H5Fopen(file, H5F_ACC_RDWR|H5F_ACC_SWMR_WRITE, fapl)) < 0)
+ goto error;
+
+ /* Send message to the test script to start "h5watch" */
+ h5_send_message(WRITER_MESSAGE, NULL, NULL);
+
+ if((did = H5Dopen2(fid, dname, H5P_DEFAULT)) < 0)
+ goto error;
+
+ /* Get size of the dataset's datatype */
+ if((dtype_size = H5LDget_dset_type_size(did, NULL)) == 0)
+ goto error;
+
+ /* Get dataset's datatype */
+ if((dtid = H5Tget_native_type(H5Dget_type(did), H5T_DIR_DEFAULT)) < 0)
+ goto error;
+
+ /* Wait for message from the test script to start extending dataset */
+ if(h5_wait_message(READER_MESSAGE) < 0)
+ goto error;
+
+ /* sleep to emulate about 2 seconds of application operation */
+ HDsleep(2);
+
+ /* Get current dimension sizes */
+ if(H5LDget_dset_dims(did, cur_dims) < 0)
+ goto error;
+
+ /* Set up the new extended dimension sizes */
+ ext_dims[0] = cur_dims[0] + (hsize_t)action;
+
+ /* Extend the dataset */
+ if(H5Dset_extent(did, ext_dims) < 0)
+ goto error;
+
+ /* Write to the new appended region of the dataset */
+ if(action > 0) {
+
+ /* Select the extended region */
+ offset[0] = cur_dims[0];
+ count[0] = (hsize_t)action;
+ if((sid = H5Dget_space(did)) < 0)
+ goto error;
+ if(H5Sselect_hyperslab(sid, H5S_SELECT_SET, offset, NULL, count, NULL) < 0)
+ goto error;
+
+ /* Set up memory space and get dataset's datatype */
+ if((mid = H5Screate_simple(1, count, NULL)) < 0)
+ goto error;
+
+ /* Initialize data for the extended region of the dataset */
+ /* Compound type */
+ if(!HDstrcmp(dname, DSET_CMPD) || !HDstrcmp(dname, DSET_CMPD_ESC)) {
+
+ HDmemset(cbuf, 0, TEST_BUF_SIZE * sizeof(set_t));
+ for(j = 0; j < (unsigned)action; j++) {
+ cbuf[j].field1 = j + 1;
+ cbuf[j].field2.a = j + 2;
+ cbuf[j].field2.b.a = j + 2;
+ cbuf[j].field2.b.b = j + 2;
+ cbuf[j].field2.b.c = j + 2;
+ cbuf[j].field2.c = j + 2;
+
+ cbuf[j].field3 = j + 3;
+
+ cbuf[j].field4.a = j + 4;
+ cbuf[j].field4.b = j + 4;
+ } /* end for */
+
+ /* Write to the extended region of the dataset */
+ if(H5Dwrite(did, dtid, mid, sid, H5P_DEFAULT, cbuf) < 0)
+ goto error;
+ } else { /* Integer type */
+
+ HDmemset(ibuf, 0, TEST_BUF_SIZE * sizeof(int));
+ for(j = 0; j < (unsigned)action; j++)
+ ibuf[j] = (int)j;
+
+ /* Write to the extended region of the dataset */
+ if(H5Dwrite(did, dtid, mid, sid, H5P_DEFAULT, ibuf) < 0)
+ goto error;
+ } /* end if-else */
+
+ /* Closing */
+ if(H5Sclose(sid) < 0) goto error;
+ if(H5Sclose(mid) < 0) goto error;
+ } /* end if */
+
+ if(H5Dflush(did) < 0)
+ goto error;
+
+ /* Closing */
+ if(H5Tclose(dtid) < 0) goto error;
+ if(H5Dclose(did) < 0) goto error;
+ if(H5Pclose(fapl) < 0) goto error;
+ if(H5Fclose(fid) < 0) goto error;
+
+ if(ibuf) HDfree(ibuf);
+ if(cbuf) HDfree(cbuf);
+
+ return SUCCEED;
+
+error:
+ H5E_BEGIN_TRY
+ H5Sclose(sid);
+ H5Sclose(mid);
+ H5Tclose(dtid);
+ H5Dclose(did);
+ H5Pclose(fapl);
+ H5Fclose(fid);
+ H5E_END_TRY
+
+ if(ibuf)
+ HDfree(ibuf);
+ if(cbuf)
+ HDfree(cbuf);
+
+ return FAIL;
+} /* end extend_dset_one() */
+
+
+/*
+ ***********************************************************************
+ *
+ * Usage: extend_dset xx.h5 dname action1 action2
+ * --action1 and action2 can be a positive # or negative # or 0.
+ *
+ ***********************************************************************
+ */
+int
+main(int argc, const char *argv[])
+{
+ char *dname = NULL;
+ char *fname = NULL;
+ int action1, action2;
+
+ if(argc != 5) {
+ HDfprintf(stderr, "Should have file name, dataset name, and the extended amount...\n");
+ goto error;
+ } /* end if */
+
+ /* Get the dataset name to be extended */
+ fname = HDstrdup(argv[1]);
+ dname = HDstrdup(argv[2]);
+ action1 = HDatoi(argv[3]);
+ action2 = HDatoi(argv[4]);
+
+ if(!HDstrcmp(dname, DSET_CMPD) || !HDstrcmp(dname, DSET_CMPD_ESC)) {
+ if(extend_dset_one(fname, dname, action1) < 0)
+ goto error;
+ } else if(!HDstrcmp(dname, DSET_ONE) ||
+ !HDstrcmp(dname, DSET_ALLOC_LATE) ||
+ !HDstrcmp(dname, DSET_ALLOC_EARLY)) {
+ if(extend_dset_one(fname, dname, action1) < 0)
+ goto error;
+ } else if(!HDstrcmp(dname, DSET_TWO) ||
+ !HDstrcmp(dname, DSET_CMPD_TWO)) {
+ if(extend_dset_two(fname, dname, action1, action2) < 0)
+ goto error;
+ } else {
+ HDfprintf(stdout, "Dataset cannot be extended...\n");
+ goto error;
+ } /* end if-else */
+
+ HDexit(EXIT_SUCCESS);
+
+error:
+ if(dname)
+ HDfree(dname);
+ if(fname)
+ HDfree(fname);
+ HDexit(EXIT_FAILURE);
+} /* end main() */
diff --git a/hl/tools/h5watch/h5watch.c b/hl/tools/h5watch/h5watch.c
new file mode 100644
index 0000000..11514b0
--- /dev/null
+++ b/hl/tools/h5watch/h5watch.c
@@ -0,0 +1,970 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+#include "h5tools.h"
+#include "h5tools_dump.h"
+#include "H5LDprivate.h"
+
+/*
+ * Note: This tool used private routine
+ */
+#define PROGRAMNAME "h5watch" /* Name of tool */
+#define FIELD_SEP "," /* nested field separator */
+#define DEFAULT_RETRY 50 /* number of times to try opening the file */
+
+
+/*
+ * Note:(see comments in hl/src/H5LDprivate.h)
+ * This tool uses private routines H5LD_construct_vector()and H5LD_clean_vector()
+ * This tool uses H5LD_memb_t data structure declared in H5LDprivate.h
+ */
+
+const char *progname = "h5watch"; /* tool name */
+static char *g_list_of_fields = NULL; /* command line input for "list_of_fields" */
+static char *g_dup_fields = NULL; /* copy of "list_of_fields" */
+static H5LD_memb_t **g_listv = NULL; /* vector info for "list_of_fields" */
+
+static hbool_t g_monitor_size_only = FALSE; /* monitor changes in dataset dimension sizes */
+static unsigned g_polling_interval = 1; /* polling interval to check appended data */
+
+static hbool_t g_label = FALSE; /* label compound values */
+static int g_display_width = 80; /* output width in characters */
+static hbool_t g_simple_output = FALSE; /* make output more machine-readable */
+static unsigned g_retry = DEFAULT_RETRY; /* # of times to try opening the file if somehow file is unstable */
+static hbool_t g_display_hex = FALSE; /* display data in hexadecimal format : LATER */
+static hbool_t g_user_interrupt = FALSE; /* Flag to indicate that user interrupted execution */
+
+static herr_t doprint(hid_t did, hsize_t *start, hsize_t *block, int rank);
+static herr_t slicendump(hid_t did, hsize_t *prev_dims, hsize_t *cur_dims,
+ hsize_t *start, hsize_t *block, int rank, int subrank);
+static herr_t monitor_dataset(hid_t fid, char *dsetname);
+static herr_t process_cmpd_fields(hid_t fid, char *dsetname);
+static herr_t check_dataset(hid_t fid, char *dsetname);
+static void leave(int ret);
+static void usage(const char *prog);
+static void parse_command_line(int argc, const char *argv[]);
+
+
+/*
+ * Command-line options: The user can only specify long-named parameters.
+ * The long-named ones can be partially spelled. When
+ * adding more, make sure that they don't clash with each other.
+ */
+static const char *s_opts ="?";
+static struct long_options l_opts[] = {
+ { "help", no_arg, 'h' },
+ { "hel", no_arg, 'h' },
+ { "dim", no_arg, 'd' },
+ { "di", no_arg, 'd' },
+ { "label", no_arg, 'l' },
+ { "labe", no_arg, 'l' },
+ { "lab", no_arg, 'l' },
+ { "la", no_arg, 'l' },
+ { "simple", no_arg, 'S' },
+ { "simpl", no_arg, 'S' },
+ { "simp", no_arg, 'S' },
+ { "sim", no_arg, 'S' },
+ { "si", no_arg, 'S' },
+ { "hexdump", no_arg, 'x' },
+ { "hexdum", no_arg, 'x' },
+ { "hexdu", no_arg, 'x' },
+ { "hexd", no_arg, 'x' },
+ { "hex", no_arg, 'x' },
+ { "width", require_arg, 'w' },
+ { "widt", require_arg, 'w' },
+ { "wid", require_arg, 'w' },
+ { "wi", require_arg, 'w' },
+ { "polling", require_arg, 'p' },
+ { "pollin", require_arg, 'p' },
+ { "polli", require_arg, 'p' },
+ { "poll", require_arg, 'p' },
+ { "pol", require_arg, 'p' },
+ { "po", require_arg, 'p' },
+ { "fields", require_arg, 'f' },
+ { "field", require_arg, 'f' },
+ { "fiel", require_arg, 'f' },
+ { "fie", require_arg, 'f' },
+ { "fi", require_arg, 'f' },
+ { "version", no_arg, 'V' },
+ { "versio", no_arg, 'V' },
+ { "versi", no_arg, 'V' },
+ { "vers", no_arg, 'V' },
+ { "ver", no_arg, 'V' },
+ { "ve", no_arg, 'V' },
+ { NULL, 0, '\0' }
+};
+
+/*-------------------------------------------------------------------------
+ * Function: doprint()
+ *
+ * Purpose: Prepare to print the dataset's appended data.
+ * Call the tools library routine h5tools_dump_dset() to do the printing.
+ * (This routine is mostly copied from dump_dataset_values() in tools/h5ls/h5ls.c
+ * and modified accordingly).
+ *
+ * Return: 0 on success; negative on failure
+ *
+ * Programmer: Vailin Choi; August 2010
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+doprint(hid_t did, hsize_t *start, hsize_t *block, int rank)
+{
+ h5tools_context_t ctx; /* print context */
+ h5tool_format_t info; /* Format info for the tools library */
+ static char fmt_double[16], fmt_float[16]; /* Format info */
+ struct subset_t subset; /* Subsetting info */
+ hsize_t ss_start[H5S_MAX_RANK]; /* Info for hyperslab */
+ hsize_t ss_stride[H5S_MAX_RANK]; /* Info for hyperslab */
+ hsize_t ss_block[H5S_MAX_RANK]; /* Info for hyperslab */
+ hsize_t ss_count[H5S_MAX_RANK]; /* Info for hyperslab */
+ int i; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ /* Subsetting information for the tools library printing routines */
+ subset.start.data = ss_start;
+ subset.stride.data = ss_stride;
+ subset.block.data = ss_block;
+ subset.count.data = ss_count;
+
+ /* Initialize subsetting information */
+ for(i = 0; i < rank; i++) {
+ subset.stride.data[i] = 1;
+ subset.count.data[i] = 1;
+ subset.start.data[i] = start[i];
+ subset.block.data[i] = block[i];
+ } /* end for */
+
+ HDmemset(&ctx, 0, sizeof(ctx));
+
+ /* Set to all default values and then override */
+ HDmemset(&info, 0, sizeof info);
+
+ if(g_simple_output) {
+ info.idx_fmt = "";
+ info.line_ncols = 65535; /*something big*/
+ info.line_per_line = 1;
+ info.line_multi_new = 0;
+ info.line_pre = " ";
+ info.line_cont = " ";
+
+ info.arr_pre = "";
+ info.arr_suf = "";
+ info.arr_sep = " ";
+
+ info.cmpd_pre = "";
+ info.cmpd_suf = "";
+ info.cmpd_sep = " ";
+
+ /* The "fields" selected by the user */
+ info.cmpd_listv = (const struct H5LD_memb_t * const *)g_listv;
+
+ if(g_label)
+ info.cmpd_name = "%s=";
+
+ info.elmt_suf1 = " ";
+ info.str_locale = ESCAPE_HTML;
+
+ } else {
+ info.idx_fmt = "(%s)";
+ if(!g_display_width) {
+ info.line_ncols = 65535;
+ info.line_per_line = 1;
+ } /* end if */
+ else
+ info.line_ncols = (unsigned)g_display_width;
+
+ info.line_multi_new = 1;
+
+ /* The "fields" selected by the user */
+ info.cmpd_listv = (const struct H5LD_memb_t * const *)g_listv;
+ if(g_label)
+ info.cmpd_name = "%s=";
+ info.line_pre = " %s ";
+ info.line_cont = " %s ";
+ info.str_repeat = 8;
+ } /* end else */
+
+ /* Floating point types should display full precision */
+ sprintf(fmt_float, "%%1.%dg", FLT_DIG);
+ info.fmt_float = fmt_float;
+ sprintf(fmt_double, "%%1.%dg", DBL_DIG);
+ info.fmt_double = fmt_double;
+
+ info.dset_format = "DSET-%s ";
+ info.dset_hidefileno = 0;
+
+ info.obj_format = "-%lu:"H5_PRINTF_HADDR_FMT;
+ info.obj_hidefileno = 0;
+
+ info.dset_blockformat_pre = "%sBlk%lu: ";
+ info.dset_ptformat_pre = "%sPt%lu: ";
+
+ info.line_indent = "";
+
+ if(g_display_hex) {
+ /* Print all data in hexadecimal format if the `-x' or `--hexdump'
+ * command line switch was given. */
+ info.raw = TRUE;
+ } /* end if */
+
+ /* Print the values. */
+ if((ret_value = h5tools_dump_dset(stdout, &info, &ctx, did, &subset)) < 0)
+ error_msg("unable to print data\n");
+
+ HDfprintf(stdout, "\n");
+
+ return ret_value;
+
+} /* end doprint() */
+
+/*-------------------------------------------------------------------------
+ * Function: slicendump
+ *
+ * Purpose: To dump the slice for each dimension
+ * For example: prev_dims[2] = {5, 4}; cur_dims[2] = {7, 8}
+ * This routine will dump data as follows:
+ * {0, 3} to {0, 7} (1x4 elements)
+ * {1, 3} to {0, 7} (1x4 elements)
+ * {2, 3} to {0, 7} (1x4 elements)
+ * {3, 3} to {0, 7} (1x4 elements)
+ * {4, 3} to {0, 7} (1x4 elements)
+ * {5, 0} to {6, 7} (2x8 elements)
+ *
+ * Return: Non-negative on success
+ * Negative on failure
+ *
+ * Programmer: Vailin Choi; August 2010
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+slicendump(hid_t did, hsize_t *prev_dims, hsize_t *cur_dims, hsize_t *start, hsize_t *block, int rank, int subrank)
+{
+ int i; /* Local index variable */
+ int ind; /* Index for the current rank */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ ind = rank - subrank;
+
+ if((subrank - 1) > 0) {
+ /* continue onto the next dimension */
+ for (i = 0; i < (hssize_t)MIN(prev_dims[ind], cur_dims[ind]); i++){
+ start[ind] = (hsize_t)i;
+ if((ret_value = slicendump(did, prev_dims, cur_dims, start, block, rank, subrank-1)) < 0)
+ goto done;
+ } /* end for */
+ } /* end if */
+
+ /* this dimension remains the same or shrinking */
+ if(cur_dims[ind] <= prev_dims[ind])
+ goto done;
+
+ /* select first the slice for the faster changing dimension */
+ /* select later the whole slice for the slower changing dimension */
+ start[ind] = prev_dims[ind];
+ block[ind] = cur_dims[ind] - prev_dims[ind];
+
+ for(i = ind + 1; i < rank; i++){
+ start[i] = 0;
+ block[i] = cur_dims[i];
+ } /* end for */
+
+ /* Print the appended data */
+ ret_value = doprint(did, start, block, rank);
+
+done:
+ return ret_value;
+} /* end slicendump() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: monitor_dataset
+ *
+ * Purpose: To poll a dataset periodically for changes in dimension sizes.
+ * For dataset with unchanged and/or decreased dimension sizes:
+ * it just prints the dimension size changes
+ * For dataset with increase in at least one of its dimension sizes:
+ * it will print the new appended data to the dataset
+ *
+ * Return: Non-negative on success: dataset can be monitored
+ * Negative on failure: dataset cannot be monitored
+ *
+ * Programmer: Vailin Choi; August 2010
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+monitor_dataset(hid_t fid, char *dsetname)
+{
+ hid_t did; /* dataset id */
+ hid_t sid; /* dataspace id */
+ int ndims; /* # of dimensions in the dataspace */
+ int i, u; /* local index variable */
+ hsize_t prev_dims[H5S_MAX_RANK]; /* current dataspace dimensions */
+ hsize_t cur_dims[H5S_MAX_RANK]; /* previous dataspace dimensions */
+ herr_t ret_value = SUCCEED; /* return value */
+
+ HDfprintf(stdout, "Monitoring dataset %s...\n", dsetname);
+
+ /* Open the dataset for minitoring */
+ if((did = H5Dopen2(fid, dsetname, H5P_DEFAULT)) < 0) {
+ error_msg("error in opening dataset \"%s\"\n", dsetname);
+ ret_value = FAIL;
+ goto done;
+ }
+ if((sid = H5Dget_space(did)) < 0) {
+ error_msg("error in getting dataspace id for dataset \"%s\"\n", dsetname);
+ ret_value = FAIL;
+ goto done;
+ }
+
+ /* Get the dataset's dimension sizes */
+ if((ndims = H5Sget_simple_extent_dims(sid, prev_dims, NULL)) < 0) {
+ error_msg("unable to get dimensions sizes for \"%s\"\n", dsetname);
+ ret_value = FAIL;
+ goto done;
+ }
+ HDfflush(stdout);
+
+ /* Loop until an error occurs or the user interrupts execution */
+ while(!g_user_interrupt) {
+
+ /* Refreshes the dataset */
+ if(H5Drefresh(did) < 0) {
+ ret_value = FAIL;
+ goto done;
+ }
+
+ /* Get the dataset's current dimension sizes */
+ if(H5LDget_dset_dims(did, cur_dims) < 0) {
+ error_msg("unable to get dimension sizes for \"%s\"\n", dsetname);
+ ret_value = FAIL;
+ goto done;
+ }
+
+ /* Check the dimension sizes */
+ for(i = 0; i < ndims; i++)
+ if(cur_dims[i] != prev_dims[i])
+ break;
+
+ /* at least one dimension has changed */
+ if(i != ndims) {
+ /* Printing changes in dimension sizes */
+ for(u = 0; u < ndims; u++) {
+ HDfprintf(stdout, "dimension %u: %Hu->%Hu", (unsigned)u, prev_dims[u], cur_dims[u]);
+ if(cur_dims[u] > prev_dims[u])
+ HDfprintf(stdout, " (increases)\n");
+ else if(cur_dims[u] < prev_dims[u])
+ HDfprintf(stdout, " (decreases)\n");
+ else
+ HDfprintf(stdout, " (unchanged)\n");
+ }
+
+ /* Printing elements appended to the dataset if there is */
+ if(!g_monitor_size_only) {
+
+ /* See if at least one dimension size has increased */
+ for(u = 0; u < ndims; u++) {
+ int j;
+ hsize_t start[H5S_MAX_RANK];
+ hsize_t block[H5S_MAX_RANK];
+
+ /* Print the new appended data to the dataset */
+ if(cur_dims[u] > prev_dims[u]) {
+ HDfprintf(stdout, " Data:\n");
+
+ for(j = 0; j < ndims; j++) {
+ start[j] = 0;
+ block[j] = 1;
+ }
+
+ if((ret_value = slicendump(did, prev_dims, cur_dims, start, block, ndims, ndims)) < 0)
+ goto done;
+ break;
+ }
+ } /* end for */
+ }
+ HDfflush(stdout);
+ }
+
+ /* Save the current dimension sizes */
+ HDmemcpy(prev_dims, cur_dims, (size_t)ndims * sizeof(hsize_t));
+
+ /* Sleep before next monitor */
+ HDsleep(g_polling_interval);
+ } /* end while */
+
+ HDfflush(stdout);
+
+done:
+ /* Closing */
+ H5E_BEGIN_TRY
+ H5Dclose(did);
+ H5E_END_TRY
+
+ return(ret_value);
+} /* monitor_dataset() */
+
+/*-------------------------------------------------------------------------
+ * Function: process_cmpd_fields
+ *
+ * Purpose: To check whether the fields selected in "g_list_of_fields"
+ * are valid fields associated with the dataset.
+ *
+ * Return: 0 on success; negative on failure
+ *
+ * Programmer: Vailin Choi; August 2010
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+process_cmpd_fields(hid_t fid, char *dsetname)
+{
+ hid_t did=-1; /* dataset id */
+ hid_t dtid=-1, tid=-1; /* dataset's data type id */
+ size_t len; /* number of comma-separated fields in "g_list_of_fields" */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ HDassert(g_list_of_fields && *g_list_of_fields);
+
+ /* Open the dataset */
+ if((did = H5Dopen2(fid, dsetname, H5P_DEFAULT)) < 0) {
+ error_msg("error in opening dataset \"%s\"\n", dsetname);
+ ret_value = FAIL;
+ goto done;
+ }
+
+ /* Get the dataset's datatype */
+ if(((dtid = H5Dget_type(did)) < 0) || (tid = H5Tget_native_type(dtid, H5T_DIR_DEFAULT)) < 0) {
+ error_msg("error in getting dataset's datatype\n");
+ ret_value = FAIL;
+ goto done;
+ }
+
+ /* Check to make sure that the dataset's datatype is compound type */
+ if(H5Tget_class(dtid) != H5T_COMPOUND) {
+ error_msg("dataset should be compound type for <list_of_fields>\n");
+ ret_value = FAIL;
+ goto done;
+ }
+
+ /* Make a copy of "g_list_of_fields" */
+ if((g_dup_fields = HDstrdup(g_list_of_fields)) == NULL) {
+ error_msg("error in duplicating g_list_of_fields\n");
+ ret_value = FAIL;
+ goto done;
+ }
+
+ /* Estimate the number of comma-separated fields in "g_list of_fields" */
+ len = HDstrlen(g_list_of_fields)/2 + 2;
+
+ /* Allocate memory for a list vector of H5LD_memb_t structures to store "g_list_of_fields" info */
+ if((g_listv = (H5LD_memb_t **)HDcalloc(len, sizeof(H5LD_memb_t *))) == NULL) {
+ error_msg("error in allocating memory for H5LD_memb_t\n");
+ ret_value = FAIL;
+ goto done;
+ }
+
+ /* Process and store info for "g_listv" */
+ if(H5LD_construct_vector(g_dup_fields, g_listv, tid) < 0) {
+ error_msg("error in processing <list_of_fields>\n");
+ ret_value = FAIL;
+ goto done;
+ }
+
+ /* Will free memory for g_listv and g_dup_fields when exiting from h5watch */
+done:
+ /* Closing */
+ H5E_BEGIN_TRY
+ H5Tclose(dtid);
+ H5Tclose(tid);
+ H5Dclose(did);
+ H5E_END_TRY
+ return(ret_value);
+} /* process_cmpd_fields() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: check_dataset
+ *
+ * Purpose: To check whether a dataset can be monitored:
+ * A chunked dataset with unlimited or max. dimension setting
+ *
+ * Return: Non-negative on success: dataset can be monitored
+ * Negative on failure: dataset cannot be monitored
+ *
+ * Programmer: Vailin Choi; August 2010
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+check_dataset(hid_t fid, char *dsetname)
+{
+ hid_t did=-1; /* Dataset id */
+ hid_t dcp=-1; /* Dataset creation property */
+ hid_t sid=-1; /* Dataset's dataspace id */
+ int ndims; /* # of dimensions in the dataspace */
+ unsigned u; /* Local index variable */
+ hsize_t cur_dims[H5S_MAX_RANK]; /* size of dataspace dimensions */
+ hsize_t max_dims[H5S_MAX_RANK]; /* maximum size of dataspace dimensions */
+ hbool_t unlim_max_dims = FALSE; /* whether dataset has unlimited or max. dimension setting */
+ void *edata;
+ H5E_auto2_t func;
+ H5D_layout_t layout;
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ /* Disable error reporting */
+ H5Eget_auto2(H5E_DEFAULT, &func, &edata);
+ H5Eset_auto2(H5E_DEFAULT, NULL, NULL);
+
+ /* Open the dataset */
+ if((did = H5Dopen2(fid, dsetname, H5P_DEFAULT)) < 0) {
+ error_msg("unable to open dataset \"%s\"\n", dsetname);
+ ret_value = FAIL;
+ goto done;
+ }
+
+ /* Get dataset's creation property list */
+ if((dcp = H5Dget_create_plist(did)) < 0) {
+ error_msg("unable to get dataset's creation property list \"%s\"\n", dsetname);
+ ret_value = FAIL;
+ goto done;
+ }
+
+ /* Query dataset's layout; the layout should be chunked or virtual */
+ if((layout = H5Pget_layout(dcp)) < 0) {
+ error_msg("unable to get dataset layout \"%s\"\n", dsetname);
+ ret_value = FAIL;
+ goto done;
+ }
+ if(layout != H5D_CHUNKED && layout != H5D_VIRTUAL) {
+ error_msg("\"%s\" should be a chunked or virtual dataset\n", dsetname);
+ ret_value = FAIL;
+ goto done;
+ }
+
+ HDmemset(cur_dims, 0, sizeof cur_dims);
+ HDmemset(max_dims, 0, sizeof max_dims);
+
+ /* Get dataset's dataspace */
+ if((sid = H5Dget_space(did)) < 0) {
+ error_msg("can't get dataset's dataspace\"%s\"\n", dsetname);
+ ret_value = FAIL;
+ goto done;
+ }
+
+ /* Get dimension size of dataset's dataspace */
+ if((ndims = H5Sget_simple_extent_dims(sid, cur_dims, max_dims)) < 0) {
+ error_msg("can't get dataspace dimensions for dataset \"%s\"\n", dsetname);
+ ret_value = FAIL;
+ goto done;
+ }
+
+ /* Check whether dataset has unlimited dimension or max. dimension setting */
+ for(u = 0; u < (unsigned)ndims; u++)
+ if(max_dims[u] == H5S_UNLIMITED || cur_dims[u] != max_dims[u]) {
+ unlim_max_dims = TRUE;
+ break;
+ }
+
+ if(!unlim_max_dims) {
+ error_msg("\"%s\" should have unlimited or max. dimension setting\n", dsetname);
+ ret_value = FAIL;
+ }
+
+done:
+ H5Eset_auto2(H5E_DEFAULT, func, edata);
+
+ /* Closing */
+ H5E_BEGIN_TRY
+ H5Sclose(sid);
+ H5Pclose(dcp);
+ H5Dclose(did);
+ H5E_END_TRY
+
+ return(ret_value);
+} /* check_dataset() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: leave
+ *
+ * Purpose: Close the H5 Tools library and exit
+ *
+ * Return: Does not return
+ *
+ * Programmer: Vailin Choi; August 2010
+ *
+ *
+ *-------------------------------------------------------------------------
+ */
+static void
+leave(int ret)
+{
+ h5tools_close();
+
+ exit(ret);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: usage
+ *
+ * Purpose: Print the usage message about h5watch (only long options)
+ *
+ * Return: void
+ *
+ * Programmer: Vailin Choi; August 2010
+ *
+ *-------------------------------------------------------------------------
+ */
+static void
+usage(const char *prog)
+{
+ HDfflush(stdout);
+ HDfprintf(stdout, "Usage: %s [OPTIONS] [OBJECT]\n", prog);
+ HDfprintf(stdout, "\n");
+ HDfprintf(stdout, " OPTIONS\n");
+ HDfprintf(stdout, " --help Print a usage message and exit.\n");
+ HDfprintf(stdout, " --version Print version number and exit.\n");
+ HDfprintf(stdout, " --label Label members of compound typed dataset.\n");
+ HDfprintf(stdout, " --simple Use a machine-readable output format.\n");
+ HDfprintf(stdout, " --dim Monitor changes in size of dataset dimensions only.\n");
+ HDfprintf(stdout, " --width=N Set the number of columns to N for output.\n");
+ HDfprintf(stdout, " A value of 0 sets the number of columns to the\n");
+ HDfprintf(stdout, " maximum (65535). The default width is 80 columns.\n");
+ HDfprintf(stdout, " --polling=N Set the polling interval to N (in seconds) when the\n");
+ HDfprintf(stdout, " dataset will be checked for appended data. The default\n");
+ HDfprintf(stdout, " polling interval is 1.\n");
+ HDfprintf(stdout, " --fields=<list_of_fields>\n");
+ HDfprintf(stdout, " Display data for the fields specified in <list_of_fields>\n");
+ HDfprintf(stdout, " for a compound data type. <list_of_fields> can be\n");
+ HDfprintf(stdout, " specified as follows:\n");
+ HDfprintf(stdout, " 1) A comma-separated list of field names in a\n");
+ HDfprintf(stdout, " compound data type. \",\" is the separator\n");
+ HDfprintf(stdout, " for field names while \".\" is the separator\n");
+ HDfprintf(stdout, " for a nested field.\n");
+ HDfprintf(stdout, " 2) A single field name in a compound data type.\n");
+ HDfprintf(stdout, " Can use this option multiple times.\n");
+ HDfprintf(stdout, " Note that backslash is the escape character to avoid\n");
+ HDfprintf(stdout, " characters in field names that conflict with the tool's\n");
+ HDfprintf(stdout, " separators.\n");
+ HDfprintf(stdout, "\n");
+ HDfprintf(stdout, " OBJECT is specified as [<filename>/<path_to_dataset>/<dsetname>]\n");
+ HDfprintf(stdout, " <filename> Name of the HDF5 file. It may be preceded by path\n");
+ HDfprintf(stdout, " separated by slashes to the specified HDF5 file.\n");
+ HDfprintf(stdout, " <path_to_dataset> Path separated by slashes to the specified dataset\n");
+ HDfprintf(stdout, " <dsetname> Name of the dataset\n");
+ HDfprintf(stdout, "\n");
+ HDfprintf(stdout, " User can end the h5watch process by ctrl-C (SIGINT) or kill the process (SIGTERM).\n");
+
+} /* usage() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: parse_command_line
+ *
+ * Purpose: Parse the command line for h5watch (take only long options)
+ *
+ * Return: Success: Set the corresponding command flags and return void
+ * Failure: Exits program with EXIT_FAILURE value.
+ *
+ * Programmer: Vailin Choi; August 2010
+ *
+ *-------------------------------------------------------------------------
+ */
+static void
+parse_command_line(int argc, const char *argv[])
+{
+ int opt; /* Command line option */
+ int tmp;
+
+ /* no arguments */
+ if (argc == 1) {
+ usage(h5tools_getprogname());
+ leave(EXIT_FAILURE);
+ }
+
+ /* parse command line options */
+ while ((opt = get_option(argc, argv, s_opts, l_opts)) != EOF) {
+ switch ((char)opt) {
+ case '?':
+ case 'h': /* --help */
+ usage(h5tools_getprogname());
+ leave(EXIT_SUCCESS);
+
+ case 'V': /* --version */
+ print_version(progname);
+ leave(EXIT_SUCCESS);
+ break;
+
+ case 'w': /* --width=N */
+ g_display_width = (int)HDstrtol(opt_arg, NULL, 0);
+ if(g_display_width < 0) {
+ usage(h5tools_getprogname());
+ leave(EXIT_FAILURE);
+ }
+ break;
+
+ case 'd': /* --dim */
+ g_monitor_size_only = TRUE;
+ break;
+
+ case 'S': /* --simple */
+ g_simple_output = TRUE;
+ break;
+
+ case 'l': /* --label */
+ g_label = TRUE;
+ break;
+
+ case 'p': /* --polling=N */
+ /* g_polling_interval = HDstrtod(opt_arg, NULL); */
+ if((tmp = (int)HDstrtol(opt_arg, NULL, 10)) <= 0) {
+ usage(h5tools_getprogname());
+ leave(EXIT_FAILURE);
+ }
+ g_polling_interval = (unsigned)tmp;
+ break;
+
+ case 'f': /* --fields=<list_of_fields> */
+ if(g_list_of_fields == NULL) {
+ if((g_list_of_fields = HDstrdup(opt_arg)) == NULL) {
+ error_msg("memory allocation failed (file %s:line %d)\n",
+ __FILE__, __LINE__);
+ leave(EXIT_FAILURE);
+ }
+ } else {
+ char *str;
+
+ if((str = HDstrdup(opt_arg)) == NULL) {
+ error_msg("memory allocation failed (file %s:line %d)\n",
+ __FILE__, __LINE__);
+ leave(EXIT_FAILURE);
+ }
+ if((g_list_of_fields = (char *)HDrealloc(g_list_of_fields, HDstrlen(g_list_of_fields) + HDstrlen(str) + 2)) == NULL) {
+ error_msg("memory allocation failed (file %s:line %d)\n",
+ __FILE__, __LINE__);
+ leave(EXIT_FAILURE);
+
+ }
+ HDstrcat(g_list_of_fields, FIELD_SEP);
+ HDstrcat(g_list_of_fields, str);
+ }
+
+ break;
+
+ default:
+ usage(h5tools_getprogname());
+ leave(EXIT_FAILURE);
+ }
+ }
+
+
+ /* check for object to be processed */
+ if (argc <= opt_ind) {
+ error_msg("missing dataset name\n");
+ usage(h5tools_getprogname());
+ leave(EXIT_FAILURE);
+ }
+} /* parse_command_line() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: catch_signal
+ *
+ * Purpose: The signal handler to catch the signals:
+ * SIGTERM and SIGINT and set flag to get out of the main loop
+ *
+ * Return: No return
+ *
+ * Programmer: Vailin Choi; November 2014
+ *
+ *-------------------------------------------------------------------------
+ */
+static void catch_signal(int H5_ATTR_UNUSED signo)
+{
+ /* Set the flag to get out of the main loop */
+ g_user_interrupt = TRUE;
+} /* catch_signal() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: main
+ *
+ * Purpose: h5watch
+ *
+ * Return: Success: 0
+ * Failure: 1
+ *
+ * Programmer: Vailin Choi; August 2010
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+main(int argc, const char *argv[])
+{
+ char drivername[50]; /* VFD name */
+ char *fname = NULL; /* File name */
+ char *dname = NULL; /* Dataset name */
+ void *edata; /* Error reporting */
+ H5E_auto2_t func; /* Error reporting */
+ char *x; /* Temporary string pointer */
+ hid_t fid = -1; /* File ID */
+ hid_t fapl = -1; /* File access property list */
+
+ /* Set up tool name and exit status */
+ h5tools_setprogname(PROGRAMNAME);
+ h5tools_setstatus(EXIT_SUCCESS);
+
+ /* Disable error reporting */
+ H5Eget_auto2(H5E_DEFAULT, &func, &edata);
+ H5Eset_auto2(H5E_DEFAULT, NULL, NULL);
+
+ /* Initialize h5tools lib */
+ h5tools_init();
+
+ /* To exit from h5watch for SIGTERM signal */
+ if(HDsignal(SIGTERM, catch_signal) == SIG_ERR) {
+ error_msg("An error occurred while setting a signal handler.\n");
+ leave(EXIT_FAILURE);
+ }
+
+ /* To exit from h5watch for SIGINT signal */
+ if(HDsignal(SIGINT, catch_signal) == SIG_ERR) {
+ error_msg("An error occurred while setting a signal handler.\n");
+ leave(EXIT_FAILURE);
+ }
+
+ /* parse command line options */
+ parse_command_line(argc, argv);
+
+ if(argc <= opt_ind) {
+ error_msg("missing dataset name\n");
+ usage(h5tools_getprogname());
+ leave(EXIT_FAILURE);
+ }
+
+ /* Mostly copied from tools/h5ls coding & modified accordingly */
+ /*
+ * [OBJECT] is specified as
+ * [<filename>/<path_to_dataset>/<dsetname>]
+ *
+ * Example: ../dir1/foo/bar/dset
+ * \_________/\______/
+ * file obj
+ *
+ * The dichotomy is determined by calling H5Fopen() repeatedly until it
+ * succeeds. The first call uses the entire name and each subsequent call
+ * chops off the last component. If we reach the beginning of the name
+ * then there must have been something wrong with the file (perhaps it
+ * doesn't exist).
+ */
+ if((fname = HDstrdup(argv[opt_ind])) == NULL) {
+ error_msg("memory allocation failed (file %s:line %d)\n",
+ __FILE__, __LINE__);
+ h5tools_setstatus(EXIT_FAILURE);
+ }
+
+ /* Create a copy of file access property list */
+ if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
+ return -1;
+
+ /* Set to use the latest library format */
+ if(H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
+ return -1;
+
+ do {
+ while(fname && *fname) {
+ fid = h5tools_fopen(fname, H5F_ACC_RDONLY|H5F_ACC_SWMR_READ, fapl, NULL, drivername, sizeof drivername);
+
+ if(fid >= 0) {
+ HDfprintf(stdout, "Opened \"%s\" with %s driver.\n", fname, drivername);
+ break; /*success*/
+ } /* end if */
+
+ /* Shorten the file name; lengthen the object name */
+ x = dname;
+ dname = HDstrrchr(fname, '/');
+ if(x)
+ *x = '/';
+ if(!dname)
+ break;
+ *dname = '\0';
+ } /* end while */
+ /* Try opening the file again if somehow unstable */
+ } while(g_retry-- > 0 && fid == FAIL);
+
+ if(fid < 0) {
+ error_msg("unable to open file \"%s\"\n", fname);
+ if(fname) HDfree(fname);
+ if(fapl >= 0) H5Pclose(fapl);
+ leave(EXIT_FAILURE);
+ }
+
+ if(!dname) {
+ error_msg("no dataset specified\n");
+ h5tools_setstatus(EXIT_FAILURE);
+ } else {
+ *dname = '/';
+ x = dname;
+ if((dname = HDstrdup(dname)) == NULL) {
+ error_msg("memory allocation failed (file %s:line %d)\n",
+ __FILE__, __LINE__);
+ h5tools_setstatus(EXIT_FAILURE);
+ } else {
+ *x = '\0';
+ /* Validate dataset */
+ if(check_dataset(fid, dname) < 0)
+ h5tools_setstatus(EXIT_FAILURE);
+ /* Validate input "fields" */
+ else if(g_list_of_fields && *g_list_of_fields)
+ if(process_cmpd_fields(fid, dname) < 0)
+ h5tools_setstatus(EXIT_FAILURE);
+ }
+ }
+
+ /* If everything is fine, start monitoring the datset */
+ if(h5tools_getstatus() != EXIT_FAILURE)
+ if(monitor_dataset(fid, dname) < 0)
+ h5tools_setstatus(EXIT_FAILURE);
+
+ /* Free spaces */
+ if(fname) HDfree(fname);
+ if(dname) HDfree(dname);
+ if(g_list_of_fields) HDfree(g_list_of_fields);
+ if(g_listv) {
+ H5LD_clean_vector(g_listv);
+ HDfree(g_listv);
+ }
+ if(g_dup_fields) HDfree(g_dup_fields);
+
+ /* Close the file access property list */
+ if(fapl >= 0 && H5Pclose(fapl) < 0) {
+ error_msg("unable to close file access property list\n");
+ h5tools_setstatus(EXIT_FAILURE);
+ }
+
+ /* Close the file */
+ if(H5Fclose(fid) < 0) {
+ error_msg("unable to close file\n");
+ h5tools_setstatus(EXIT_FAILURE);
+ }
+
+ H5Eset_auto2(H5E_DEFAULT, func, edata);
+ /* exit */
+ leave(h5tools_getstatus());
+} /* main() */
+
diff --git a/hl/tools/h5watch/h5watchgentest.c b/hl/tools/h5watch/h5watchgentest.c
new file mode 100644
index 0000000..c5b76de
--- /dev/null
+++ b/hl/tools/h5watch/h5watchgentest.c
@@ -0,0 +1,348 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+#include "hdf5.h"
+#include "H5HLprivate2.h"
+
+/*
+ * WATCH.h5: file with various types of datasets for testing--
+ *
+ * The following datasets are chunked, H5D_ALLOC_TIME_INCR, max. dimensional setting:
+ * DSET_ONE: one-dimensional dataset
+ * DSET_TWO: two-dimensional dataset
+ * DSET_CMPD: one-dimensional dataset with compound type
+ * DSET_CMPD_ESC: one-dimensional dataset with compound type and member names with
+ * escape/separator characters
+ * DSET_CMPD_TWO: two-dimensional dataset with compound type
+ *
+ * The following datasets are one-dimensional, chunked, max. dimension setting:
+ * DSET_ALLOC_EARLY: dataset with H5D_ALLOC_TIME_EARLY
+ * DSET_ALLOC_LATE: dataset H5D_ALLOC_TIME_LATE
+ *
+ * The following datasets are one-dimensional:
+ * DSET_NONE: fixed dimension setting, contiguous, H5D_ALLOC_TIME_LATE
+ * DSET_NOMAX: fixed dimension setting, chunked, H5D_ALLOC_TIME_INCR
+ */
+#define ONE_DIMS0 10
+#define MAX_ONE_DIMS0 100
+
+#define DSET_ONE "DSET_ONE"
+#define DSET_NONE "DSET_NONE"
+#define DSET_NOMAX "DSET_NOMAX"
+#define DSET_ALLOC_LATE "DSET_ALLOC_LATE"
+#define DSET_ALLOC_EARLY "DSET_ALLOC_EARLY"
+#define DSET_CMPD "DSET_CMPD"
+#define DSET_CMPD_ESC "DSET_CMPD_ESC"
+
+#define TWO_DIMS0 4
+#define TWO_DIMS1 10
+#define MAX_TWO_DIMS0 60
+#define MAX_TWO_DIMS1 100
+
+#define DSET_TWO "DSET_TWO"
+#define DSET_CMPD_TWO "DSET_CMPD_TWO"
+
+#define CHUNK_SIZE 2
+
+#define FILE "WATCH.h5"
+
+/* Data structures for datasets with compound types */
+typedef struct sub22_t {
+ unsigned int a;
+ unsigned int b;
+ unsigned int c;
+} sub22_t;
+
+typedef struct sub2_t {
+ unsigned int a;
+ sub22_t b;
+ unsigned int c;
+} sub2_t;
+
+typedef struct sub4_t {
+ unsigned int a;
+ unsigned int b;
+} sub4_t;
+
+typedef struct set_t {
+ unsigned int field1;
+ sub2_t field2;
+ double field3;
+ sub4_t field4;
+} set_t;
+
+/*
+ **************************************************************************************
+ *
+ * Create a dataset with the given input parameters
+ * Write to the dataset with the given "data"
+ *
+ **************************************************************************************
+ */
+static herr_t
+generate_dset(hid_t fid, const char *dname, int ndims, hsize_t *dims, hsize_t *maxdims, hid_t dtid, void *data)
+{
+ hid_t dcpl=-1; /* Dataset creation property */
+ hid_t did=-1; /* Dataset id */
+ hid_t sid=-1; /* Dataspace id */
+ int i; /* Local index variable */
+ hsize_t chunk_dims[H5S_MAX_RANK]; /* Dimension sizes for chunks */
+
+ /* Create the dataspace */
+ if((sid = H5Screate_simple(ndims, dims, maxdims)) < 0)
+ goto done;
+
+ /* Set up dataset's creation properties */
+ if(!HDstrcmp(dname, DSET_NONE))
+ dcpl = H5P_DEFAULT;
+ else {
+ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ goto done;
+ for(i = 0; i < ndims; i++)
+ chunk_dims[i] = CHUNK_SIZE;
+ if(H5Pset_chunk(dcpl, ndims, chunk_dims) < 0)
+ goto done;
+ } /* end else */
+
+ if(!HDstrcmp(dname, DSET_ALLOC_LATE)) {
+ if(H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_LATE) < 0)
+ goto done;
+ } else if(!HDstrcmp(dname, DSET_ALLOC_EARLY)) {
+ if(H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_EARLY) < 0)
+ goto done;
+ } /* end if-else */
+
+ /* Create the dataset */
+ if((did = H5Dcreate2(fid, dname, dtid, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
+ goto done;
+
+ /* Write to the dataset */
+ if(H5Dwrite(did, dtid, H5S_ALL, H5S_ALL, H5P_DEFAULT, data) < 0)
+ goto done;
+
+ /* Closing */
+ if(H5Pclose(dcpl) < 0) goto done;
+ if(H5Sclose(sid) < 0) goto done;
+ if(H5Dclose(did) < 0) goto done;
+
+ return SUCCEED;
+
+done:
+ H5E_BEGIN_TRY
+ H5Sclose(sid);
+ H5Pclose(dcpl);
+ H5Dclose(did);
+ H5E_END_TRY
+
+ return FAIL;
+} /* end generate_dset() */
+
+int
+main(void)
+{
+ hid_t fid=-1; /* File id */
+ hid_t fapl=-1; /* File access property list id */
+ hsize_t cur_dims[1]; /* Dimension sizes */
+ hsize_t max_dims[1]; /* Maximum dimension sizes */
+ hsize_t cur2_dims[2]; /* Current dimension sizes */
+ hsize_t max2_dims[2]; /* Maximum dimension sizes */
+ hid_t set_tid=-1, esc_set_tid=-1; /* Compound type id */
+ hid_t sub22_tid=-1; /* Compound type id */
+ hid_t sub2_tid=-1, esc_sub2_tid=-1; /* Compound type id */
+ hid_t sub4_tid=-1, esc_sub4_tid=-1; /* Compound type id */
+ int one_data[ONE_DIMS0]; /* Buffer for data */
+ int two_data[TWO_DIMS0*TWO_DIMS1]; /* Buffer for data */
+ set_t one_cbuf[ONE_DIMS0]; /* Buffer for data with compound type */
+ set_t two_cbuf[TWO_DIMS0*TWO_DIMS1]; /* Buffer for data with compound type */
+ int i; /* Local index variable */
+
+ /* Create a copy of file access property list */
+ if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
+ HDexit(EXIT_FAILURE);
+ /* Set to use the latest library format */
+ if(H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
+ HDexit(EXIT_FAILURE);
+
+ /* Create a file with the latest format */
+ if((fid = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
+ HDexit(EXIT_FAILURE);
+
+ /* Initialization for one-dimensional dataset */
+ cur_dims[0] = ONE_DIMS0;
+ max_dims[0] = MAX_ONE_DIMS0;
+ for(i = 0; i < ONE_DIMS0; i++)
+ one_data[i] = i;
+
+ /* Generate DSET_ONE, DSET_NONE, DSET_NOMAX, DSET_ALLOC_LATE, DSET_EARLY */
+ if(generate_dset(fid, DSET_ONE, 1, cur_dims, max_dims, H5T_NATIVE_INT, one_data) < 0)
+ goto done;
+ if(generate_dset(fid, DSET_NONE, 1, cur_dims, NULL, H5T_NATIVE_INT, one_data) < 0)
+ goto done;
+ if(generate_dset(fid, DSET_NOMAX, 1, cur_dims, NULL, H5T_NATIVE_INT, one_data) < 0)
+ goto done;
+ if(generate_dset(fid, DSET_ALLOC_LATE, 1, cur_dims, max_dims, H5T_NATIVE_INT, one_data) < 0)
+ goto done;
+ if(generate_dset(fid, DSET_ALLOC_EARLY, 1, cur_dims, max_dims, H5T_NATIVE_INT, one_data) < 0)
+ goto done;
+
+ /* Initialization for two-dimensional dataset */
+ cur2_dims[0] = TWO_DIMS0;
+ cur2_dims[1] = TWO_DIMS1;
+ max2_dims[0] = MAX_TWO_DIMS0;
+ max2_dims[1] = MAX_TWO_DIMS1;
+
+ for(i = 0; i < (TWO_DIMS0 * TWO_DIMS1); i++)
+ two_data[i] = i;
+
+ /* Generate DSET_TWO */
+ if(generate_dset(fid, DSET_TWO, 2, cur2_dims, max2_dims, H5T_NATIVE_INT, two_data) < 0)
+ goto done;
+
+ /* Initialization for one-dimensional compound typed dataset */
+ cur_dims[0] = ONE_DIMS0;
+ max_dims[0] = MAX_ONE_DIMS0;
+
+ for(i = 0; i < ONE_DIMS0; i++) {
+ one_cbuf[i].field1 = 1;
+ one_cbuf[i].field2.a = 2;
+ one_cbuf[i].field2.c = 4;
+ one_cbuf[i].field2.b.a = 20;
+ one_cbuf[i].field2.b.b = 40;
+ one_cbuf[i].field2.b.c = 80;
+ one_cbuf[i].field3 = 3.0F;
+ one_cbuf[i].field4.a = 4;
+ one_cbuf[i].field4.b = 8;
+ } /* end for */
+
+ /* Create the compound type */
+ if((sub22_tid = H5Tcreate(H5T_COMPOUND, sizeof(sub22_t))) < 0)
+ goto done;
+ if(H5Tinsert(sub22_tid, "a", HOFFSET(sub22_t, a), H5T_NATIVE_INT) < 0)
+ goto done;
+ if(H5Tinsert(sub22_tid, "b", HOFFSET(sub22_t, b), H5T_NATIVE_INT) < 0)
+ goto done;
+ if(H5Tinsert(sub22_tid, "c", HOFFSET(sub22_t, c), H5T_NATIVE_INT) < 0)
+ goto done;
+
+ if((sub2_tid = H5Tcreate(H5T_COMPOUND, sizeof(sub2_t))) < 0)
+ goto done;
+ if(H5Tinsert(sub2_tid, "a", HOFFSET(sub2_t, a), H5T_NATIVE_INT) < 0)
+ goto done;
+ if(H5Tinsert(sub2_tid, "b", HOFFSET(sub2_t, b), sub22_tid) < 0)
+ goto done;
+ if(H5Tinsert(sub2_tid, "c", HOFFSET(sub2_t, c), H5T_NATIVE_INT) < 0)
+ goto done;
+
+ if((sub4_tid = H5Tcreate(H5T_COMPOUND, sizeof(sub4_t))) < 0)
+ goto done;
+ if(H5Tinsert(sub4_tid, "a", HOFFSET(sub4_t, a), H5T_NATIVE_INT) < 0)
+ goto done;
+ if(H5Tinsert(sub4_tid, "b", HOFFSET(sub4_t, b), H5T_NATIVE_INT) < 0)
+ goto done;
+
+ if((set_tid = H5Tcreate(H5T_COMPOUND, sizeof(set_t))) < 0)
+ goto done;
+ if(H5Tinsert(set_tid, "field1", HOFFSET(set_t, field1), H5T_NATIVE_INT) < 0)
+ goto done;
+ if(H5Tinsert(set_tid, "field2", HOFFSET(set_t, field2), sub2_tid) < 0)
+ goto done;
+ if(H5Tinsert(set_tid, "field3", HOFFSET(set_t, field3), H5T_NATIVE_DOUBLE) < 0)
+ goto done;
+ if(H5Tinsert(set_tid, "field4", HOFFSET(set_t, field4), sub4_tid) < 0)
+ goto done;
+
+ /* Create the compound type with escape/separator characters */
+ if((esc_sub2_tid = H5Tcreate(H5T_COMPOUND, sizeof(sub2_t))) < 0)
+ goto done;
+ if(H5Tinsert(esc_sub2_tid, ".a", HOFFSET(sub2_t, a), H5T_NATIVE_INT) < 0)
+ goto done;
+ if(H5Tinsert(esc_sub2_tid, ",b", HOFFSET(sub2_t, b), sub22_tid) < 0)
+ goto done;
+ if(H5Tinsert(esc_sub2_tid, "\\K", HOFFSET(sub2_t, c), H5T_NATIVE_INT) < 0)
+ goto done;
+
+ if((esc_sub4_tid = H5Tcreate(H5T_COMPOUND, sizeof(sub4_t))) < 0)
+ goto done;
+ if(H5Tinsert(esc_sub4_tid, "a.", HOFFSET(sub4_t, a), H5T_NATIVE_INT) < 0)
+ goto done;
+ if(H5Tinsert(esc_sub4_tid, "b,", HOFFSET(sub4_t, b), H5T_NATIVE_INT) < 0)
+ goto done;
+
+ if((esc_set_tid = H5Tcreate(H5T_COMPOUND, sizeof(set_t))) < 0)
+ goto done;
+ if(H5Tinsert(esc_set_tid, "field,1", HOFFSET(set_t, field1), H5T_NATIVE_INT) < 0)
+ goto done;
+ if(H5Tinsert(esc_set_tid, "field2.", HOFFSET(set_t, field2), esc_sub2_tid) < 0)
+ goto done;
+ if(H5Tinsert(esc_set_tid, "field\\3", HOFFSET(set_t, field3), H5T_NATIVE_DOUBLE) < 0)
+ goto done;
+ if(H5Tinsert(esc_set_tid, "field4,", HOFFSET(set_t, field4), esc_sub4_tid) < 0)
+ goto done;
+
+ /* Generate DSET_CMPD, DSET_CMPD_ESC */
+ if(generate_dset(fid, DSET_CMPD, 1, cur_dims, max_dims, set_tid, one_cbuf) < 0)
+ goto done;
+ if(generate_dset(fid, DSET_CMPD_ESC, 1, cur_dims, max_dims, esc_set_tid, one_cbuf) < 0)
+ goto done;
+
+ /* Initialization for two-dimensional compound typed dataset */
+ cur2_dims[0] = TWO_DIMS0;
+ cur2_dims[1] = TWO_DIMS1;
+ max2_dims[0] = MAX_TWO_DIMS0;
+ max2_dims[0] = MAX_TWO_DIMS1;
+
+ for(i = 0; i < (TWO_DIMS0 * TWO_DIMS1); i++) {
+ two_cbuf[i].field1 = 1;
+ two_cbuf[i].field2.a = 2;
+ two_cbuf[i].field2.c = 4;
+ two_cbuf[i].field2.b.a = 20;
+ two_cbuf[i].field2.b.b = 40;
+ two_cbuf[i].field2.b.c = 80;
+ two_cbuf[i].field3 = 3.0F;
+ two_cbuf[i].field4.a = 4;
+ two_cbuf[i].field4.b = 8;
+ } /* end for */
+
+ /* Generate DSET_CMPD_TWO */
+ if(generate_dset(fid, DSET_CMPD_TWO, 2, cur2_dims, max2_dims, set_tid, two_cbuf) < 0)
+ goto done;
+
+ /* Closing */
+ if(H5Tclose(sub22_tid) < 0) goto done;
+ if(H5Tclose(sub2_tid) < 0) goto done;
+ if(H5Tclose(sub4_tid) < 0) goto done;
+ if(H5Tclose(set_tid) < 0) goto done;
+ if(H5Tclose(esc_sub2_tid) < 0) goto done;
+ if(H5Tclose(esc_sub4_tid) < 0) goto done;
+ if(H5Tclose(esc_set_tid) < 0) goto done;
+ if(H5Pclose(fapl) < 0) goto done;
+ if(H5Fclose(fid) < 0) goto done;
+
+ HDexit(EXIT_SUCCESS);
+
+done:
+ H5E_BEGIN_TRY
+ H5Tclose(sub22_tid);
+ H5Tclose(sub2_tid);
+ H5Tclose(sub4_tid);
+ H5Tclose(set_tid);
+ H5Tclose(esc_sub2_tid);
+ H5Tclose(esc_sub4_tid);
+ H5Tclose(esc_set_tid);
+ H5Pclose(fapl);
+ H5Fclose(fid);
+ H5E_END_TRY
+
+ HDexit(EXIT_FAILURE);
+} /* end main() */
+
diff --git a/hl/tools/h5watch/swmr_check_compat_vfd.c b/hl/tools/h5watch/swmr_check_compat_vfd.c
new file mode 100644
index 0000000..7d11a73
--- /dev/null
+++ b/hl/tools/h5watch/swmr_check_compat_vfd.c
@@ -0,0 +1,57 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/* Purpose: This is a small program that checks if the HDF5_DRIVER
+ * environment variable is set to a value that supports SWMR.
+ *
+ * It is intended for use in shell scripts.
+ */
+
+#include <stdlib.h>
+
+#include "H5private.h"
+
+/* This file needs to access the file driver testing code */
+#define H5FD_FRIEND /*suppress error about including H5FDpkg */
+#define H5FD_TESTING
+#include "H5FDpkg.h" /* File drivers */
+
+
+/*-------------------------------------------------------------------------
+ * Function: main
+ *
+ * Purpose: Inspects the HDF5_DRIVER environment variable, which
+ * determines the VFD that the test harness will use with
+ * the majority of the tests.
+ *
+ * Return: VFD supports SWMR: EXIT_SUCCESS
+ *
+ * VFD does not support SWMR
+ * or failure: EXIT_FAILURE
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+main(void)
+{
+ char *driver = NULL;
+
+ driver = HDgetenv("HDF5_DRIVER");
+
+ if(H5FD_supports_swmr_test(driver))
+ return EXIT_SUCCESS;
+ else
+ return EXIT_FAILURE;
+
+} /* end main() */
+
diff --git a/hl/tools/h5watch/testh5watch.sh.in b/hl/tools/h5watch/testh5watch.sh.in
new file mode 100644
index 0000000..05e66bf
--- /dev/null
+++ b/hl/tools/h5watch/testh5watch.sh.in
@@ -0,0 +1,408 @@
+#! /bin/sh
+#
+# Copyright by The HDF Group.
+# Copyright by the Board of Trustees of the University of Illinois.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+#
+# Tests for the h5watch tool
+#
+
+# Check to see if the VFD specified by the HDF5_DRIVER environment variable
+# supports SWMR.
+./swmr_check_compat_vfd
+rc=$?
+if [[ $rc != 0 ]] ; then
+ echo
+ echo "The VFD specified by the HDF5_DRIVER environment variable"
+ echo "does not support SWMR."
+ echo
+ echo "h5watch tests skipped"
+ echo
+ exit 0
+fi
+
+#echo "h5watch tests are skipped temporarily."
+#echo
+#exit 0
+
+H5WATCH=h5watch # The tool name
+H5WATCH_BIN=`pwd`/$H5WATCH # The path of H5WATCH
+EXTEND_DSET=extend_dset # Routine to extend the dataset when watching
+EXTEND_BIN=`pwd`/$EXTEND_DSET # The path of EXTEND_DSET
+#
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+#
+GEN_TEST=h5watchgentest # Generate HDF5 file with various datasets
+GEN_TEST_BIN=`pwd`/$GEN_TEST # Path of the binary GEN_TEST
+WATCHFILE=`pwd`/WATCH.h5 # The HDF5 file generated to test h5watch
+TESTFILE=TEST.h5 # The temporary file (a copy of WATCH.h5) used by tests
+TRY_MAX=10 # Try running the test again
+#
+# These 3 defines should be the same as the defines in ./extend_dset.c
+WRITER_MESSAGE=writer_message # The message file created by the "extend" process
+READER_MESSAGE=reader_message # The message file created by the "watch" process
+MESSAGE_TIMEOUT=300 # Message timeout length in secs
+#
+CMP='cmp -s'
+DIFF='diff -c'
+NLINES=20 # Max. lines of output to display if test fails
+#
+# Mac OS: just to make sure echo "backslash backslash" behaves properly
+if test `uname -s` = 'Darwin'; then
+ ECHO='/bin/echo'
+else
+ ECHO='echo'
+fi
+#
+# Global variables
+nerrors=0
+verbose=yes
+
+# The build (current) directory might be different than the source directory.
+if test -z "$srcdir"; then
+ srcdir=.
+fi
+test -d ../testfiles || mkdir ../testfiles
+
+# Print a line-line message left justified in a field of 70 characters
+# beginning with the word "Testing".
+TESTING() {
+ SPACES=" "
+ $ECHO "Testing $* $SPACES" |cut -c1-70 |tr -d '\012'
+}
+
+#
+# Overall algorithm:
+#
+# Run a test and print PASSED or FAILED
+# If a test did not return with the expected return code,
+# increment the `nerrors' global variable and (if $verbose is set) display up to $NLINES
+# lines of the actual output from the test.
+# If the test did return the expected code,
+# compare the actual output with the expected output;
+# If the outputs are the same, print PASSED,
+# Otherwise print FAILED and the difference between the two outputs.
+# The output files are not removed if $HDF5_NOCLEANUP has a non-zero value.
+#
+#
+# TOOLTEST():
+#
+# Arguments:
+#
+# $1 -- expected output
+# $2 -- expected return code
+# $3 and on -- arguments for h5watch
+TOOLTEST() {
+ expect="$srcdir/../testfiles/$1"
+ actual="../testfiles/`basename $1 .ddl`.out"
+ actual_err="../testfiles/`basename $1 .ddl`.err"
+ shift
+ retvalexpect=$1
+ shift
+ # Run test.
+ # Stderr is included in stdout so that the diff can detect
+ # any unexpected output from that stream too.
+ TESTING $H5WATCH $@
+ (
+ $RUNSERIAL $H5WATCH_BIN "$@"
+ ) > $actual 2>$actual_err
+ exitcode=$?
+ cat $actual_err >> $actual
+ if [ $exitcode -ne $retvalexpect ]; then
+ $ECHO "*FAILED*"
+ nerrors="`expr $nerrors + 1`"
+ if [ yes = "$verbose" ]; then
+ $ECHO "test returned with exit code $exitcode"
+ $ECHO "test output: (up to $NLINES lines)"
+ head -$NLINES $actual
+ $ECHO "***end of test output***"
+ $ECHO ""
+ fi
+ elif $CMP $expect $actual; then
+ $ECHO " PASSED"
+ else
+ $ECHO "*FAILED*"
+ $ECHO " Expected result differs from actual result"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ fi
+
+ # Clean up output file
+ if test -z "$HDF5_NOCLEANUP"; then
+ rm -f $actual $actual_err
+ fi
+}
+
+#
+#
+#
+# TEST_WATCH():
+#
+# Arguments:
+# $1 -- the specified dataset to watch and to extend
+# $2 -- the options to h5watch (can be NULL)
+# $3 -- expected output from watching the object
+# $4 -- action 1
+# $5 -- action 2
+#
+TEST_WATCH() {
+try=0
+while [ $try -lt $TRY_MAX ] ;
+do
+ cp $WATCHFILE $TESTFILE # Copy the file being watched/extended to a temporary file
+ actual="../testfiles/`basename $3 .ddl`.out" # The actual output
+ expect="$srcdir/../testfiles/$3" # The expected output
+ #
+ # Set up options and object to h5watch
+ if test -z "$2"; then
+ OBJ="$TESTFILE/$1" # Empty options, just object to h5watch
+ else
+ OBJ="$2 $TESTFILE/$1" # Options + object to h5watch
+ fi
+ rm -f $WRITER_MESSAGE # Remove the file just to be sure
+ rm -f $READER_MESSAGE # Remove the file just to be sure
+ #
+ $EXTEND_BIN $TESTFILE $1 $4 $5& # Extend the dataset; put in background
+ extend_pid=$! # Get "extend" process ID
+ #
+ # Wait for message from "extend_dset" process to start h5watch--
+ # To wait for the writer message file or till the maximum # of seconds is reached
+ # This performs similar function as the routine h5_wait_message() in test/h5test.c
+ mexist=0 # Indicate whether the message file is found
+ t0=`date +%s` # Get current time in seconds
+ difft=0 # Initialize the time difference
+ while [ $difft -lt $MESSAGE_TIMEOUT ] ; # Loop till message times out
+ do
+ t1=`date +%s` # Get current time in seconds
+ difft=`expr $t1 - $t0` # Calculate the time difference
+ if [ -e $WRITER_MESSAGE ]; then # If message file is found:
+ mexist=1 # indicate the message file is found
+ rm $WRITER_MESSAGE # remove the message file
+ break # get out of the while loop
+ fi
+ done;
+ #
+ # If message file from "extend" process is found--
+ # start h5watch
+ # send message to "extend" process to start work
+ # wait for "extend" process to complete, then kill h5watch
+ # determine test result
+ # If message file from "extend" process is not found--
+ # there is some problem; the test fails
+ #
+ if test $mexist -eq 0; then
+ $ECHO "*FAILED*"
+ $ECHO "Problem with extend_dset...this test failed."
+ else
+ #
+ # Run h5watch; put in background; collect output to a file
+ TESTING $H5WATCH $OBJ
+ $RUNSERIAL $H5WATCH_BIN $2 "$TESTFILE/$1" >> $actual &
+ watch_pid=$! # Get h5watch process ID
+ cp /dev/null $READER_MESSAGE # Send message to "extend" process to start work
+ wait $extend_pid # Wait for "extend" process to complete
+ extend_exit=$? # Collect "extend" process' exit code
+ sleep 1 # Sleep to make sure output is flushed
+ kill $watch_pid # Kill h5watch
+ wait $watch_pid # Wait for "h5watch" process to complete
+ #
+ if [ $extend_exit -ne 0 ]; then # Error returned from "extend" process
+ $ECHO "*FAILED*"
+ nerrors="`expr $nerrors + 1`"
+ if [ yes = "$verbose" ]; then
+ $ECHO "extend test returned with exit code $extend_exit"
+ $ECHO "test output: (up to $NLINES lines)"
+ head -$NLINES $actual
+ $ECHO "***end of test output***"
+ $ECHO ""
+ fi
+ elif $CMP $expect $actual; then # Compare actual output with expected output
+ try=$TRY_MAX
+ $ECHO " PASSED"
+ else
+ try="`expr $try + 1`"
+ if [ $try -lt $TRY_MAX ]; then
+ $ECHO "*RETRY"
+ rm -f $actual
+ rm -f $TESTFILE
+ else
+ $ECHO "*FAILED*" # Actual and expected outputs are different
+ $ECHO " Expected result differs from actual result"
+ nerrors="`expr $nerrors + 1`"
+ if test yes = "$verbose"; then
+ $DIFF $expect $actual |sed 's/^/ /'
+ fi
+ fi
+ fi
+ #
+ # Cleaning
+ rm -f $TESTFILE
+ if test -z "$HDF5_NOCLEANUP"; then
+ rm -f $actual
+ fi
+ fi
+done;
+}
+##############################################################################
+##############################################################################
+### T H E T E S T S ###
+##############################################################################
+##############################################################################
+#
+#
+#################################################################################################
+# #
+# WATCH.h5: file with various types of datasets for testing-- #
+# The following datasets are chunked, H5D_ALLOC_TIME_INCR, max. dimensional setting: #
+# DSET_ONE: one-dimensional dataset #
+# DSET_TWO: two-dimensional dataset #
+# DSET_CMPD: one-dimensional dataset with compound type #
+# DSET_CMPD_ESC: one-dimensional dataset with compound type & escape/separator characters #
+# DSET_CMPD_TWO: two-dimensional dataset with compound type #
+# #
+# The following datasets are one-dimensional, chunked, max. dimension setting: #
+# DSET_ALLOC_EARLY: dataset with H5D_ALLOC_TIME_EARLY #
+# DSET_ALLOC_LATE: dataset H5D_ALLOC_TIME_LATE #
+# #
+# The following datasets are one-dimensional: #
+# DSET_NONE: fixed dimension setting, contiguous, H5D_ALLOC_TIME_LATE #
+# DSET_NOMAX: fixed dimension setting, chunked, H5D_ALLOC_TIME_INCR #
+# #
+#################################################################################################
+#
+#
+#################################################################################################
+# #
+# Tests on expected failures: #
+# Invalid file name #
+# Unable to find dataset, invalid dataset #
+# DSET_NONE and DSET_NOMAX #
+# Invalid input to options --width and --polling #
+# Invalid field names for -f option #
+# #
+#################################################################################################
+#
+# Generate file with various types of datasets
+$GEN_TEST_BIN
+# Test on --help options
+TOOLTEST w-help1.ddl 0 --help
+#
+# Tests on expected failures
+TOOLTEST w-err-dset1.ddl 1 WATCH.h5
+TOOLTEST w-err-dset2.ddl 1 WATCH.h5/group/DSET_CMPD
+TOOLTEST w-err-dset-none.ddl 1 WATCH.h5/DSET_NONE
+TOOLTEST w-err-dset-nomax.ddl 1 WATCH.h5/DSET_NOMAX
+TOOLTEST w-err-file.ddl 1 ../WATCH.h5/DSET_CMPD
+TOOLTEST w-err-width.ddl 1 --width=-8 WATCH.h5/DSET_ONE
+TOOLTEST w-err-poll.ddl 1 --polling=-8 WATCH.h5/DSET_ONE
+TOOLTEST w-err-poll0.ddl 1 --polling=0 WATCH.h5/DSET_ONE
+#
+# Tests on invalid field names via --fields option for a compound typed dataset: DSET_CMPD
+TOOLTEST w-err-cmpd1.ddl 1 --fields=fieldx WATCH.h5/DSET_CMPD
+TOOLTEST w-err-cmpd2.ddl 1 --fields=field1,field2. WATCH.h5/DSET_CMPD
+TOOLTEST w-err-cmpd3.ddl 1 --fields=field1,field2, WATCH.h5/DSET_CMPD
+TOOLTEST w-err-cmpd4.ddl 1 --fields=field1,field2.b.k WATCH.h5/DSET_CMPD
+TOOLTEST w-err-cmpd5.ddl 1 --fields=field1 --fields=field2.b.k WATCH.h5/DSET_CMPD
+#
+echo "DONE WITH 1st SET OF TESTS"
+#
+#
+#
+#################################
+# Tests without options #
+#################################
+#
+# Generate file WATCH.h5 with various types of datasets,
+$GEN_TEST_BIN
+#
+# Watching and extending: (TEST.h5 is a copy of WATCH.h5)
+# TEST.h5/DSET_ONE
+# TEST.h5/DSET_ALLOC_EARLY
+# TEST.h5/DSET_ALLOC_LATE
+# TEST.h5/DSET_CMPD
+# TEST.h5/DSET_TWO
+# TEST.h5/DSET_CMPD_TWO
+# TEST.h5/DSET_CMPD_ESC
+#
+TEST_WATCH DSET_ONE '' w-ext-one.ddl 3 0 #Increase
+TEST_WATCH DSET_ALLOC_EARLY '' w-ext-early.ddl -1 0 #Decrease
+TEST_WATCH DSET_ALLOC_LATE '' w-ext-late.ddl 0 0 #Same
+TEST_WATCH DSET_CMPD '' w-ext-cmpd.ddl 3 0 #Increase
+TEST_WATCH DSET_CMPD_ESC '' w-ext-cmpd-esc.ddl -1 0 #Decrease
+TEST_WATCH DSET_TWO '' w-ext-two.ddl 2 2 #Increase, Increase
+TEST_WATCH DSET_CMPD_TWO '' w-ext-cmpd-two.ddl 2 -9 #Increase, Decrease
+#
+echo "DONE WITH 2nd SET OF TESTS"
+#
+#
+#
+#################################
+# Tests on --fields option #
+#################################
+#
+# Watching and extending: (TEST.h5 is a copy of WATCH.h5)
+# TEST.h5/DSET_CMPD with --fields=field1,field2
+# TEST.h5/DSET_CMPD with --fields=field2.b,field4
+# TEST.h5/DSET_CMPD with --fields=field2.b.a --fields=field2.c
+TEST_WATCH DSET_CMPD --fields=field1,field2 w-ext-cmpd-f1.ddl -9 0 #Decrease
+TEST_WATCH DSET_CMPD --fields=field2.b,field4 w-ext-cmpd-f2.ddl 3 0 #Increase
+TEST_WATCH DSET_CMPD '--fields=field2.b.a --fields=field2.c' w-ext-cmpd-ff3.ddl 0 0 #Same
+#
+#
+# TEST.h5/DSET_CMP_TWO with --fields=field1,field2
+# TEST.h5/DSET_CMPD_TWO with --fields=field2.b --fields=field4
+# TEST.h5/DSET_CMPD_TWO with --fields=field2.b.a,field2.c
+TEST_WATCH DSET_CMPD_TWO --fields=field1,field2 w-ext-cmpd-two-f1.ddl 2 0 #Increase, Same
+TEST_WATCH DSET_CMPD_TWO '--fields=field2.b --fields=field4' w-ext-cmpd-two-ff2.ddl -1 2 #Decrease, Increase
+TEST_WATCH DSET_CMPD_TWO --fields=field2.b.a,field2.c w-ext-cmpd-two-f3.ddl -1 -3 #Decrease, Decrease
+#
+#
+# TEST.h5/DSET_CMPD_ESC with --fields=field\,1,field2\.
+# TEST.h5/DSET_CMPD_ESC with --fields=field2\..\,b --fields=field4\,
+# TEST.h5/DSET_CMPD_ESC with --fields=field2\..\,b.a,field2\..\\K
+TEST_WATCH DSET_CMPD_ESC '--fields=field\,1,field2\.' w-ext-cmpd-esc-f1.ddl 3 0 #Increase
+TEST_WATCH DSET_CMPD_ESC '--fields=field2\..\,b --fields=field4\,' w-ext-cmpd-esc-ff2.ddl -1 0 #Decrease
+TEST_WATCH DSET_CMPD_ESC '--fields=field2\..\,b.a,field2\..\\K' w-ext-cmpd-esc-f3.ddl 3 0 #Increase
+#
+#
+echo "DONE WITH 3rd SET OF TESTS"
+#
+#
+#
+#################################################
+# Tests on options: #
+# --dim #
+# --width, --label, --simple, --help #
+#################################################
+#
+# Watching and extending: (TEST.h5 is a copy of WATCH.h5)
+# TEST.h5/DSET_ONE with -d option
+# TEST.h5/DSET_TWO with --dim option
+# TEST.h5/DSET_TWO with --width=60 option
+# TEST.h5/DSET_CMPD with --label option
+# TEST.h5/DSET_ONE with --simple option
+TEST_WATCH DSET_ONE --dim w-ext-one-d.ddl 3 0 #Increase
+TEST_WATCH DSET_TWO --dim w-ext-two-d.ddl -2 0 #Decrease, Same
+TEST_WATCH DSET_TWO --width=30 w-ext-two-width.ddl 0 2 #Same, Increase
+TEST_WATCH DSET_CMPD --label w-ext-cmpd-label.ddl 3 0 #Increase
+TEST_WATCH DSET_ONE --simple w-ext-one-simple.ddl 2 0 #I
+#
+echo "DONE WITH 4th SET OF TESTS"
+#
+#
+#
+if test $nerrors -eq 0 ; then
+ $ECHO "All h5watch tests passed."
+ exit $EXIT_SUCCESS
+else
+ $ECHO "h5watch tests failed with $nerrors errors."
+ exit $EXIT_FAILURE
+fi
diff --git a/hl/tools/testfiles/w-err-cmpd1.ddl b/hl/tools/testfiles/w-err-cmpd1.ddl
new file mode 100644
index 0000000..775d6a0
--- /dev/null
+++ b/hl/tools/testfiles/w-err-cmpd1.ddl
@@ -0,0 +1,2 @@
+Opened "WATCH.h5" with sec2 driver.
+h5watch error: error in processing <list_of_fields>
diff --git a/hl/tools/testfiles/w-err-cmpd2.ddl b/hl/tools/testfiles/w-err-cmpd2.ddl
new file mode 100644
index 0000000..775d6a0
--- /dev/null
+++ b/hl/tools/testfiles/w-err-cmpd2.ddl
@@ -0,0 +1,2 @@
+Opened "WATCH.h5" with sec2 driver.
+h5watch error: error in processing <list_of_fields>
diff --git a/hl/tools/testfiles/w-err-cmpd3.ddl b/hl/tools/testfiles/w-err-cmpd3.ddl
new file mode 100644
index 0000000..775d6a0
--- /dev/null
+++ b/hl/tools/testfiles/w-err-cmpd3.ddl
@@ -0,0 +1,2 @@
+Opened "WATCH.h5" with sec2 driver.
+h5watch error: error in processing <list_of_fields>
diff --git a/hl/tools/testfiles/w-err-cmpd4.ddl b/hl/tools/testfiles/w-err-cmpd4.ddl
new file mode 100644
index 0000000..775d6a0
--- /dev/null
+++ b/hl/tools/testfiles/w-err-cmpd4.ddl
@@ -0,0 +1,2 @@
+Opened "WATCH.h5" with sec2 driver.
+h5watch error: error in processing <list_of_fields>
diff --git a/hl/tools/testfiles/w-err-cmpd5.ddl b/hl/tools/testfiles/w-err-cmpd5.ddl
new file mode 100644
index 0000000..775d6a0
--- /dev/null
+++ b/hl/tools/testfiles/w-err-cmpd5.ddl
@@ -0,0 +1,2 @@
+Opened "WATCH.h5" with sec2 driver.
+h5watch error: error in processing <list_of_fields>
diff --git a/hl/tools/testfiles/w-err-dset-nomax.ddl b/hl/tools/testfiles/w-err-dset-nomax.ddl
new file mode 100644
index 0000000..b99cf84
--- /dev/null
+++ b/hl/tools/testfiles/w-err-dset-nomax.ddl
@@ -0,0 +1,2 @@
+Opened "WATCH.h5" with sec2 driver.
+h5watch error: "/DSET_NOMAX" should have unlimited or max. dimension setting
diff --git a/hl/tools/testfiles/w-err-dset-none.ddl b/hl/tools/testfiles/w-err-dset-none.ddl
new file mode 100644
index 0000000..cbf6770
--- /dev/null
+++ b/hl/tools/testfiles/w-err-dset-none.ddl
@@ -0,0 +1,2 @@
+Opened "WATCH.h5" with sec2 driver.
+h5watch error: "/DSET_NONE" should be a chunked or virtual dataset
diff --git a/hl/tools/testfiles/w-err-dset1.ddl b/hl/tools/testfiles/w-err-dset1.ddl
new file mode 100644
index 0000000..433c4d6
--- /dev/null
+++ b/hl/tools/testfiles/w-err-dset1.ddl
@@ -0,0 +1,2 @@
+Opened "WATCH.h5" with sec2 driver.
+h5watch error: no dataset specified
diff --git a/hl/tools/testfiles/w-err-dset2.ddl b/hl/tools/testfiles/w-err-dset2.ddl
new file mode 100644
index 0000000..81b52de
--- /dev/null
+++ b/hl/tools/testfiles/w-err-dset2.ddl
@@ -0,0 +1,2 @@
+Opened "WATCH.h5" with sec2 driver.
+h5watch error: unable to open dataset "/group/DSET_CMPD"
diff --git a/hl/tools/testfiles/w-err-file.ddl b/hl/tools/testfiles/w-err-file.ddl
new file mode 100644
index 0000000..015661f
--- /dev/null
+++ b/hl/tools/testfiles/w-err-file.ddl
@@ -0,0 +1 @@
+h5watch error: unable to open file "../WATCH.h5/DSET_CMPD"
diff --git a/hl/tools/testfiles/w-err-poll.ddl b/hl/tools/testfiles/w-err-poll.ddl
new file mode 100644
index 0000000..e6510f2
--- /dev/null
+++ b/hl/tools/testfiles/w-err-poll.ddl
@@ -0,0 +1,35 @@
+Usage: h5watch [OPTIONS] [OBJECT]
+
+ OPTIONS
+ --help Print a usage message and exit.
+ --version Print version number and exit.
+ --label Label members of compound typed dataset.
+ --simple Use a machine-readable output format.
+ --dim Monitor changes in size of dataset dimensions only.
+ --width=N Set the number of columns to N for output.
+ A value of 0 sets the number of columns to the
+ maximum (65535). The default width is 80 columns.
+ --polling=N Set the polling interval to N (in seconds) when the
+ dataset will be checked for appended data. The default
+ polling interval is 1.
+ --fields=<list_of_fields>
+ Display data for the fields specified in <list_of_fields>
+ for a compound data type. <list_of_fields> can be
+ specified as follows:
+ 1) A comma-separated list of field names in a
+ compound data type. "," is the separator
+ for field names while "." is the separator
+ for a nested field.
+ 2) A single field name in a compound data type.
+ Can use this option multiple times.
+ Note that backslash is the escape character to avoid
+ characters in field names that conflict with the tool's
+ separators.
+
+ OBJECT is specified as [<filename>/<path_to_dataset>/<dsetname>]
+ <filename> Name of the HDF5 file. It may be preceded by path
+ separated by slashes to the specified HDF5 file.
+ <path_to_dataset> Path separated by slashes to the specified dataset
+ <dsetname> Name of the dataset
+
+ User can end the h5watch process by ctrl-C (SIGINT) or kill the process (SIGTERM).
diff --git a/hl/tools/testfiles/w-err-poll0.ddl b/hl/tools/testfiles/w-err-poll0.ddl
new file mode 100644
index 0000000..e6510f2
--- /dev/null
+++ b/hl/tools/testfiles/w-err-poll0.ddl
@@ -0,0 +1,35 @@
+Usage: h5watch [OPTIONS] [OBJECT]
+
+ OPTIONS
+ --help Print a usage message and exit.
+ --version Print version number and exit.
+ --label Label members of compound typed dataset.
+ --simple Use a machine-readable output format.
+ --dim Monitor changes in size of dataset dimensions only.
+ --width=N Set the number of columns to N for output.
+ A value of 0 sets the number of columns to the
+ maximum (65535). The default width is 80 columns.
+ --polling=N Set the polling interval to N (in seconds) when the
+ dataset will be checked for appended data. The default
+ polling interval is 1.
+ --fields=<list_of_fields>
+ Display data for the fields specified in <list_of_fields>
+ for a compound data type. <list_of_fields> can be
+ specified as follows:
+ 1) A comma-separated list of field names in a
+ compound data type. "," is the separator
+ for field names while "." is the separator
+ for a nested field.
+ 2) A single field name in a compound data type.
+ Can use this option multiple times.
+ Note that backslash is the escape character to avoid
+ characters in field names that conflict with the tool's
+ separators.
+
+ OBJECT is specified as [<filename>/<path_to_dataset>/<dsetname>]
+ <filename> Name of the HDF5 file. It may be preceded by path
+ separated by slashes to the specified HDF5 file.
+ <path_to_dataset> Path separated by slashes to the specified dataset
+ <dsetname> Name of the dataset
+
+ User can end the h5watch process by ctrl-C (SIGINT) or kill the process (SIGTERM).
diff --git a/hl/tools/testfiles/w-err-width.ddl b/hl/tools/testfiles/w-err-width.ddl
new file mode 100644
index 0000000..e6510f2
--- /dev/null
+++ b/hl/tools/testfiles/w-err-width.ddl
@@ -0,0 +1,35 @@
+Usage: h5watch [OPTIONS] [OBJECT]
+
+ OPTIONS
+ --help Print a usage message and exit.
+ --version Print version number and exit.
+ --label Label members of compound typed dataset.
+ --simple Use a machine-readable output format.
+ --dim Monitor changes in size of dataset dimensions only.
+ --width=N Set the number of columns to N for output.
+ A value of 0 sets the number of columns to the
+ maximum (65535). The default width is 80 columns.
+ --polling=N Set the polling interval to N (in seconds) when the
+ dataset will be checked for appended data. The default
+ polling interval is 1.
+ --fields=<list_of_fields>
+ Display data for the fields specified in <list_of_fields>
+ for a compound data type. <list_of_fields> can be
+ specified as follows:
+ 1) A comma-separated list of field names in a
+ compound data type. "," is the separator
+ for field names while "." is the separator
+ for a nested field.
+ 2) A single field name in a compound data type.
+ Can use this option multiple times.
+ Note that backslash is the escape character to avoid
+ characters in field names that conflict with the tool's
+ separators.
+
+ OBJECT is specified as [<filename>/<path_to_dataset>/<dsetname>]
+ <filename> Name of the HDF5 file. It may be preceded by path
+ separated by slashes to the specified HDF5 file.
+ <path_to_dataset> Path separated by slashes to the specified dataset
+ <dsetname> Name of the dataset
+
+ User can end the h5watch process by ctrl-C (SIGINT) or kill the process (SIGTERM).
diff --git a/hl/tools/testfiles/w-ext-cmpd-esc-f1.ddl b/hl/tools/testfiles/w-ext-cmpd-esc-f1.ddl
new file mode 100644
index 0000000..09255cc
--- /dev/null
+++ b/hl/tools/testfiles/w-ext-cmpd-esc-f1.ddl
@@ -0,0 +1,6 @@
+Opened "TEST.h5" with sec2 driver.
+Monitoring dataset /DSET_CMPD_ESC...
+dimension 0: 10->13 (increases)
+ Data:
+ (10) {1, {2, {2, 2, 2}, 2}}, {2, {3, {3, 3, 3}, 3}},
+ (12) {3, {4, {4, 4, 4}, 4}}
diff --git a/hl/tools/testfiles/w-ext-cmpd-esc-f3.ddl b/hl/tools/testfiles/w-ext-cmpd-esc-f3.ddl
new file mode 100644
index 0000000..00ed390
--- /dev/null
+++ b/hl/tools/testfiles/w-ext-cmpd-esc-f3.ddl
@@ -0,0 +1,5 @@
+Opened "TEST.h5" with sec2 driver.
+Monitoring dataset /DSET_CMPD_ESC...
+dimension 0: 10->13 (increases)
+ Data:
+ (10) {{{2}}, {2}}, {{{3}}, {3}}, {{{4}}, {4}}
diff --git a/hl/tools/testfiles/w-ext-cmpd-esc-ff2.ddl b/hl/tools/testfiles/w-ext-cmpd-esc-ff2.ddl
new file mode 100644
index 0000000..9b9a971
--- /dev/null
+++ b/hl/tools/testfiles/w-ext-cmpd-esc-ff2.ddl
@@ -0,0 +1,3 @@
+Opened "TEST.h5" with sec2 driver.
+Monitoring dataset /DSET_CMPD_ESC...
+dimension 0: 10->9 (decreases)
diff --git a/hl/tools/testfiles/w-ext-cmpd-esc.ddl b/hl/tools/testfiles/w-ext-cmpd-esc.ddl
new file mode 100644
index 0000000..9b9a971
--- /dev/null
+++ b/hl/tools/testfiles/w-ext-cmpd-esc.ddl
@@ -0,0 +1,3 @@
+Opened "TEST.h5" with sec2 driver.
+Monitoring dataset /DSET_CMPD_ESC...
+dimension 0: 10->9 (decreases)
diff --git a/hl/tools/testfiles/w-ext-cmpd-f1.ddl b/hl/tools/testfiles/w-ext-cmpd-f1.ddl
new file mode 100644
index 0000000..029e4db
--- /dev/null
+++ b/hl/tools/testfiles/w-ext-cmpd-f1.ddl
@@ -0,0 +1,3 @@
+Opened "TEST.h5" with sec2 driver.
+Monitoring dataset /DSET_CMPD...
+dimension 0: 10->1 (decreases)
diff --git a/hl/tools/testfiles/w-ext-cmpd-f2.ddl b/hl/tools/testfiles/w-ext-cmpd-f2.ddl
new file mode 100644
index 0000000..362cc94
--- /dev/null
+++ b/hl/tools/testfiles/w-ext-cmpd-f2.ddl
@@ -0,0 +1,6 @@
+Opened "TEST.h5" with sec2 driver.
+Monitoring dataset /DSET_CMPD...
+dimension 0: 10->13 (increases)
+ Data:
+ (10) {{{2, 2, 2}}, {4, 4}}, {{{3, 3, 3}}, {5, 5}}, {{{4, 4, 4}}, {6,
+ (12) 6}}
diff --git a/hl/tools/testfiles/w-ext-cmpd-ff3.ddl b/hl/tools/testfiles/w-ext-cmpd-ff3.ddl
new file mode 100644
index 0000000..6a54b97
--- /dev/null
+++ b/hl/tools/testfiles/w-ext-cmpd-ff3.ddl
@@ -0,0 +1,2 @@
+Opened "TEST.h5" with sec2 driver.
+Monitoring dataset /DSET_CMPD...
diff --git a/hl/tools/testfiles/w-ext-cmpd-label.ddl b/hl/tools/testfiles/w-ext-cmpd-label.ddl
new file mode 100644
index 0000000..394d5a6
--- /dev/null
+++ b/hl/tools/testfiles/w-ext-cmpd-label.ddl
@@ -0,0 +1,10 @@
+Opened "TEST.h5" with sec2 driver.
+Monitoring dataset /DSET_CMPD...
+dimension 0: 10->13 (increases)
+ Data:
+ (10) {field1=1, field2={a=2, b={a=2, b=2, c=2}, c=2}, field3=3,
+ (10) field4={a=4, b=4}},
+ (11) {field1=2, field2={a=3, b={a=3, b=3, c=3}, c=3}, field3=4,
+ (11) field4={a=5, b=5}},
+ (12) {field1=3, field2={a=4, b={a=4, b=4, c=4}, c=4}, field3=5,
+ (12) field4={a=6, b=6}}
diff --git a/hl/tools/testfiles/w-ext-cmpd-two-f1.ddl b/hl/tools/testfiles/w-ext-cmpd-two-f1.ddl
new file mode 100644
index 0000000..9b4c235
--- /dev/null
+++ b/hl/tools/testfiles/w-ext-cmpd-two-f1.ddl
@@ -0,0 +1,15 @@
+Opened "TEST.h5" with sec2 driver.
+Monitoring dataset /DSET_CMPD_TWO...
+dimension 0: 4->6 (increases)
+dimension 1: 10->10 (unchanged)
+ Data:
+ (4,0) {2, {2, {2, 2, 2}, 2}}, {2, {2, {2, 2, 2}, 2}},
+ (4,2) {2, {2, {2, 2, 2}, 2}}, {2, {2, {2, 2, 2}, 2}},
+ (4,4) {2, {2, {2, 2, 2}, 2}}, {2, {2, {2, 2, 2}, 2}},
+ (4,6) {2, {2, {2, 2, 2}, 2}}, {2, {2, {2, 2, 2}, 2}},
+ (4,8) {2, {2, {2, 2, 2}, 2}}, {2, {2, {2, 2, 2}, 2}},
+ (5,0) {2, {2, {2, 2, 2}, 2}}, {2, {2, {2, 2, 2}, 2}},
+ (5,2) {2, {2, {2, 2, 2}, 2}}, {2, {2, {2, 2, 2}, 2}},
+ (5,4) {2, {2, {2, 2, 2}, 2}}, {2, {2, {2, 2, 2}, 2}},
+ (5,6) {2, {2, {2, 2, 2}, 2}}, {2, {2, {2, 2, 2}, 2}},
+ (5,8) {2, {2, {2, 2, 2}, 2}}, {2, {2, {2, 2, 2}, 2}}
diff --git a/hl/tools/testfiles/w-ext-cmpd-two-f3.ddl b/hl/tools/testfiles/w-ext-cmpd-two-f3.ddl
new file mode 100644
index 0000000..94b5c99
--- /dev/null
+++ b/hl/tools/testfiles/w-ext-cmpd-two-f3.ddl
@@ -0,0 +1,4 @@
+Opened "TEST.h5" with sec2 driver.
+Monitoring dataset /DSET_CMPD_TWO...
+dimension 0: 4->3 (decreases)
+dimension 1: 10->7 (decreases)
diff --git a/hl/tools/testfiles/w-ext-cmpd-two-ff2.ddl b/hl/tools/testfiles/w-ext-cmpd-two-ff2.ddl
new file mode 100644
index 0000000..482da31
--- /dev/null
+++ b/hl/tools/testfiles/w-ext-cmpd-two-ff2.ddl
@@ -0,0 +1,8 @@
+Opened "TEST.h5" with sec2 driver.
+Monitoring dataset /DSET_CMPD_TWO...
+dimension 0: 4->3 (decreases)
+dimension 1: 10->12 (increases)
+ Data:
+ (0,10) {{{-1, -1, -1}}, {-1, -1}}, {{{-1, -1, -1}}, {-1, -1}}
+ (1,10) {{{-1, -1, -1}}, {-1, -1}}, {{{-1, -1, -1}}, {-1, -1}}
+ (2,10) {{{-1, -1, -1}}, {-1, -1}}, {{{-1, -1, -1}}, {-1, -1}}
diff --git a/hl/tools/testfiles/w-ext-cmpd-two.ddl b/hl/tools/testfiles/w-ext-cmpd-two.ddl
new file mode 100644
index 0000000..57ffc2c
--- /dev/null
+++ b/hl/tools/testfiles/w-ext-cmpd-two.ddl
@@ -0,0 +1,7 @@
+Opened "TEST.h5" with sec2 driver.
+Monitoring dataset /DSET_CMPD_TWO...
+dimension 0: 4->6 (increases)
+dimension 1: 10->1 (decreases)
+ Data:
+ (4,0) {2, {2, {2, 2, 2}, 2}, 2, {2, 2}},
+ (5,0) {2, {2, {2, 2, 2}, 2}, 2, {2, 2}}
diff --git a/hl/tools/testfiles/w-ext-cmpd.ddl b/hl/tools/testfiles/w-ext-cmpd.ddl
new file mode 100644
index 0000000..aac5be3
--- /dev/null
+++ b/hl/tools/testfiles/w-ext-cmpd.ddl
@@ -0,0 +1,7 @@
+Opened "TEST.h5" with sec2 driver.
+Monitoring dataset /DSET_CMPD...
+dimension 0: 10->13 (increases)
+ Data:
+ (10) {1, {2, {2, 2, 2}, 2}, 3, {4, 4}},
+ (11) {2, {3, {3, 3, 3}, 3}, 4, {5, 5}},
+ (12) {3, {4, {4, 4, 4}, 4}, 5, {6, 6}}
diff --git a/hl/tools/testfiles/w-ext-early.ddl b/hl/tools/testfiles/w-ext-early.ddl
new file mode 100644
index 0000000..bb72104
--- /dev/null
+++ b/hl/tools/testfiles/w-ext-early.ddl
@@ -0,0 +1,3 @@
+Opened "TEST.h5" with sec2 driver.
+Monitoring dataset /DSET_ALLOC_EARLY...
+dimension 0: 10->9 (decreases)
diff --git a/hl/tools/testfiles/w-ext-late.ddl b/hl/tools/testfiles/w-ext-late.ddl
new file mode 100644
index 0000000..a6f8265
--- /dev/null
+++ b/hl/tools/testfiles/w-ext-late.ddl
@@ -0,0 +1,2 @@
+Opened "TEST.h5" with sec2 driver.
+Monitoring dataset /DSET_ALLOC_LATE...
diff --git a/hl/tools/testfiles/w-ext-one-d.ddl b/hl/tools/testfiles/w-ext-one-d.ddl
new file mode 100644
index 0000000..673370a
--- /dev/null
+++ b/hl/tools/testfiles/w-ext-one-d.ddl
@@ -0,0 +1,3 @@
+Opened "TEST.h5" with sec2 driver.
+Monitoring dataset /DSET_ONE...
+dimension 0: 10->13 (increases)
diff --git a/hl/tools/testfiles/w-ext-one-simple.ddl b/hl/tools/testfiles/w-ext-one-simple.ddl
new file mode 100644
index 0000000..5df9dff
--- /dev/null
+++ b/hl/tools/testfiles/w-ext-one-simple.ddl
@@ -0,0 +1,6 @@
+Opened "TEST.h5" with sec2 driver.
+Monitoring dataset /DSET_ONE...
+dimension 0: 10->12 (increases)
+ Data:
+ 0
+ 1
diff --git a/hl/tools/testfiles/w-ext-one.ddl b/hl/tools/testfiles/w-ext-one.ddl
new file mode 100644
index 0000000..9604020
--- /dev/null
+++ b/hl/tools/testfiles/w-ext-one.ddl
@@ -0,0 +1,5 @@
+Opened "TEST.h5" with sec2 driver.
+Monitoring dataset /DSET_ONE...
+dimension 0: 10->13 (increases)
+ Data:
+ (10) 0, 1, 2
diff --git a/hl/tools/testfiles/w-ext-two-d.ddl b/hl/tools/testfiles/w-ext-two-d.ddl
new file mode 100644
index 0000000..5c7af0a
--- /dev/null
+++ b/hl/tools/testfiles/w-ext-two-d.ddl
@@ -0,0 +1,4 @@
+Opened "TEST.h5" with sec2 driver.
+Monitoring dataset /DSET_TWO...
+dimension 0: 4->2 (decreases)
+dimension 1: 10->10 (unchanged)
diff --git a/hl/tools/testfiles/w-ext-two-width.ddl b/hl/tools/testfiles/w-ext-two-width.ddl
new file mode 100644
index 0000000..9f09fde
--- /dev/null
+++ b/hl/tools/testfiles/w-ext-two-width.ddl
@@ -0,0 +1,9 @@
+Opened "TEST.h5" with sec2 driver.
+Monitoring dataset /DSET_TWO...
+dimension 0: 4->4 (unchanged)
+dimension 1: 10->12 (increases)
+ Data:
+ (0,10) 0, 0
+ (1,10) 0, 0
+ (2,10) 0, 0
+ (3,10) 0, 0
diff --git a/hl/tools/testfiles/w-ext-two.ddl b/hl/tools/testfiles/w-ext-two.ddl
new file mode 100644
index 0000000..28ff075
--- /dev/null
+++ b/hl/tools/testfiles/w-ext-two.ddl
@@ -0,0 +1,11 @@
+Opened "TEST.h5" with sec2 driver.
+Monitoring dataset /DSET_TWO...
+dimension 0: 4->6 (increases)
+dimension 1: 10->12 (increases)
+ Data:
+ (0,10) 2, 2
+ (1,10) 2, 2
+ (2,10) 2, 2
+ (3,10) 2, 2
+ (4,0) 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (5,0) 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
diff --git a/hl/tools/testfiles/w-help1.ddl b/hl/tools/testfiles/w-help1.ddl
new file mode 100644
index 0000000..e6510f2
--- /dev/null
+++ b/hl/tools/testfiles/w-help1.ddl
@@ -0,0 +1,35 @@
+Usage: h5watch [OPTIONS] [OBJECT]
+
+ OPTIONS
+ --help Print a usage message and exit.
+ --version Print version number and exit.
+ --label Label members of compound typed dataset.
+ --simple Use a machine-readable output format.
+ --dim Monitor changes in size of dataset dimensions only.
+ --width=N Set the number of columns to N for output.
+ A value of 0 sets the number of columns to the
+ maximum (65535). The default width is 80 columns.
+ --polling=N Set the polling interval to N (in seconds) when the
+ dataset will be checked for appended data. The default
+ polling interval is 1.
+ --fields=<list_of_fields>
+ Display data for the fields specified in <list_of_fields>
+ for a compound data type. <list_of_fields> can be
+ specified as follows:
+ 1) A comma-separated list of field names in a
+ compound data type. "," is the separator
+ for field names while "." is the separator
+ for a nested field.
+ 2) A single field name in a compound data type.
+ Can use this option multiple times.
+ Note that backslash is the escape character to avoid
+ characters in field names that conflict with the tool's
+ separators.
+
+ OBJECT is specified as [<filename>/<path_to_dataset>/<dsetname>]
+ <filename> Name of the HDF5 file. It may be preceded by path
+ separated by slashes to the specified HDF5 file.
+ <path_to_dataset> Path separated by slashes to the specified dataset
+ <dsetname> Name of the dataset
+
+ User can end the h5watch process by ctrl-C (SIGINT) or kill the process (SIGTERM).