diff --git a/src/H5Block.c b/src/H5Block.c index b29590e..c17085f 100644 --- a/src/H5Block.c +++ b/src/H5Block.c @@ -43,14 +43,11 @@ #include #include -#include "H5Part.h" -#include "H5PartPrivate.h" -#include "H5BlockTypes.h" -#include "H5Block.h" #include "h5/h5.h" #include "h5/h5_private.h" - +#include "H5Part.h" +#include "H5Block.h" /********************** declarations *****************************************/ diff --git a/src/H5Part.c b/src/H5Part.c index ec2a79f..d52a2bd 100644 --- a/src/H5Part.c +++ b/src/H5Part.c @@ -90,11 +90,9 @@ Last modified on April 19, 2007. #define close _close #endif /* WIN32 */ -#include "H5PartTypes.h" -#include "H5Part.h" -#include "H5PartPrivate.h" #include "h5/h5.h" #include "h5/h5_private.h" +#include "H5Part.h" extern h5part_error_handler _err_handler; extern h5part_int64_t _h5part_errno; diff --git a/src/H5Part.h b/src/H5Part.h index 9998b2b..1bb8935 100644 --- a/src/H5Part.h +++ b/src/H5Part.h @@ -4,6 +4,7 @@ #include #include #include +#include "h5.h" #ifdef PARALLEL_IO #include #endif @@ -12,8 +13,6 @@ extern "C" { #endif -#include "H5PartTypes.h" - #define H5PART_SUCCESS H5_SUCCESS #define H5PART_ERR_NOMEM H5_ERR_NOMEM #define H5PART_ERR_INVAL H5_ERR_INVAL diff --git a/src/Makefile.am b/src/Makefile.am index 00c716e..c3bdace 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -10,7 +10,7 @@ CC = @CC@ HDFINC = -I$(HDF5ROOT)/include MPIINC = @MPIINC@ -INC = $(HDFINC) ${MPIINC} +INC = $(HDFINC) ${MPIINC} -I./h5 # H5Part header file location H5PINC = -I@prefix@/include @@ -44,13 +44,11 @@ EXTRA_LIBRARIES = libH5Part.a # Header files that I wish to install in $(prefix)/include include_HEADERS = \ H5Part.h \ - H5PartTypes.h \ H5Block.h \ - H5BlockTypes.h \ H5Fed.h # Listing of all possible headers that I may include -EXTRA_HEADERS = H5PartPrivate.h H5BlockPrivate.h +EXTRA_HEADERS = # Listing of sources libH5Part_a_SOURCES = \ @@ -72,8 +70,8 @@ libH5Part.a: $(libH5Part_a_OBJECTS) %.o : %.c $(CC) $(CFLAGS) $(INC) -c $< -H5Part.o: H5Part.c H5Part.h H5PartPrivate.h H5PartTypes.h -H5Block.o: H5Block.c H5Part.h H5PartPrivate.h H5PartTypes.h H5Block.h H5BlockTypes.h +H5Part.o: H5Part.c H5Part.h +H5Block.o: H5Block.c H5Part.h H5Block.h clean: clean-recursive $(RM) -f *~ *.o *.a *.so diff --git a/src/h5/Makefile.am b/src/h5/Makefile.am index 6544d77..8fd264e 100644 --- a/src/h5/Makefile.am +++ b/src/h5/Makefile.am @@ -12,7 +12,7 @@ CC = @CC@ HDFINC = -I$(HDF5ROOT)/include MPIINC = @MPIINC@ -INC = $(HDFINC) ${MPIINC} -I../ +INC = $(HDFINC) ${MPIINC} -I. -I../ # H5Part header file location H5PINC = -I@prefix@/include @@ -42,7 +42,16 @@ lib_LIBRARIES = libH5.a EXTRA_LIBRARIES = libH5.a # Header files that I wish to install in $(prefix)/include -include_HEADERS = h5.h +include_HEADERS = \ + h5.h \ + h5_types.h \ + attribs.h \ + errorhandling.h \ + openclose.h \ + readwrite.h \ + t_openclose.h \ + t_readwrite.h \ + u_readwrite.h # Listing of all possible headers that I may include EXTRA_HEADERS = diff --git a/src/h5/attribs.c b/src/h5/attribs.c index 274cc91..bb9a69a 100644 --- a/src/h5/attribs.c +++ b/src/h5/attribs.c @@ -6,13 +6,10 @@ #include #include -#include "H5PartTypes.h" -#include "H5BlockTypes.h" -#include "H5Part.h" -#include "H5Block.h" -#include "H5PartPrivate.h" #include "h5.h" #include "h5_private.h" +#include "H5Part.h" +#include "H5Block.h" h5part_int64_t H5_read_attrib ( diff --git a/src/h5/errorhandling.c b/src/h5/errorhandling.c index 8effea7..4cdf574 100644 --- a/src/h5/errorhandling.c +++ b/src/h5/errorhandling.c @@ -6,11 +6,9 @@ #include #include -#include "H5PartTypes.h" -#include "H5Part.h" -#include "H5PartPrivate.h" #include "h5.h" #include "h5_private.h" +#include "H5Part.h" h5_error_handler _err_handler = H5_report_errorhandler; h5_int64_t _h5part_errno = H5PART_SUCCESS; diff --git a/src/h5/h5_private.h b/src/h5/h5_private.h index 44e53dc..f445a25 100644 --- a/src/h5/h5_private.h +++ b/src/h5/h5_private.h @@ -43,4 +43,120 @@ "Internal error: step_gid <= 0."); +#define H5PART_GROUPNAME_STEP "Step" + +/*! + The functions declared here are not part of the API, but may be used + in extensions like H5Block. We name these functions "private". + + \note + Private function may change there interface even in stable versions. + Don't use them in applications! +*/ + +struct _iter_op_data { + int stop_idx; + int count; + int type; + char *name; + size_t len; + char *pattern; +}; + +h5part_int64_t +H5_set_step ( + h5_file *f, + const h5part_int64_t step + ); + +h5part_int64_t +H5_get_num_particles ( + h5_file *f + ); + +herr_t +H5_iteration_operator ( + hid_t group_id, + const char *member_name, + void *operator_data + ); + + + +#define SET_FNAME( fname ) H5_set_funcname( fname ); + +hid_t +H5_normalize_h5_type ( + hid_t type + ); + +h5part_int64_t +H5_read_attrib ( + hid_t id, + const char *attrib_name, + void *attrib_value + ); + +h5part_int64_t +H5_write_attrib ( + hid_t id, + const char *attrib_name, + const hid_t attrib_type, + const void *attrib_value, + const hsize_t attrib_nelem + ); + +h5part_int64_t +H5_get_attrib_info ( + hid_t id, + const h5part_int64_t attrib_idx, + char *attrib_name, + const h5part_int64_t len_attrib_name, + h5part_int64_t *attrib_type, + h5part_int64_t *attrib_nelem + ); + +h5part_int64_t +H5_get_num_objects ( + hid_t group_id, + const char *group_name, + const hid_t type + ); + +h5part_int64_t +H5_get_num_objects_matching_pattern ( + hid_t group_id, + const char *group_name, + const hid_t type, + char * const pattern + ); + +h5part_int64_t +_H5Part_get_object_name ( + hid_t group_id, + const char *group_name, + const hid_t type, + const h5part_int64_t idx, + char *obj_name, + const h5part_int64_t len_obj_name + ); + + +char * +_H5Part_strdupfor2c ( + const char *s, + const ssize_t len + ); + +char * +_H5Part_strc2for ( + char * const str, + const ssize_t l_str + ); + + +#ifdef IPL_XT3 +# define SEEK_END 2 +#endif + #endif diff --git a/src/h5/h5_types.h b/src/h5/h5_types.h index 488db9a..1da262b 100644 --- a/src/h5/h5_types.h +++ b/src/h5/h5_types.h @@ -248,5 +248,5 @@ struct h5_file { }; typedef struct h5_file h5_file; - +typedef struct h5_file H5PartFile; #endif diff --git a/src/h5/openclose.c b/src/h5/openclose.c index 2c83907..1adcfa8 100644 --- a/src/h5/openclose.c +++ b/src/h5/openclose.c @@ -7,13 +7,10 @@ #include #include -#include "H5PartTypes.h" -#include "H5BlockTypes.h" -#include "H5Part.h" -#include "H5Block.h" -#include "H5PartPrivate.h" #include "h5.h" #include "h5_private.h" +#include "H5Part.h" +#include "H5Block.h" extern h5part_error_handler _err_handler; extern h5part_int64_t _h5part_errno; diff --git a/src/h5/readwrite.c b/src/h5/readwrite.c index e2b71cc..7d1d77b 100644 --- a/src/h5/readwrite.c +++ b/src/h5/readwrite.c @@ -6,13 +6,10 @@ #include #include -#include "H5PartTypes.h" -#include "H5BlockTypes.h" -#include "H5Part.h" -#include "H5Block.h" -#include "H5PartPrivate.h" #include "h5.h" #include "h5_private.h" +#include "H5Part.h" +#include "H5Block.h" h5part_int64_t H5_write_data ( diff --git a/src/h5/t_openclose.c b/src/h5/t_openclose.c index 9fa1f8a..0a48609 100644 --- a/src/h5/t_openclose.c +++ b/src/h5/t_openclose.c @@ -7,12 +7,9 @@ #include #include -#include "H5PartTypes.h" -#include "H5BlockTypes.h" -#include "H5Part.h" -#include "H5PartPrivate.h" #include "h5/h5.h" #include "h5/h5_private.h" +#include "H5Part.h" extern h5part_error_handler _err_handler; extern h5part_int64_t _h5part_errno; diff --git a/src/h5/t_readwrite.c b/src/h5/t_readwrite.c index b150371..c441c54 100644 --- a/src/h5/t_readwrite.c +++ b/src/h5/t_readwrite.c @@ -6,13 +6,10 @@ #include #include -#include "H5PartTypes.h" -#include "H5BlockTypes.h" -#include "H5Part.h" -#include "H5Block.h" -#include "H5PartPrivate.h" #include "h5.h" #include "h5_private.h" +#include "H5Part.h" +#include "H5Block.h" /* Initialize required data structures only! diff --git a/src/h5/u_readwrite.c b/src/h5/u_readwrite.c index 37b2af3..a84ab6d 100644 --- a/src/h5/u_readwrite.c +++ b/src/h5/u_readwrite.c @@ -6,10 +6,9 @@ #include #include -#include "H5PartTypes.h" -#include "H5Part.h" #include "h5.h" #include "h5_private.h" +#include "H5Part.h" extern h5part_error_handler _err_handler; extern h5part_int64_t _h5part_errno; diff --git a/test/h5b/H5BlockTestAttributes.c b/test/h5b/H5BlockTestAttributes.c index b08d975..4a2e2a4 100644 --- a/test/h5b/H5BlockTestAttributes.c +++ b/test/h5b/H5BlockTestAttributes.c @@ -3,7 +3,6 @@ #include #include "H5Part.h" #include "H5Block.h" -#include "H5BlockTypes.h" #ifndef PARALLEL_IO #ifndef MPI_COMM_WORLD #define MPI_COMM_WORLD 0 diff --git a/test/h5b/Makefile.am b/test/h5b/Makefile.am index ec2f500..b8b1e7e 100644 --- a/test/h5b/Makefile.am +++ b/test/h5b/Makefile.am @@ -28,7 +28,7 @@ LIBS = ${H5LIB} $(HDFLIB) $(MPILIB) -lm @STDCXX@ # INCLUDES HDFINC = -I$(HDF5ROOT)/include MPIINC = @MPIINC@ -H5INC = -I@H5P_LIB_LOC@ +H5INC = -I@H5P_LIB_LOC@ -I@H5P_LIB_LOC@/h5 INC = $(HDFINC) $(MPIINC) $(H5INC) diff --git a/test/h5t/Makefile.am b/test/h5t/Makefile.am index 902730e..60614b0 100644 --- a/test/h5t/Makefile.am +++ b/test/h5t/Makefile.am @@ -30,7 +30,7 @@ LIBS = ${H5LIB} $(HDFLIB) $(MPILIB) -lm @STDCXX@ # INCLUDES HDFINC = -I$(HDF5ROOT)/include MPIINC = @MPIINC@ -H5INC = -I@H5P_LIB_LOC@ +H5INC = -I@H5P_LIB_LOC@ -I@H5P_LIB_LOC@/h5 INC = $(HDFINC) $(MPIINC) $(H5INC) diff --git a/test/h5u/Makefile.am b/test/h5u/Makefile.am index e33de3e..2f8c387 100644 --- a/test/h5u/Makefile.am +++ b/test/h5u/Makefile.am @@ -28,7 +28,7 @@ LIBS = ${H5LIB} $(HDFLIB) $(MPILIB) -lm @STDCXX@ # INCLUDES HDFINC = -I$(HDF5ROOT)/include MPIINC = @MPIINC@ -H5INC = -I@H5P_LIB_LOC@ +H5INC = -I@H5P_LIB_LOC@ -I@H5P_LIB_LOC@/h5 INC = $(HDFINC) $(MPIINC) $(H5INC)