summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5tools.h
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2021-02-22 04:05:43 (GMT)
committerGitHub <noreply@github.com>2021-02-22 04:05:43 (GMT)
commitdf1a4af96126682ea4a05c2b26bf6b7c916579ff (patch)
tree993205ed1edde76001a811532f91997138b46744 /tools/lib/h5tools.h
parent88960489604861813b3676bc234f49ca8ee937d3 (diff)
downloadhdf5-df1a4af96126682ea4a05c2b26bf6b7c916579ff.zip
hdf5-df1a4af96126682ea4a05c2b26bf6b7c916579ff.tar.gz
hdf5-df1a4af96126682ea4a05c2b26bf6b7c916579ff.tar.bz2
HDF5 1 8 merge of recent changes and tools (#353)
* Update supported platforms * Merge PR#3 changes from develop * # WARNING: head commit changed in the meantime Merge gcc 10 diagnostics option from develop Merge CMake changes from develop Merge warnings from develop Merge #318 OSX changes from develop Merge tools changes from develop Merge test macros from develop * Format updates * Fix missing semicolon and format fix * Format update * Correct actions, remove java option * Update autotools build files * Add testfiles * Fix configure issue with make flags * Init fapls to default * Update generated files and fix h5repack id closure * update format
Diffstat (limited to 'tools/lib/h5tools.h')
-rw-r--r--tools/lib/h5tools.h81
1 files changed, 60 insertions, 21 deletions
diff --git a/tools/lib/h5tools.h b/tools/lib/h5tools.h
index df00067..10acea3 100644
--- a/tools/lib/h5tools.h
+++ b/tools/lib/h5tools.h
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Thursday, July 23, 1998
*
* Purpose: Support functions for the various tools.
@@ -521,20 +521,56 @@ typedef struct h5tools_context_t {
int display_char; /* */
} h5tools_context_t;
+/* VFD info structs used to set the file access property
+ * lists in the tools.
+ */
+
+typedef struct h5tools_vfd_info_t {
+
+ /* Pointer to information to be passed to the driver for its setup */
+ const void *info;
+
+ /* Name of the VFD */
+ const char *name;
+} h5tools_vfd_info_t;
+
+/* This enum should match the entries in the above 'drivernames'
+ * since they are indices into the 'drivernames' array. */
+typedef enum {
+ SEC2_VFD_IDX = 0,
+ DIRECT_VFD_IDX,
+ LOG_VFD_IDX,
+ WINDOWS_VFD_IDX,
+ STDIO_VFD_IDX,
+ CORE_VFD_IDX,
+ FAMILY_VFD_IDX,
+ SPLIT_VFD_IDX,
+ MULTI_VFD_IDX,
+ MPIO_VFD_IDX,
+ ROS3_VFD_IDX,
+ HDFS_VFD_IDX,
+} driver_idx;
+
/* The following include, h5tools_str.h, must be after the
* above stucts are defined. There is a dependency in the following
* include that hasn't been identified yet. */
#include "h5tools_str.h"
-H5TOOLS_DLLVAR h5tool_format_t h5tools_dataformat;
-H5TOOLS_DLLVAR const h5tools_dump_header_t h5tools_standardformat;
-H5TOOLS_DLLVAR const h5tools_dump_header_t *h5tools_dump_header_format;
-
#ifdef __cplusplus
extern "C" {
#endif
+H5TOOLS_DLLVAR const char *drivernames[];
+
+H5TOOLS_DLLVAR h5tool_format_t h5tools_dataformat;
+H5TOOLS_DLLVAR const h5tools_dump_header_t h5tools_standardformat;
+H5TOOLS_DLLVAR const h5tools_dump_header_t *h5tools_dump_header_format;
+H5TOOLS_DLLVAR H5E_auto2_t lib_func;
+H5TOOLS_DLLVAR H5E_auto2_t tools_func;
+H5TOOLS_DLLVAR void * lib_edata;
+H5TOOLS_DLLVAR void * tools_edata;
+
H5TOOLS_DLLVAR unsigned packed_bits_num; /* number of packed bits to display */
H5TOOLS_DLLVAR unsigned packed_data_offset; /* offset of packed bits to display */
H5TOOLS_DLLVAR unsigned packed_data_length; /* length of packed bits to display */
@@ -566,21 +602,27 @@ H5TOOLS_DLLVAR int enable_error_stack; /* re-enable error stack; disable=0 enabl
#define H5_TOOLS_UNKNOWN "UNKNOWN"
/* Definitions of useful routines */
-H5TOOLS_DLL void h5tools_init(void);
-H5TOOLS_DLL void h5tools_close(void);
-H5TOOLS_DLL int h5tools_set_data_output_file(const char *fname, int is_bin);
-H5TOOLS_DLL int h5tools_set_attr_output_file(const char *fname, int is_bin);
-H5TOOLS_DLL int h5tools_set_input_file(const char *fname, int is_bin);
-H5TOOLS_DLL int h5tools_set_output_file(const char *fname, int is_bin);
-H5TOOLS_DLL int h5tools_set_error_file(const char *fname, int is_bin);
-H5TOOLS_DLL hid_t h5tools_fopen(const char *fname, unsigned flags, hid_t fapl, const char *driver,
- char *drivername, size_t drivername_len);
+H5TOOLS_DLL void h5tools_init(void);
+H5TOOLS_DLL void h5tools_close(void);
+
+H5TOOLS_DLL void h5tools_error_report(void);
+H5TOOLS_DLL int h5tools_set_data_output_file(const char *fname, int is_bin);
+H5TOOLS_DLL int h5tools_set_attr_output_file(const char *fname, int is_bin);
+H5TOOLS_DLL int h5tools_set_input_file(const char *fname, int is_bin);
+H5TOOLS_DLL int h5tools_set_output_file(const char *fname, int is_bin);
+H5TOOLS_DLL int h5tools_set_error_file(const char *fname, int is_bin);
+
+H5TOOLS_DLL hid_t h5tools_get_fapl(hid_t prev_fapl_id, h5tools_vfd_info_t *vfd_info);
+H5TOOLS_DLL herr_t h5tools_get_vfd_name(hid_t fapl_id, char *drivername, size_t drivername_size);
+H5TOOLS_DLL hid_t h5tools_fopen(const char *fname, unsigned flags, hid_t fapl, hbool_t use_specific_driver,
+ char *drivername, size_t drivername_size);
H5TOOLS_DLL hid_t h5tools_get_little_endian_type(hid_t type);
H5TOOLS_DLL hid_t h5tools_get_big_endian_type(hid_t type);
H5TOOLS_DLL htri_t h5tools_detect_vlen(hid_t tid);
H5TOOLS_DLL htri_t h5tools_detect_vlen_str(hid_t tid);
H5TOOLS_DLL hbool_t h5tools_is_obj_same(hid_t loc_id1, const char *name1, hid_t loc_id2, const char *name2);
-H5TOOLS_DLL void init_acc_pos(h5tools_context_t *ctx, hsize_t *dims);
+H5TOOLS_DLL void init_acc_pos(unsigned ndims, hsize_t *dims, hsize_t *acc, hsize_t *pos, hsize_t *p_min_idx);
+H5TOOLS_DLL hsize_t calc_acc_pos(unsigned ndims, hsize_t elemtno, hsize_t *acc, hsize_t *pos);
H5TOOLS_DLL hbool_t h5tools_is_zero(const void *_mem, size_t size);
H5TOOLS_DLL int h5tools_canreadf(const char *name, hid_t dcpl_id);
H5TOOLS_DLL int h5tools_can_encode(H5Z_filter_t filtn);
@@ -607,12 +649,9 @@ H5TOOLS_DLL hbool_t h5tools_render_element(FILE *stream, const h5tool_format_t *
h5tools_str_t *buffer, hsize_t *curr_pos, size_t ncols,
hsize_t local_elmt_counter, hsize_t elmt_counter);
H5TOOLS_DLL hbool_t h5tools_render_region_element(FILE *stream, const h5tool_format_t *info,
- h5tools_context_t *ctx, /*in,out*/
- h5tools_str_t * buffer, /*string into which to render */
- hsize_t * curr_pos, /*total data element position*/
- size_t ncols, hsize_t *ptdata,
- hsize_t local_elmt_counter, /*element counter*/
- hsize_t elmt_counter);
+ h5tools_context_t *ctx, h5tools_str_t *buffer,
+ hsize_t *curr_pos, size_t ncols, hsize_t *ptdata,
+ hsize_t local_elmt_counter, hsize_t elmt_counter);
#ifdef __cplusplus
}