diff options
Diffstat (limited to 'hl')
67 files changed, 587 insertions, 407 deletions
diff --git a/hl/Makefile.in b/hl/Makefile.in index 7e6629d..14dfb78 100755 --- a/hl/Makefile.in +++ b/hl/Makefile.in @@ -271,6 +271,9 @@ RM = rm -f CP = cp TIME = time +# Path for hl needed in hdf5.h +INCLUDES = -I$(top_srcdir)/hl/src + # Some machines need a command to run executables; this is that command # so that our tests will run. # We use RUNTESTS instead of RUNSERIAL directly because it may be that diff --git a/hl/c++/Makefile.in b/hl/c++/Makefile.in index d57a8b3..27afbac 100644 --- a/hl/c++/Makefile.in +++ b/hl/c++/Makefile.in @@ -267,6 +267,9 @@ RM = rm -f CP = cp TIME = time +# Path for hl needed in hdf5.h +INCLUDES = -I$(top_srcdir)/hl/src + # Some machines need a command to run executables; this is that command # so that our tests will run. # We use RUNTESTS instead of RUNSERIAL directly because it may be that diff --git a/hl/c++/examples/Makefile.in b/hl/c++/examples/Makefile.in index 2332adf..8fd1052 100644 --- a/hl/c++/examples/Makefile.in +++ b/hl/c++/examples/Makefile.in @@ -264,6 +264,9 @@ RM = rm -f CP = cp TIME = time +# Path for hl needed in hdf5.h +INCLUDES = -I$(top_srcdir)/hl/src + # Some machines need a command to run executables; this is that command # so that our tests will run. # We use RUNTESTS instead of RUNSERIAL directly because it may be that diff --git a/hl/c++/src/H5PacketTable.h b/hl/c++/src/H5PacketTable.h index 518aa23..71c9de5 100644 --- a/hl/c++/src/H5PacketTable.h +++ b/hl/c++/src/H5PacketTable.h @@ -23,7 +23,7 @@ #ifndef H5PTWRAP_H #define H5PTWRAP_H -#include "H5PT.h" +#include "H5PTpublic.h" class H5_HLCPPDLL PacketTable { diff --git a/hl/c++/src/Makefile.am b/hl/c++/src/Makefile.am index 63e95b6..ad1e06c 100644 --- a/hl/c++/src/Makefile.am +++ b/hl/c++/src/Makefile.am @@ -20,7 +20,7 @@ include $(top_srcdir)/config/commence.am # Include src directory -INCLUDES=-I$(top_srcdir)/src -I$(top_srcdir)/hl/src +INCLUDES+=-I$(top_srcdir)/src -I$(top_srcdir)/hl/src # This is our main target lib_LTLIBRARIES=libhdf5_hl_cpp.la diff --git a/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in index 89296c2..c8e4383 100644 --- a/hl/c++/src/Makefile.in +++ b/hl/c++/src/Makefile.in @@ -290,6 +290,12 @@ RM = rm -f CP = cp TIME = time +# Path for hl needed in hdf5.h + +# Include src directory +INCLUDES = -I$(top_srcdir)/hl/src -I$(top_srcdir)/src \ + -I$(top_srcdir)/hl/src + # Some machines need a command to run executables; this is that command # so that our tests will run. # We use RUNTESTS instead of RUNSERIAL directly because it may be that @@ -334,9 +340,6 @@ TRACE = perl $(top_srcdir)/bin/trace # *.clog are from the MPE option. CHECK_CLEANFILES = *.chkexe *.chklog *.clog -# Include src directory -INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/hl/src - # This is our main target lib_LTLIBRARIES = libhdf5_hl_cpp.la diff --git a/hl/c++/test/Makefile.am b/hl/c++/test/Makefile.am index d438e41..c69d0e0 100644 --- a/hl/c++/test/Makefile.am +++ b/hl/c++/test/Makefile.am @@ -20,7 +20,7 @@ include $(top_srcdir)/config/commence.am # Include directories -INCLUDES=-I$(top_srcdir)/src -I$(top_srcdir)/hl/src -I$(top_srcdir)/hl/c++/src -I$(top_srcdir)/test +INCLUDES+=-I$(top_srcdir)/src -I$(top_srcdir)/hl/src -I$(top_srcdir)/hl/c++/src -I$(top_srcdir)/test # Shared C++ libraries aren't universally supported. if CXX_SHARED_CONDITIONAL diff --git a/hl/c++/test/Makefile.in b/hl/c++/test/Makefile.in index 4aeb064..8ebea41 100644 --- a/hl/c++/test/Makefile.in +++ b/hl/c++/test/Makefile.in @@ -284,6 +284,13 @@ RM = rm -f CP = cp TIME = time +# Path for hl needed in hdf5.h + +# Include directories +INCLUDES = -I$(top_srcdir)/hl/src -I$(top_srcdir)/src \ + -I$(top_srcdir)/hl/src -I$(top_srcdir)/hl/c++/src \ + -I$(top_srcdir)/test + # Some machines need a command to run executables; this is that command # so that our tests will run. # We use RUNTESTS instead of RUNSERIAL directly because it may be that @@ -328,9 +335,6 @@ TRACE = perl $(top_srcdir)/bin/trace # *.clog are from the MPE option. CHECK_CLEANFILES = *.chkexe *.chklog *.clog -# Include directories -INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/hl/src -I$(top_srcdir)/hl/c++/src -I$(top_srcdir)/test - # Shared C++ libraries aren't universally supported. @CXX_SHARED_CONDITIONAL_FALSE@AM_LDFLAGS = -static diff --git a/hl/examples/Makefile.in b/hl/examples/Makefile.in index 3a48602..10c65d0 100644 --- a/hl/examples/Makefile.in +++ b/hl/examples/Makefile.in @@ -264,6 +264,9 @@ RM = rm -f CP = cp TIME = time +# Path for hl needed in hdf5.h +INCLUDES = -I$(top_srcdir)/hl/src + # Some machines need a command to run executables; this is that command # so that our tests will run. # We use RUNTESTS instead of RUNSERIAL directly because it may be that diff --git a/hl/examples/ex_ds1.c b/hl/examples/ex_ds1.c index 5db5e1d..0bcfe10 100644 --- a/hl/examples/ex_ds1.c +++ b/hl/examples/ex_ds1.c @@ -12,8 +12,8 @@ * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#include "H5DS.h" -#include "H5LT.h" +#include "hdf5.h" + #define RANK 2 #define DIM_DATA 12 diff --git a/hl/examples/ex_image1.c b/hl/examples/ex_image1.c index 0535cbc..a2ac884 100644 --- a/hl/examples/ex_image1.c +++ b/hl/examples/ex_image1.c @@ -12,7 +12,7 @@ * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#include "H5IM.h" +#include "hdf5.h" #define WIDTH (hsize_t)400 #define HEIGHT (hsize_t)200 diff --git a/hl/examples/ex_image2.c b/hl/examples/ex_image2.c index 6740b06..0b4038c 100644 --- a/hl/examples/ex_image2.c +++ b/hl/examples/ex_image2.c @@ -12,7 +12,7 @@ * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#include "H5IM.h" +#include "hdf5.h" #include <stdlib.h> #include <string.h> diff --git a/hl/examples/ex_lite1.c b/hl/examples/ex_lite1.c index 6915b59..1c709f5 100644 --- a/hl/examples/ex_lite1.c +++ b/hl/examples/ex_lite1.c @@ -13,7 +13,7 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#include "H5LT.h" +#include "hdf5.h" #define RANK 2 diff --git a/hl/examples/ex_lite2.c b/hl/examples/ex_lite2.c index eee213d..181bf83 100644 --- a/hl/examples/ex_lite2.c +++ b/hl/examples/ex_lite2.c @@ -12,7 +12,7 @@ * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#include "H5LT.h" +#include "hdf5.h" int main( void ) { diff --git a/hl/examples/ex_lite3.c b/hl/examples/ex_lite3.c index 34c798a..c205b58 100644 --- a/hl/examples/ex_lite3.c +++ b/hl/examples/ex_lite3.c @@ -12,7 +12,7 @@ * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#include "H5LT.h" +#include "hdf5.h" #include <stdlib.h> #define ATTR_SIZE 5 diff --git a/hl/examples/ex_table_01.c b/hl/examples/ex_table_01.c index 0b4cc9c..b9ca3a1 100644 --- a/hl/examples/ex_table_01.c +++ b/hl/examples/ex_table_01.c @@ -12,7 +12,7 @@ * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#include "H5TB.h" +#include "hdf5.h" #include <stdlib.h> /*------------------------------------------------------------------------- diff --git a/hl/examples/ex_table_02.c b/hl/examples/ex_table_02.c index 16cf33e..71671c1 100644 --- a/hl/examples/ex_table_02.c +++ b/hl/examples/ex_table_02.c @@ -12,7 +12,7 @@ * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#include "H5TB.h" +#include "hdf5.h" #include <stdlib.h> /*------------------------------------------------------------------------- diff --git a/hl/examples/ex_table_03.c b/hl/examples/ex_table_03.c index fbe66a1..f8287e1 100644 --- a/hl/examples/ex_table_03.c +++ b/hl/examples/ex_table_03.c @@ -13,7 +13,7 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#include "H5TB.h" +#include "hdf5.h" #include <stdlib.h> /*------------------------------------------------------------------------- diff --git a/hl/examples/ex_table_04.c b/hl/examples/ex_table_04.c index f31cc40..4f378e1 100644 --- a/hl/examples/ex_table_04.c +++ b/hl/examples/ex_table_04.c @@ -12,7 +12,7 @@ * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#include "H5TB.h" +#include "hdf5.h" #include <stdlib.h> /*------------------------------------------------------------------------- diff --git a/hl/examples/ex_table_05.c b/hl/examples/ex_table_05.c index e658ee3..321c060 100644 --- a/hl/examples/ex_table_05.c +++ b/hl/examples/ex_table_05.c @@ -13,7 +13,7 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#include "H5TB.h" +#include "hdf5.h" #include <stdlib.h> /*------------------------------------------------------------------------- diff --git a/hl/examples/ex_table_06.c b/hl/examples/ex_table_06.c index 8d48b3c..c755ed0 100644 --- a/hl/examples/ex_table_06.c +++ b/hl/examples/ex_table_06.c @@ -12,7 +12,7 @@ * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#include "H5TB.h" +#include "hdf5.h" #include <stdlib.h> /*------------------------------------------------------------------------- diff --git a/hl/examples/ex_table_07.c b/hl/examples/ex_table_07.c index f577c59..6f73d10 100644 --- a/hl/examples/ex_table_07.c +++ b/hl/examples/ex_table_07.c @@ -12,7 +12,7 @@ * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#include "H5TB.h" +#include "hdf5.h" #include <stdlib.h> /*------------------------------------------------------------------------- diff --git a/hl/examples/ex_table_08.c b/hl/examples/ex_table_08.c index 0be5bbc..e77c632 100644 --- a/hl/examples/ex_table_08.c +++ b/hl/examples/ex_table_08.c @@ -12,7 +12,7 @@ * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#include "H5TB.h" +#include "hdf5.h" #include <stdlib.h> /*------------------------------------------------------------------------- diff --git a/hl/examples/ex_table_09.c b/hl/examples/ex_table_09.c index 164f6aa..67dc2ce 100644 --- a/hl/examples/ex_table_09.c +++ b/hl/examples/ex_table_09.c @@ -12,7 +12,7 @@ * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#include "H5TB.h" +#include "hdf5.h" #include <stdlib.h> /*------------------------------------------------------------------------- diff --git a/hl/examples/ex_table_10.c b/hl/examples/ex_table_10.c index b1e6705..ef84446 100644 --- a/hl/examples/ex_table_10.c +++ b/hl/examples/ex_table_10.c @@ -12,7 +12,7 @@ * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#include "H5TB.h" +#include "hdf5.h" #include <stdlib.h> /*------------------------------------------------------------------------- diff --git a/hl/examples/ex_table_11.c b/hl/examples/ex_table_11.c index 4d12fd7..81af4e4 100644 --- a/hl/examples/ex_table_11.c +++ b/hl/examples/ex_table_11.c @@ -12,7 +12,7 @@ * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#include "H5TB.h" +#include "hdf5.h" #include <stdlib.h> /*------------------------------------------------------------------------- diff --git a/hl/examples/ex_table_12.c b/hl/examples/ex_table_12.c index 3f44bf1..17bcf7e 100644 --- a/hl/examples/ex_table_12.c +++ b/hl/examples/ex_table_12.c @@ -12,7 +12,7 @@ * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#include "H5TB.h" +#include "hdf5.h" #include <stdlib.h> /*------------------------------------------------------------------------- diff --git a/hl/examples/ptExampleFL.c b/hl/examples/ptExampleFL.c index 0dbf935..1596f7a 100644 --- a/hl/examples/ptExampleFL.c +++ b/hl/examples/ptExampleFL.c @@ -12,7 +12,7 @@ * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#include "H5PT.h" +#include "hdf5.h" #include <stdlib.h> /*------------------------------------------------------------------------- diff --git a/hl/examples/ptExampleVL.c b/hl/examples/ptExampleVL.c index b813b54..eebb3c3 100644 --- a/hl/examples/ptExampleVL.c +++ b/hl/examples/ptExampleVL.c @@ -12,7 +12,7 @@ * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#include "H5PT.h" +#include "hdf5.h" #include <stdlib.h> /*------------------------------------------------------------------------- diff --git a/hl/fortran/Makefile.in b/hl/fortran/Makefile.in index 51dfe3d..15b15a2 100644 --- a/hl/fortran/Makefile.in +++ b/hl/fortran/Makefile.in @@ -271,6 +271,9 @@ RM = rm -f CP = cp TIME = time +# Path for hl needed in hdf5.h +INCLUDES = -I$(top_srcdir)/hl/src + # Some machines need a command to run executables; this is that command # so that our tests will run. # We use RUNTESTS instead of RUNSERIAL directly because it may be that diff --git a/hl/fortran/examples/Makefile.in b/hl/fortran/examples/Makefile.in index 14b34db..fdecd77 100644 --- a/hl/fortran/examples/Makefile.in +++ b/hl/fortran/examples/Makefile.in @@ -264,6 +264,9 @@ RM = rm -f CP = cp TIME = time +# Path for hl needed in hdf5.h +INCLUDES = -I$(top_srcdir)/hl/src + # Some machines need a command to run executables; this is that command # so that our tests will run. # We use RUNTESTS instead of RUNSERIAL directly because it may be that diff --git a/hl/fortran/src/H5IMcc.c b/hl/fortran/src/H5IMcc.c index 9e14d6e..19a99ba 100644 --- a/hl/fortran/src/H5IMcc.c +++ b/hl/fortran/src/H5IMcc.c @@ -12,7 +12,7 @@ * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#include "H5IM.h" +#include "H5IMprivate.h" #include "H5IMcc.h" #include "H5f90i_gen.h" diff --git a/hl/fortran/src/H5IMcc.h b/hl/fortran/src/H5IMcc.h index b16eeb2..54666c4 100644 --- a/hl/fortran/src/H5IMcc.h +++ b/hl/fortran/src/H5IMcc.h @@ -15,8 +15,8 @@ #ifndef _H5IMCC_H #define _H5IMCC_H -#include "H5LT.h" -#include "H5IM.h" +#include "H5LTprivate.h" +#include "H5IMprivate.h" #include "../../fortran/src/H5f90i_gen.h" #ifdef __cplusplus diff --git a/hl/fortran/src/H5IMfc.c b/hl/fortran/src/H5IMfc.c index b024edc..0062d60 100755 --- a/hl/fortran/src/H5IMfc.c +++ b/hl/fortran/src/H5IMfc.c @@ -14,7 +14,7 @@ /* This files contains C stubs for H5D Fortran APIs */ -#include "H5IM.h" +#include "H5IMprivate.h" #include "H5IMcc.h" #include "H5LTf90proto.h" #include "../../../fortran/src/H5f90i_gen.h" diff --git a/hl/fortran/src/H5LTfc.c b/hl/fortran/src/H5LTfc.c index 693eca9..d3353c4 100755 --- a/hl/fortran/src/H5LTfc.c +++ b/hl/fortran/src/H5LTfc.c @@ -14,7 +14,7 @@ /* This files contains C stubs for H5D Fortran APIs */ -#include "H5LT.h" +#include "H5LTprivate.h" #include "H5LTf90proto.h" diff --git a/hl/fortran/src/H5TBfc.c b/hl/fortran/src/H5TBfc.c index 29cf15b..2bce973 100755 --- a/hl/fortran/src/H5TBfc.c +++ b/hl/fortran/src/H5TBfc.c @@ -14,7 +14,7 @@ /* This files contains C stubs for H5D Fortran APIs */ -#include "H5TB.h" +#include "H5TBprivate.h" #include "H5LTf90proto.h" /*------------------------------------------------------------------------- diff --git a/hl/fortran/src/Makefile.am b/hl/fortran/src/Makefile.am index 6ee69cf..9fe8618 100644 --- a/hl/fortran/src/Makefile.am +++ b/hl/fortran/src/Makefile.am @@ -20,7 +20,7 @@ include $(top_srcdir)/config/commence.am -INCLUDES=-I$(top_srcdir)/src -I$(top_srcdir)/hl/src -I$(top_builddir)/hl/src \ +INCLUDES+=-I$(top_srcdir)/src -I$(top_srcdir)/hl/src -I$(top_builddir)/hl/src \ -I$(top_srcdir)/fortran/src -I$(top_builddir)/fortran/src AM_FCFLAGS=-I$(top_builddir)/fortran/src $(F9XMODFLAG)$(top_builddir)/fortran/src diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in index e73d461..67a789c 100644 --- a/hl/fortran/src/Makefile.in +++ b/hl/fortran/src/Makefile.in @@ -293,6 +293,11 @@ RM = rm -f CP = cp TIME = time +# Path for hl needed in hdf5.h +INCLUDES = -I$(top_srcdir)/hl/src -I$(top_srcdir)/src \ + -I$(top_srcdir)/hl/src -I$(top_builddir)/hl/src \ + -I$(top_srcdir)/fortran/src -I$(top_builddir)/fortran/src + # Some machines need a command to run executables; this is that command # so that our tests will run. # We use RUNTESTS instead of RUNSERIAL directly because it may be that @@ -336,9 +341,6 @@ TRACE = perl $(top_srcdir)/bin/trace # .chklog files are output from those tests. # *.clog are from the MPE option. CHECK_CLEANFILES = *.chkexe *.chklog *.clog -INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/hl/src -I$(top_builddir)/hl/src \ - -I$(top_srcdir)/fortran/src -I$(top_builddir)/fortran/src - AM_FCFLAGS = -I$(top_builddir)/fortran/src $(F9XMODFLAG)$(top_builddir)/fortran/src # Our main target, the high-level fortran library diff --git a/hl/fortran/test/Makefile.in b/hl/fortran/test/Makefile.in index 521d214..7c43420 100644 --- a/hl/fortran/test/Makefile.in +++ b/hl/fortran/test/Makefile.in @@ -292,6 +292,9 @@ RM = rm -f CP = cp TIME = time +# Path for hl needed in hdf5.h +INCLUDES = -I$(top_srcdir)/hl/src + # Some machines need a command to run executables; this is that command # so that our tests will run. # We use RUNTESTS instead of RUNSERIAL directly because it may be that diff --git a/hl/src/H5DS.c b/hl/src/H5DS.c index 5d5001d..0c8c201 100644 --- a/hl/src/H5DS.c +++ b/hl/src/H5DS.c @@ -12,12 +12,11 @@ * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#include "H5private.h" -#include "H5DS.h" -#include "H5LT.h" #include <stdlib.h> -#include "H5IM.h" -#include "H5TB.h" +#include "H5DSprivate.h" +#include "H5LTprivate.h" +#include "H5IMprivate.h" +#include "H5TBprivate.h" @@ -30,7 +29,7 @@ * If DIMNAME is specified, then an attribute called NAME is created, * with the value DIMNAME. * - * Return: Success: SUCCESS, Failure: FAIL + * Return: Success: SUCCEED, Failure: FAIL * * Programmer: pvn@ncsa.uiuc.edu * @@ -86,7 +85,7 @@ herr_t H5DSset_scale(hid_t dsid, return FAIL; } - return SUCCESS; + return SUCCEED; } @@ -99,7 +98,7 @@ herr_t H5DSset_scale(hid_t dsid, * REFERENCE_LIST attributes. * * Return: - * Success: SUCCESS + * Success: SUCCEED * Failure: FAIL * * Fails if: Bad arguments @@ -540,7 +539,7 @@ herr_t H5DSattach_scale(hid_t did, return FAIL; } - return SUCCESS; + return SUCCEED; /* error zone, gracefully close */ out: @@ -560,7 +559,7 @@ out: * DIMENSION_LIST and REFERENCE_LIST attributes. * * Return: - * Success: SUCCESS + * Success: SUCCEED * Failure: FAIL * * Fails if: Bad arguments @@ -901,7 +900,7 @@ herr_t H5DSdetach_scale(hid_t did, } - return SUCCESS; + return SUCCEED; /* error zone, gracefully close */ out: @@ -1287,7 +1286,7 @@ herr_t H5DSiterate_scales(hid_t did, return FAIL; if (has_dimlist == 0) - return SUCCESS; + return SUCCEED; else if (has_dimlist == 1 ) { @@ -1385,7 +1384,7 @@ out: * * Purpose: Set label for the dimension IDX of dataset DID to the value LABEL * - * Return: Success: SUCCESS, Failure: FAIL + * Return: Success: SUCCEED, Failure: FAIL * * Programmer: pvn@ncsa.uiuc.edu * @@ -1533,7 +1532,7 @@ herr_t H5DSset_label(hid_t did, free(buf); } - return SUCCESS; + return SUCCEED; /* error zone, gracefully close */ out: diff --git a/hl/src/H5DSprivate.h b/hl/src/H5DSprivate.h new file mode 100644 index 0000000..1d922be --- /dev/null +++ b/hl/src/H5DSprivate.h @@ -0,0 +1,58 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * 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 files COPYING and Copyright.html. COPYING can be found at the root * + * of the source code distribution tree; Copyright.html can be found at the * + * root level of an installed copy of the electronic HDF5 document set and * + * is linked from the top-level documents page. It can also be found at * + * http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have * + * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#ifndef _H5DSprivate_H +#define _H5DSprivate_H + +/* public hdf5 prototypes */ +#include "H5Ipublic.h" +#include "H5Tpublic.h" +#include "H5Spublic.h" +#include "H5Dpublic.h" +#include "H5Ppublic.h" +#include "H5Gpublic.h" +#include "H5Apublic.h" +#include "H5Epublic.h" +#include "H5Rpublic.h" + +/* public LT prototypes */ +#include "H5LTpublic.h" +#include "H5DSpublic.h" + + +#define DIMENSION_SCALE_CLASS "DIMENSION_SCALE" +#define DIMENSION_LIST "DIMENSION_LIST" +#define REFERENCE_LIST "REFERENCE_LIST" +#define DIMENSION_LABELS "DIMENSION_LABELS" + + + +/* attribute type of a DS dataset */ +typedef struct ds_list_t { + hobj_ref_t ref; /* object reference */ + int dim_idx; /* dimension index of the dataset */ +} ds_list_t; + + +/*------------------------------------------------------------------------- + * private functions + *------------------------------------------------------------------------- + */ + + +H5_HLDLL herr_t H5DS_is_reserved( hid_t did); + + + +#endif diff --git a/hl/src/H5DS.h b/hl/src/H5DSpublic.h index b56590b..cfec471 100644 --- a/hl/src/H5DS.h +++ b/hl/src/H5DSpublic.h @@ -12,30 +12,12 @@ * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _H5DS_H -#define _H5DS_H - -#include <hdf5.h> - -#ifndef TRUE -#define TRUE 1 -#endif - -#define DIMENSION_SCALE_CLASS "DIMENSION_SCALE" -#define DIMENSION_LIST "DIMENSION_LIST" -#define REFERENCE_LIST "REFERENCE_LIST" -#define DIMENSION_LABELS "DIMENSION_LABELS" +#ifndef _H5DSpublic_H +#define _H5DSpublic_H typedef herr_t (*H5DS_iterate_t)(hid_t dset, unsigned dim, hid_t scale, void *visitor_data); -/* attribute type of a DS dataset */ -typedef struct ds_list_t { - hobj_ref_t ref; /* object reference */ - int dim_idx; /* dimension index of the dataset */ -} ds_list_t; - - #ifdef __cplusplus extern "C" { #endif @@ -81,16 +63,6 @@ H5_HLDLL htri_t H5DSis_attached( hid_t did, -/*------------------------------------------------------------------------- - * private functions - *------------------------------------------------------------------------- - */ - - -H5_HLDLL herr_t H5DS_is_reserved( hid_t did); - - - #ifdef __cplusplus } #endif diff --git a/hl/src/H5HL_private.c b/hl/src/H5HL_private.c deleted file mode 100644 index 3b6377f..0000000 --- a/hl/src/H5HL_private.c +++ /dev/null @@ -1,169 +0,0 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * 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 files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -#include "H5HL_private.h" - -/*------------------------------------------------------------------------- - * - * Functions shared between H5TB and H5PT - * - *------------------------------------------------------------------------- - */ - -/*------------------------------------------------------------------------- - * Function: H5TBcommon_append_records - * - * Purpose: Common code for reading records shared between H5PT and H5TB - * - * Return: Success: 0, Failure: -1 - * - * Programmer: Nat Furrer, nfurrer@ncsa.uiuc.edu - * James Laird, jlaird@ncsa.uiuc.edu - * - * Date: March 8, 2004 - * - * Comments: Called by H5TBappend_records and H5PTappend_records - * - * Modifications: - * - *------------------------------------------------------------------------- - */ -herr_t H5TBcommon_append_records( hid_t dataset_id, - hid_t mem_type_id, - hsize_t nrecords, - hsize_t orig_table_size, - const void * data) -{ - hsize_t count[1]; - hsize_t offset[1]; - hid_t space_id = H5I_BADID; - hid_t mem_space_id = H5I_BADID; - hsize_t dims[1]; - hsize_t mem_dims[1]; - - /* Extend the dataset */ - dims[0] = nrecords + orig_table_size; - if ( H5Dextend ( dataset_id, dims ) < 0 ) - goto out; - - /* Create a simple memory data space */ - mem_dims[0]=nrecords; - if ( (mem_space_id = H5Screate_simple( 1, mem_dims, NULL )) < 0 ) - goto out; - - /* Get a copy of the new file data space for writing */ - if ( (space_id = H5Dget_space( dataset_id )) < 0 ) - goto out; - - /* Define a hyperslab in the dataset */ - offset[0] = orig_table_size; - count[0] = nrecords; - if ( H5Sselect_hyperslab( space_id, H5S_SELECT_SET, offset, NULL, count, NULL) < 0 ) - goto out; - - /* Write the records */ - if ( H5Dwrite( dataset_id, mem_type_id, mem_space_id, space_id, H5P_DEFAULT, data ) < -0 ) - goto out; - - /* Terminate access to the dataspace */ - if ( H5Sclose( mem_space_id ) < 0 ) - goto out; - - if ( H5Sclose( space_id ) < 0 ) - goto out; - - return 0; - -out: - H5E_BEGIN_TRY - H5Sclose(mem_space_id); - H5Sclose(space_id); - H5E_END_TRY - return -1; -} - - -/*------------------------------------------------------------------------- - * Function: H5TBcommon_read_records - * - * Purpose: Common code for reading records shared between H5PT and H5TB - * - * Return: Success: 0, Failure: -1 - * - * Programmer: Nat Furrer, nfurrer@ncsa.uiuc.edu - * James Laird, jlaird@ncsa.uiuc.edu - * - * Date: March 8, 2004 - * - * Comments: Called by H5TBread_records and H5PTread_records - * - * Modifications: - * - * - *------------------------------------------------------------------------- - */ -herr_t H5TBcommon_read_records( hid_t dataset_id, - hid_t mem_type_id, - hsize_t start, - hsize_t nrecords, - hsize_t table_size, - void *data) -{ - hsize_t count[1]; - hsize_t offset[1]; - hid_t space_id = H5I_BADID; - hid_t mem_space_id = H5I_BADID; - hsize_t mem_size[1]; - - /* Make sure the read request is in bounds */ - if ( start + nrecords > table_size ) - goto out; - - /* Get the dataspace handle */ - if ( (space_id = H5Dget_space( dataset_id )) < 0 ) - goto out; - - /* Define a hyperslab in the dataset of the size of the records */ - offset[0] = start; - count[0] = nrecords; - if ( H5Sselect_hyperslab( space_id, H5S_SELECT_SET, offset, NULL, count, NULL) < 0 ) - goto out; - - /* Create a memory dataspace handle */ - mem_size[0] = count[0]; - if ((mem_space_id = H5Screate_simple( 1, mem_size, NULL )) < 0 ) - goto out; - if ((H5Dread( dataset_id, mem_type_id, mem_space_id, space_id, H5P_DEFAULT, data)) < 0 - ) - goto out; - - /* Terminate access to the memory dataspace */ - if ( H5Sclose( mem_space_id ) < 0 ) - goto out; - - /* Terminate access to the dataspace */ - if ( H5Sclose( space_id ) < 0 ) - goto out; - - return 0; - -out: - H5E_BEGIN_TRY - H5Sclose(space_id); - H5Sclose(mem_space_id); - H5E_END_TRY - return -1; -} - diff --git a/hl/src/H5IM.c b/hl/src/H5IM.c index 19eb805..12269c4 100644 --- a/hl/src/H5IM.c +++ b/hl/src/H5IM.c @@ -12,11 +12,11 @@ * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#include "H5IM.h" - - +#include "H5IMprivate.h" +#include "H5LTprivate.h" #include <string.h> #include <stdlib.h> + /*------------------------------------------------------------------------- * Function: H5IMmake_image_8bit * diff --git a/hl/src/H5IMprivate.h b/hl/src/H5IMprivate.h new file mode 100644 index 0000000..bca5a84 --- /dev/null +++ b/hl/src/H5IMprivate.h @@ -0,0 +1,43 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * 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 files COPYING and Copyright.html. COPYING can be found at the root * + * of the source code distribution tree; Copyright.html can be found at the * + * root level of an installed copy of the electronic HDF5 document set and * + * is linked from the top-level documents page. It can also be found at * + * http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have * + * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#ifndef _H5IMprivate_H +#define _H5IMprivate_H + +/* public hdf5 prototypes */ +#include "H5Rpublic.h" +#include "H5Apublic.h" +#include "H5Spublic.h" +#include "H5Dpublic.h" + +/* public LT prototypes */ +#include "H5LTpublic.h" +#include "H5IMpublic.h" + + +#define IMAGE_CLASS "IMAGE" +#define PALETTE_CLASS "PALETTE" +#define IMAGE_VERSION "1.2" +#define IMAGE8_RANK 3 +#define IMAGE24_RANK 3 + + +/*------------------------------------------------------------------------- + * Private functions + *------------------------------------------------------------------------- + */ +H5_HLDLL herr_t H5IM_find_palette(hid_t loc_id ); + + +#endif diff --git a/hl/src/H5IM.h b/hl/src/H5IMpublic.h index 54dc404..a14f2f2 100644 --- a/hl/src/H5IM.h +++ b/hl/src/H5IMpublic.h @@ -12,21 +12,14 @@ * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _H5IM_H -#define _H5IM_H +#ifndef _H5IMpublic_H +#define _H5IMpublic_H -#include "H5LT.h" #ifdef __cplusplus extern "C" { #endif -#define IMAGE_CLASS "IMAGE" -#define PALETTE_CLASS "PALETTE" -#define IMAGE_VERSION "1.2" -#define IMAGE8_RANK 3 -#define IMAGE24_RANK 3 - H5_HLDLL herr_t H5IMmake_image_8bit( hid_t loc_id, const char *dset_name, @@ -53,8 +46,6 @@ H5_HLDLL herr_t H5IMread_image( hid_t loc_id, const char *dset_name, unsigned char *buffer ); - - H5_HLDLL herr_t H5IMmake_palette( hid_t loc_id, const char *pal_name, const hsize_t *pal_dims, @@ -77,7 +68,6 @@ H5_HLDLL herr_t H5IMget_palette_info( hid_t loc_id, int pal_number, hsize_t *pal_dims ); - H5_HLDLL herr_t H5IMget_palette( hid_t loc_id, const char *image_name, int pal_number, diff --git a/hl/src/H5LT.c b/hl/src/H5LT.c index 4598dc5..5d281a7 100644 --- a/hl/src/H5LT.c +++ b/hl/src/H5LT.c @@ -12,14 +12,14 @@ * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#include "H5LT.h" +#include "H5LTprivate.h" #include <string.h> #include <stdlib.h> #include <assert.h> +#include <stdio.h> + /* For Lex and Yacc */ -#define SUCCEED 0 -#define FAIL -1 #define COL 3 #define LIMIT 512 #define INCREMENT 1024 @@ -3590,7 +3590,7 @@ herr_t H5LT_set_attribute_string(hid_t dset_id, if (H5Tclose(tid)<0) goto out; - return SUCCESS; + return SUCCEED; /* error zone, gracefully close */ out: diff --git a/hl/src/H5LTprivate.h b/hl/src/H5LTprivate.h new file mode 100644 index 0000000..22d753c --- /dev/null +++ b/hl/src/H5LTprivate.h @@ -0,0 +1,70 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * 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 files COPYING and Copyright.html. COPYING can be found at the root * + * of the source code distribution tree; Copyright.html can be found at the * + * root level of an installed copy of the electronic HDF5 document set and * + * is linked from the top-level documents page. It can also be found at * + * http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have * + * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#ifndef _H5LTprivate_H +#define _H5LTprivate_H + +#include "H5private.h" +/* public hdf5 prototypes */ +#include "H5Ipublic.h" +#include "H5Tpublic.h" +#include "H5Spublic.h" +#include "H5Dpublic.h" +#include "H5Ppublic.h" +#include "H5Gpublic.h" +#include "H5Apublic.h" +#include "H5Epublic.h" +/* public LT prototypes */ +#include "H5LTpublic.h" + +#define TESTING(WHAT) {printf("%-70s", "Testing " WHAT); fflush(stdout);} +#define TESTING2(WHAT) {printf("%-70s", "Testing " WHAT); fflush(stdout);} +#define TESTING3(WHAT) {printf("%-70s", "" WHAT); fflush(stdout);} +#define PASSED() {puts(" PASSED");fflush(stdout);} +#define H5_FAILED() {puts("*FAILED*");fflush(stdout);} +#define SKIPPED() {puts(" -SKIP-");fflush(stdout);} +#define EXAMPLE(WHAT) {printf("%-70s", "Example " WHAT); fflush(stdout);} + +/*------------------------------------------------------------------------- + * Private functions + *------------------------------------------------------------------------- + */ + +H5_HLDLL herr_t H5LT_get_attribute_mem( hid_t obj_id, + const char *attr_name, + hid_t mem_type_id, + void *data ); + +H5_HLDLL herr_t H5LT_get_attribute_disk( hid_t obj_id, + const char *attr_name, + void *data ); + +H5_HLDLL herr_t H5LT_find_attribute( hid_t loc_id, const char *name ); + +H5_HLDLL herr_t H5LT_set_attribute_numerical( hid_t loc_id, + const char *obj_name, + const char *attr_name, + size_t size, + hid_t type_id, + const void *data ); + +H5_HLDLL herr_t H5LT_set_attribute_string( hid_t dset_id, + char *name, + char *buf ); + +H5_HLDLL herr_t H5LT_dtype_to_text(hid_t dtype, char **dt_str, H5LT_lang_t lang, + size_t *slen, hbool_t no_user_buf); + + +#endif diff --git a/hl/src/H5LT.h b/hl/src/H5LTpublic.h index 0024fcf..cfccb08 100644 --- a/hl/src/H5LT.h +++ b/hl/src/H5LTpublic.h @@ -12,27 +12,12 @@ * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _H5LT_H -#define _H5LT_H +#ifndef _H5LTpublic_H +#define _H5LTpublic_H -#include <hdf5.h> - -#ifndef FAIL -#define FAIL -1 -#endif - -#ifndef SUCCESS -#define SUCCESS 0 -#endif - -#define TESTING(WHAT) {printf("%-70s", "Testing " WHAT); fflush(stdout);} -#define TESTING2(WHAT) {printf("%-70s", "Testing " WHAT); fflush(stdout);} -#define TESTING3(WHAT) {printf("%-70s", "" WHAT); fflush(stdout);} -#define PASSED() {puts(" PASSED");fflush(stdout);} -#define H5_FAILED() {puts("*FAILED*");fflush(stdout);} -#define SKIPPED() {puts(" -SKIP-");fflush(stdout);} -#define EXAMPLE(WHAT) {printf("%-70s", "Example " WHAT); fflush(stdout);} +/* Public headers needed by this file */ +#include "H5public.h" typedef enum H5LT_lang_t { H5LT_LANG_ERR = -1, /*this is the first*/ @@ -42,6 +27,8 @@ typedef enum H5LT_lang_t { H5LT_NO_LANG = 3 /*this is the last*/ } H5LT_lang_t; + + #ifdef __cplusplus extern "C" { #endif @@ -367,36 +354,6 @@ H5_HLDLL herr_t H5LTrepack( hsize_t nfields, -/*------------------------------------------------------------------------- - * - * Private functions - * - *------------------------------------------------------------------------- - */ -H5_HLDLL herr_t H5LT_get_attribute_mem( hid_t obj_id, - const char *attr_name, - hid_t mem_type_id, - void *data ); - -H5_HLDLL herr_t H5LT_get_attribute_disk( hid_t obj_id, - const char *attr_name, - void *data ); - -H5_HLDLL herr_t H5LT_find_attribute( hid_t loc_id, const char *name ); - -H5_HLDLL herr_t H5LT_set_attribute_numerical( hid_t loc_id, - const char *obj_name, - const char *attr_name, - size_t size, - hid_t type_id, - const void *data ); - -H5_HLDLL herr_t H5LT_set_attribute_string( hid_t dset_id, - char *name, - char *buf ); - -H5_HLDLL herr_t H5LT_dtype_to_text(hid_t dtype, char **dt_str, H5LT_lang_t lang, - size_t *slen, hbool_t no_user_buf); #ifdef __cplusplus } diff --git a/hl/src/H5PT.c b/hl/src/H5PT.c index d9ff03b..09c9074 100644 --- a/hl/src/H5PT.c +++ b/hl/src/H5PT.c @@ -12,8 +12,8 @@ * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#include "H5PT.h" -#include "H5HL_private.h" +#include "H5PTprivate.h" +#include "H5TBprivate.h" #include <stdlib.h> /* Packet Table private data */ diff --git a/hl/src/H5PTprivate.h b/hl/src/H5PTprivate.h new file mode 100644 index 0000000..bf6a00b --- /dev/null +++ b/hl/src/H5PTprivate.h @@ -0,0 +1,22 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * 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 files COPYING and Copyright.html. COPYING can be found at the root * + * of the source code distribution tree; Copyright.html can be found at the * + * root level of an installed copy of the electronic HDF5 document set and * + * is linked from the top-level documents page. It can also be found at * + * http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have * + * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#ifndef _H5PTprivate_H +#define _H5PTprivate_H + + +/* public LT prototypes */ +#include "H5PTpublic.h" + +#endif diff --git a/hl/src/H5PT.h b/hl/src/H5PTpublic.h index aaf378b..5bcb203 100644 --- a/hl/src/H5PT.h +++ b/hl/src/H5PTpublic.h @@ -12,14 +12,20 @@ * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _H5PT_H -#define _H5PT_H - -#include <hdf5.h> - -#if 0 -#define H5_PT_DEBUG -#endif +#ifndef _H5PTpublic_H +#define _H5PTpublic_H + + +/* public hdf5 prototypes */ +#include "H5Ipublic.h" +#include "H5Tpublic.h" +#include "H5Spublic.h" +#include "H5Dpublic.h" +#include "H5Ppublic.h" +#include "H5Gpublic.h" +#include "H5Apublic.h" +#include "H5Epublic.h" +#include "H5Rpublic.h" #ifdef __cplusplus extern "C" { diff --git a/hl/src/H5TB.c b/hl/src/H5TB.c index 8a2cdd6..720bb0a 100644 --- a/hl/src/H5TB.c +++ b/hl/src/H5TB.c @@ -12,38 +12,33 @@ * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#include "H5TB.h" -#include "H5HL_private.h" +#include "H5TBprivate.h" #include <stdlib.h> #include <string.h> -#if 0 -#define SHRINK -#endif - /*------------------------------------------------------------------------- * - * Private functions + * internal functions * *------------------------------------------------------------------------- */ -int H5TB_find_field(const char *field, - const char *field_list); +static int H5TB_find_field(const char *field, + const char *field_list); -herr_t H5TB_attach_attributes(const char *table_title, - hid_t loc_id, - const char *dset_name, - hsize_t nfields, - hid_t tid ); +static herr_t H5TB_attach_attributes(const char *table_title, + hid_t loc_id, + const char *dset_name, + hsize_t nfields, + hid_t tid ); -hid_t H5TB_create_type(hid_t loc_id, - const char *dset_name, - size_t dst_size, - const size_t *dst_offset, - const size_t *dst_sizes, - hid_t ftype_id); +static hid_t H5TB_create_type(hid_t loc_id, + const char *dset_name, + size_t dst_size, + const size_t *dst_offset, + const size_t *dst_sizes, + hid_t ftype_id); /*------------------------------------------------------------------------- * @@ -3439,7 +3434,7 @@ out: /*------------------------------------------------------------------------- * - * Private functions + * internal functions * *------------------------------------------------------------------------- */ @@ -3458,7 +3453,7 @@ out: *------------------------------------------------------------------------- */ - +static int H5TB_find_field( const char *field, const char *field_list ) { const char *start = field_list; @@ -3496,7 +3491,7 @@ int H5TB_find_field( const char *field, const char *field_list ) *------------------------------------------------------------------------- */ - +static herr_t H5TB_attach_attributes( const char *table_title, hid_t loc_id, const char *dset_name, @@ -3567,6 +3562,7 @@ out: *------------------------------------------------------------------------- */ +static hid_t H5TB_create_type(hid_t loc_id, const char *dset_name, size_t dst_size, @@ -3651,3 +3647,157 @@ out: } + +/*------------------------------------------------------------------------- + * + * Functions shared between H5TB and H5PT + * + *------------------------------------------------------------------------- + */ + +/*------------------------------------------------------------------------- + * Function: H5TBcommon_append_records + * + * Purpose: Common code for reading records shared between H5PT and H5TB + * + * Return: Success: 0, Failure: -1 + * + * Programmer: Nat Furrer, nfurrer@ncsa.uiuc.edu + * James Laird, jlaird@ncsa.uiuc.edu + * + * Date: March 8, 2004 + * + * Comments: Called by H5TBappend_records and H5PTappend_records + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t H5TBcommon_append_records( hid_t dataset_id, + hid_t mem_type_id, + hsize_t nrecords, + hsize_t orig_table_size, + const void * data) +{ + hsize_t count[1]; + hsize_t offset[1]; + hid_t space_id = H5I_BADID; + hid_t mem_space_id = H5I_BADID; + hsize_t dims[1]; + hsize_t mem_dims[1]; + + /* Extend the dataset */ + dims[0] = nrecords + orig_table_size; + if ( H5Dextend ( dataset_id, dims ) < 0 ) + goto out; + + /* Create a simple memory data space */ + mem_dims[0]=nrecords; + if ( (mem_space_id = H5Screate_simple( 1, mem_dims, NULL )) < 0 ) + goto out; + + /* Get a copy of the new file data space for writing */ + if ( (space_id = H5Dget_space( dataset_id )) < 0 ) + goto out; + + /* Define a hyperslab in the dataset */ + offset[0] = orig_table_size; + count[0] = nrecords; + if ( H5Sselect_hyperslab( space_id, H5S_SELECT_SET, offset, NULL, count, NULL) < 0 ) + goto out; + + /* Write the records */ + if ( H5Dwrite( dataset_id, mem_type_id, mem_space_id, space_id, H5P_DEFAULT, data ) < +0 ) + goto out; + + /* Terminate access to the dataspace */ + if ( H5Sclose( mem_space_id ) < 0 ) + goto out; + + if ( H5Sclose( space_id ) < 0 ) + goto out; + + return 0; + +out: + H5E_BEGIN_TRY + H5Sclose(mem_space_id); + H5Sclose(space_id); + H5E_END_TRY + return -1; +} + + +/*------------------------------------------------------------------------- + * Function: H5TBcommon_read_records + * + * Purpose: Common code for reading records shared between H5PT and H5TB + * + * Return: Success: 0, Failure: -1 + * + * Programmer: Nat Furrer, nfurrer@ncsa.uiuc.edu + * James Laird, jlaird@ncsa.uiuc.edu + * + * Date: March 8, 2004 + * + * Comments: Called by H5TBread_records and H5PTread_records + * + * Modifications: + * + * + *------------------------------------------------------------------------- + */ +herr_t H5TBcommon_read_records( hid_t dataset_id, + hid_t mem_type_id, + hsize_t start, + hsize_t nrecords, + hsize_t table_size, + void *data) +{ + hsize_t count[1]; + hsize_t offset[1]; + hid_t space_id = H5I_BADID; + hid_t mem_space_id = H5I_BADID; + hsize_t mem_size[1]; + + /* Make sure the read request is in bounds */ + if ( start + nrecords > table_size ) + goto out; + + /* Get the dataspace handle */ + if ( (space_id = H5Dget_space( dataset_id )) < 0 ) + goto out; + + /* Define a hyperslab in the dataset of the size of the records */ + offset[0] = start; + count[0] = nrecords; + if ( H5Sselect_hyperslab( space_id, H5S_SELECT_SET, offset, NULL, count, NULL) < 0 ) + goto out; + + /* Create a memory dataspace handle */ + mem_size[0] = count[0]; + if ((mem_space_id = H5Screate_simple( 1, mem_size, NULL )) < 0 ) + goto out; + if ((H5Dread( dataset_id, mem_type_id, mem_space_id, space_id, H5P_DEFAULT, data)) < 0 + ) + goto out; + + /* Terminate access to the memory dataspace */ + if ( H5Sclose( mem_space_id ) < 0 ) + goto out; + + /* Terminate access to the dataspace */ + if ( H5Sclose( space_id ) < 0 ) + goto out; + + return 0; + +out: + H5E_BEGIN_TRY + H5Sclose(space_id); + H5Sclose(mem_space_id); + H5E_END_TRY + return -1; +} + diff --git a/hl/src/H5TBprivate.h b/hl/src/H5TBprivate.h new file mode 100644 index 0000000..68fe303 --- /dev/null +++ b/hl/src/H5TBprivate.h @@ -0,0 +1,58 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * 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 files COPYING and Copyright.html. COPYING can be found at the root * + * of the source code distribution tree; Copyright.html can be found at the * + * root level of an installed copy of the electronic HDF5 document set and * + * is linked from the top-level documents page. It can also be found at * + * http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have * + * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#ifndef _H5TBprivate_H +#define _H5TBprivate_H + + +#include "H5LTprivate.h" +#include "H5TBpublic.h" + + +#define TABLE_CLASS "TABLE" +#define HLTB_MAX_FIELD_LEN 255 + +/*------------------------------------------------------------------------- + * + * Private write function used by H5TB and H5PT + * + *------------------------------------------------------------------------- + */ + +herr_t H5TBcommon_append_records( hid_t dataset_id, + hid_t mem_type_id, + hsize_t nrecords, + hsize_t orig_table_size, + const void * data); + +/*------------------------------------------------------------------------- + * + * Private read function used by H5TB and H5PT + * + *------------------------------------------------------------------------- + */ + + +herr_t H5TBcommon_read_records( hid_t dataset_id, + hid_t mem_type_id, + hsize_t start, + hsize_t nrecords, + hsize_t table_size, + void *data); + + + + +#endif + diff --git a/hl/src/H5TB.h b/hl/src/H5TBpublic.h index ccc1776..e1c47ec 100644 --- a/hl/src/H5TB.h +++ b/hl/src/H5TBpublic.h @@ -12,26 +12,8 @@ * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _H5TB_H -#define _H5TB_H - -#if 0 -#define H5_TB_DEBUG -#endif - -#include "H5LT.h" - - -#define TABLE_CLASS "TABLE" - - -#define HLTB_MAX_FIELD_LEN 255 - -#if !defined(MAX) -#define MAX(X,Y) ((X)>(Y)?(X):(Y)) -#endif - - +#ifndef _H5TBpublic_H +#define _H5TBpublic_H #ifdef __cplusplus diff --git a/hl/src/Makefile.am b/hl/src/Makefile.am index 002438d..e8e5588 100644 --- a/hl/src/Makefile.am +++ b/hl/src/Makefile.am @@ -25,10 +25,10 @@ AM_CPPFLAGS=-I$(top_srcdir)/src # This library is our main target. lib_LTLIBRARIES=libhdf5_hl.la -libhdf5_hl_la_SOURCES=H5LT.c H5TB.c H5IM.c H5DS.c H5PT.c H5HL_private.c H5LTparse.c H5LTanalyze.c +libhdf5_hl_la_SOURCES=H5LT.c H5TB.c H5IM.c H5DS.c H5PT.c H5LTparse.c H5LTanalyze.c # Public header files (to be installed) -include_HEADERS=H5IM.h H5LT.h H5TB.h H5DS.h H5PT.h H5LTparse.h +include_HEADERS=H5IMpublic.h H5LTpublic.h H5TBpublic.h H5DSpublic.h H5PTpublic.h H5LTparse.h # Automake naturally assumes that we want it to remove H5LTparse.c on distclean. # Convince it otherwise. diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in index a51a244..ae10548 100644 --- a/hl/src/Makefile.in +++ b/hl/src/Makefile.in @@ -77,7 +77,7 @@ libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) libhdf5_hl_la_LIBADD = am_libhdf5_hl_la_OBJECTS = H5LT.lo H5TB.lo H5IM.lo H5DS.lo H5PT.lo \ - H5HL_private.lo H5LTparse.lo H5LTanalyze.lo + H5LTparse.lo H5LTanalyze.lo libhdf5_hl_la_OBJECTS = $(am_libhdf5_hl_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp @@ -291,6 +291,9 @@ RM = rm -f CP = cp TIME = time +# Path for hl needed in hdf5.h +INCLUDES = -I$(top_srcdir)/hl/src + # Some machines need a command to run executables; this is that command # so that our tests will run. # We use RUNTESTS instead of RUNSERIAL directly because it may be that @@ -340,10 +343,10 @@ AM_CPPFLAGS = -I$(top_srcdir)/src # This library is our main target. lib_LTLIBRARIES = libhdf5_hl.la -libhdf5_hl_la_SOURCES = H5LT.c H5TB.c H5IM.c H5DS.c H5PT.c H5HL_private.c H5LTparse.c H5LTanalyze.c +libhdf5_hl_la_SOURCES = H5LT.c H5TB.c H5IM.c H5DS.c H5PT.c H5LTparse.c H5LTanalyze.c # Public header files (to be installed) -include_HEADERS = H5IM.h H5LT.h H5TB.h H5DS.h H5PT.h H5LTparse.h +include_HEADERS = H5IMpublic.h H5LTpublic.h H5TBpublic.h H5DSpublic.h H5PTpublic.h H5LTparse.h # Automake needs to be taught how to build lib, progs, and tests targets. # These will be filled in automatically for the most part (e.g., @@ -428,7 +431,6 @@ mostlyclean-compile: -rm -f *.$(OBJEXT) @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5DS.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5HL_private.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5IM.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5LT.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5LTanalyze.Plo@am__quote@ diff --git a/hl/test/Makefile.in b/hl/test/Makefile.in index 14b3fcc..1e28bc3 100644 --- a/hl/test/Makefile.in +++ b/hl/test/Makefile.in @@ -303,6 +303,9 @@ RM = rm -f CP = cp TIME = time +# Path for hl needed in hdf5.h +INCLUDES = -I$(top_srcdir)/hl/src + # Some machines need a command to run executables; this is that command # so that our tests will run. # We use RUNTESTS instead of RUNSERIAL directly because it may be that diff --git a/hl/test/test_ds.c b/hl/test/test_ds.c index 17af015..3e72766 100644 --- a/hl/test/test_ds.c +++ b/hl/test/test_ds.c @@ -12,11 +12,11 @@ * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#include "H5DS.h" -#include "H5LT.h" #include <stdlib.h> #include <string.h> -#include "H5IM.h" +#include "H5DSprivate.h" +#include "H5LTprivate.h" +#include "H5IMprivate.h" /* operator functions */ static herr_t verifiy_scale(hid_t dset, unsigned dim, hid_t scale, void *visitor_data); @@ -776,7 +776,7 @@ static int test_simple(void) goto out; /* detach again, it should fail */ - if (H5DSdetach_scale(did,dsid,DIM1)==SUCCESS) + if (H5DSdetach_scale(did,dsid,DIM1)==SUCCEED) goto out; /* verify attach, it must return 0 for no attach */ @@ -1751,7 +1751,7 @@ static int test_errors(void) TESTING2("attach a dataset to itself"); - if (H5DSattach_scale(did,did,0)==SUCCESS) + if (H5DSattach_scale(did,did,0)==SUCCEED) goto out; PASSED(); @@ -1762,7 +1762,7 @@ static int test_errors(void) */ TESTING2("attach a group with a dataset"); - if (H5DSattach_scale(gid,dsid,0)==SUCCESS) + if (H5DSattach_scale(gid,dsid,0)==SUCCEED) goto out; PASSED(); @@ -1773,7 +1773,7 @@ static int test_errors(void) */ TESTING2("attach a dataset with a group"); - if (H5DSattach_scale(did,gid,0)==SUCCESS) + if (H5DSattach_scale(did,gid,0)==SUCCEED) goto out; PASSED(); @@ -1784,7 +1784,7 @@ static int test_errors(void) */ TESTING2("set scale for a group"); - if (H5DSset_scale(gid,"scale 1")==SUCCESS) + if (H5DSset_scale(gid,"scale 1")==SUCCEED) goto out; PASSED(); @@ -1847,7 +1847,7 @@ static int test_errors(void) goto out; /* try to attach "ds_a" to "dset_a", not valid */ - if(H5DSattach_scale(did,dsid,0)==SUCCESS) + if(H5DSattach_scale(did,dsid,0)==SUCCEED) goto out; /* close */ @@ -1892,7 +1892,7 @@ static int test_errors(void) goto out; /* try to attach "ds_a" to "ds_b", not valid */ - if(H5DSattach_scale(dsid,did,0)==SUCCESS) + if(H5DSattach_scale(dsid,did,0)==SUCCEED) goto out; /* close */ @@ -1927,7 +1927,7 @@ static int test_errors(void) goto out; /* try to attach "ds_a" to the image, not valid */ - if(H5DSattach_scale(did,dsid,0)==SUCCESS) + if(H5DSattach_scale(did,dsid,0)==SUCCEED) goto out; /* close */ @@ -1988,7 +1988,7 @@ static int test_errors(void) goto out; /* try to detach "ds_a" from "dset_a" */ - if(H5DSdetach_scale(did,dsid,0)==SUCCESS) + if(H5DSdetach_scale(did,dsid,0)==SUCCEED) goto out; /* close */ @@ -2016,7 +2016,7 @@ static int test_errors(void) goto out; /* try to detach "ds_a" from "grp" */ - if(H5DSdetach_scale(gid,dsid,0)==SUCCESS) + if(H5DSdetach_scale(gid,dsid,0)==SUCCEED) goto out; /* close */ @@ -2044,7 +2044,7 @@ static int test_errors(void) goto out; /* try to detach "grp" from "dset_a" */ - if(H5DSdetach_scale(did,gid,0)==SUCCESS) + if(H5DSdetach_scale(did,gid,0)==SUCCEED) goto out; /* close */ @@ -2153,7 +2153,7 @@ static int test_iterators(void) goto out; /* try to iterate trough the 3rd dimension of "dset_a", return error */ - if (H5DSiterate_scales(did,3,NULL,verifiy_scale,NULL)==SUCCESS) + if (H5DSiterate_scales(did,3,NULL,verifiy_scale,NULL)==SUCCEED) goto out; /* close */ @@ -2212,7 +2212,7 @@ static int test_iterators(void) goto out; /* try to iterate, return error */ - if (H5DSiterate_scales(gid,0,NULL,verifiy_scale,NULL)==SUCCESS) + if (H5DSiterate_scales(gid,0,NULL,verifiy_scale,NULL)==SUCCEED) goto out; /* close */ @@ -2237,7 +2237,7 @@ static int test_iterators(void) goto out; /* iterate */ - if (H5DSiterate_scales(did,0,NULL,op_bogus,NULL)==SUCCESS) + if (H5DSiterate_scales(did,0,NULL,op_bogus,NULL)==SUCCEED) goto out; /* close */ diff --git a/hl/test/test_image.c b/hl/test/test_image.c index b47bab8..6d1f445 100644 --- a/hl/test/test_image.c +++ b/hl/test/test_image.c @@ -12,7 +12,8 @@ * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#include "H5IM.h" +#include "H5LTprivate.h" +#include "H5IMprivate.h" #include "pal_rgb.h" #include <stdlib.h> #include <string.h> diff --git a/hl/test/test_lite.c b/hl/test/test_lite.c index b7e1af5..1816f7f 100644 --- a/hl/test/test_lite.c +++ b/hl/test/test_lite.c @@ -15,7 +15,7 @@ #include <stdlib.h> #include <string.h> -#include "H5LT.h" +#include "H5LTprivate.h" #define FILE_NAME "test_lite1.h5" #define FILE_NAME2 "test_lite2.h5" diff --git a/hl/test/test_packet.c b/hl/test/test_packet.c index 70199b9..739b0f7 100644 --- a/hl/test/test_packet.c +++ b/hl/test/test_packet.c @@ -12,8 +12,8 @@ * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#include "H5PT.h" -#include "H5TB.h" +#include "H5PTprivate.h" +#include "H5TBprivate.h" #include <stdlib.h> #include <assert.h> #include <string.h> diff --git a/hl/test/test_table.c b/hl/test/test_table.c index 48d87b0..e3d248a 100644 --- a/hl/test/test_table.c +++ b/hl/test/test_table.c @@ -12,7 +12,7 @@ * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#include "H5TB.h" +#include "H5TBprivate.h" #include <stdlib.h> #include <string.h> diff --git a/hl/tools/Makefile.in b/hl/tools/Makefile.in index 64d704b..ec5ccb9 100644 --- a/hl/tools/Makefile.in +++ b/hl/tools/Makefile.in @@ -268,6 +268,9 @@ RM = rm -f CP = cp TIME = time +# Path for hl needed in hdf5.h +INCLUDES = -I$(top_srcdir)/hl/src + # Some machines need a command to run executables; this is that command # so that our tests will run. # We use RUNTESTS instead of RUNSERIAL directly because it may be that diff --git a/hl/tools/gif2h5/Makefile.am b/hl/tools/gif2h5/Makefile.am index cd5c305..c01d1b4 100644 --- a/hl/tools/gif2h5/Makefile.am +++ b/hl/tools/gif2h5/Makefile.am @@ -20,7 +20,7 @@ include $(top_srcdir)/config/commence.am # Include src and tools/lib directories -INCLUDES=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib -I$(top_srcdir)/hl/src +INCLUDES+=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib -I$(top_srcdir)/hl/src # These are our main targets, the tools diff --git a/hl/tools/gif2h5/Makefile.in b/hl/tools/gif2h5/Makefile.in index fbd61ba..61875e4 100644 --- a/hl/tools/gif2h5/Makefile.in +++ b/hl/tools/gif2h5/Makefile.in @@ -294,6 +294,12 @@ RM = rm -f CP = cp TIME = time +# Path for hl needed in hdf5.h + +# Include src and tools/lib directories +INCLUDES = -I$(top_srcdir)/hl/src -I$(top_srcdir)/src \ + -I$(top_srcdir)/tools/lib -I$(top_srcdir)/hl/src + # Some machines need a command to run executables; this is that command # so that our tests will run. # We use RUNTESTS instead of RUNSERIAL directly because it may be that @@ -337,9 +343,6 @@ TRACE = perl $(top_srcdir)/bin/trace # .chklog files are output from those tests. # *.clog are from the MPE option. CHECK_CLEANFILES = *.chkexe *.chklog *.clog - -# Include src and tools/lib directories -INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/tools/lib -I$(top_srcdir)/hl/src gif2h5_SOURCES = gif2hdf.c gif2mem.c decompress.c gifread.c writehdf.c h52gif_SOURCES = hdf2gif.c hdfgifwr.c readhdf.c diff --git a/hl/tools/gif2h5/writehdf.c b/hl/tools/gif2h5/writehdf.c index 7313d2e..bbd74eb 100644 --- a/hl/tools/gif2h5/writehdf.c +++ b/hl/tools/gif2h5/writehdf.c @@ -16,7 +16,7 @@ #include <string.h> #include "gif.h" -#include "H5IM.h" +#include "H5IMpublic.h" /*------------------------------------------------------------------------- * Function: WriteHDF |