diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2016-09-28 18:06:02 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2016-09-28 18:06:02 (GMT) |
commit | 208cfdc941bd911253051dc496c087dae6012241 (patch) | |
tree | a91d11ade122596d7e7eb44f8468efd2a50d7d38 /tools/lib/h5tools.h | |
parent | 50d3fc7a61f4b1dbe2ead376b778f5743060cc6e (diff) | |
download | hdf5-208cfdc941bd911253051dc496c087dae6012241.zip hdf5-208cfdc941bd911253051dc496c087dae6012241.tar.gz hdf5-208cfdc941bd911253051dc496c087dae6012241.tar.bz2 |
Merge/align from trunk(develop)
Diffstat (limited to 'tools/lib/h5tools.h')
-rw-r--r-- | tools/lib/h5tools.h | 39 |
1 files changed, 23 insertions, 16 deletions
diff --git a/tools/lib/h5tools.h b/tools/lib/h5tools.h index 5c08f33..b548100 100644 --- a/tools/lib/h5tools.h +++ b/tools/lib/h5tools.h @@ -37,10 +37,10 @@ #define H5TOOLS_DUMP_MAX_RANK H5S_MAX_RANK /* Stream macros */ -#define FLUSHSTREAM(S) {if(S != NULL) HDfflush(S);} -#define PRINTSTREAM(S, F, ...) {if(S != NULL) HDfprintf(S, F, __VA_ARGS__);} -#define PRINTVALSTREAM(S, V) {if(S != NULL) HDfprintf(S, V);} -#define PUTSTREAM(X,S) {if(S != NULL) HDfputs(X, S);} +#define FLUSHSTREAM(S) if(S != NULL) HDfflush(S) +#define PRINTSTREAM(S, F, ...) if(S != NULL) HDfprintf(S, F, __VA_ARGS__) +#define PRINTVALSTREAM(S, V) if(S != NULL) HDfprintf(S, V) +#define PUTSTREAM(X,S) do { if(S != NULL) HDfputs(X, S); } while(0) /* * Strings for output - these were duplicated from the h5dump.h @@ -81,7 +81,7 @@ #define FLETCHER32 "CHECKSUM FLETCHER32" #define SZIP "COMPRESSION SZIP" #define NBIT "COMPRESSION NBIT" -#define SCALEOFFSET "COMPRESSION SCALEOFFSET" +#define SCALEOFFSET "COMPRESSION SCALEOFFSET" #define SCALEOFFSET_MINBIT "MIN BITS" #define STORAGE_LAYOUT "STORAGE_LAYOUT" #define CONTIGUOUS "CONTIGUOUS" @@ -275,7 +275,7 @@ typedef struct h5tool_format_t { const char *fmt_float; int ascii; int str_locale; - int str_repeat; + unsigned str_repeat; /* * Fields associated with compound array members. @@ -491,9 +491,9 @@ typedef struct h5tools_context_t { hsize_t size_last_dim; /*the size of the last dimension, *needed so we can break after each *row */ - int indent_level; /*the number of times we need some + unsigned indent_level; /*the number of times we need some *extra indentation */ - int default_indent_level; /*this is used when the indent level gets changed */ + unsigned default_indent_level; /*this is used when the indent level gets changed */ hsize_t acc[H5S_MAX_RANK]; /* accumulator position */ hsize_t pos[H5S_MAX_RANK]; /* matrix position */ hsize_t sm_pos; /* current stripmine element position */ @@ -526,9 +526,9 @@ H5TOOLS_DLLVAR const h5tools_dump_header_t* h5tools_dump_header_format; extern "C" { #endif -H5TOOLS_DLLVAR int packed_bits_num; /* number of packed bits to display */ -H5TOOLS_DLLVAR int packed_data_offset; /* offset of packed bits to display */ -H5TOOLS_DLLVAR int packed_data_length; /* lengtht of packed bits to display */ +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 */ H5TOOLS_DLLVAR unsigned long long packed_data_mask; /* mask in which packed bits to display */ H5TOOLS_DLLVAR FILE *rawattrstream; /* output stream for raw attribute data */ H5TOOLS_DLLVAR FILE *rawdatastream; /* output stream for raw data */ @@ -542,6 +542,9 @@ H5TOOLS_DLLVAR int oid_output; /* oid output */ H5TOOLS_DLLVAR int data_output; /* data output */ H5TOOLS_DLLVAR int attr_data_output; /* attribute data output */ +/* things to display or which are set via command line parameters */ +H5TOOLS_DLLVAR int enable_error_stack; /* re-enable error stack */ + /* Strings for output */ #define H5_TOOLS_GROUP "GROUP" #define H5_TOOLS_DATASET "DATASET" @@ -550,11 +553,11 @@ H5TOOLS_DLLVAR int attr_data_output; /* attribute data output */ /* 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 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 hid_t h5tools_get_native_type(hid_t type); @@ -574,8 +577,12 @@ H5TOOLS_DLL void h5tools_region_simple_prefix(FILE *stream, const h5tool_form h5tools_context_t *ctx, hsize_t elmtno, hsize_t *ptdata, int secnum); H5TOOLS_DLL int render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t nelmts); +H5TOOLS_DLL int render_bin_output_region_data_blocks(hid_t region_id, FILE *stream, + hid_t container, unsigned ndims, hid_t type_id, hsize_t nblocks, hsize_t *ptdata); H5TOOLS_DLL hbool_t render_bin_output_region_blocks(hid_t region_space, hid_t region_id, FILE *stream, hid_t container); +H5TOOLS_DLL int render_bin_output_region_data_points(hid_t region_space, hid_t region_id, + FILE* stream, hid_t container, unsigned ndims, hid_t type_id, hsize_t npoints); H5TOOLS_DLL hbool_t render_bin_output_region_points(hid_t region_space, hid_t region_id, FILE *stream, hid_t container); |