diff options
author | Allen Byrne <50328838+byrnHDF@users.noreply.github.com> | 2022-07-28 15:05:11 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-28 15:05:11 (GMT) |
commit | 762c111350cc31137a80e24126b00d9aacf3b2a9 (patch) | |
tree | 8d21ed8a877bc60b9c517b7505ce80e2cf8031a9 /tools | |
parent | c1c4db3c4a0cbef6eceaab2f069e895936fbbe34 (diff) | |
download | hdf5-762c111350cc31137a80e24126b00d9aacf3b2a9.zip hdf5-762c111350cc31137a80e24126b00d9aacf3b2a9.tar.gz hdf5-762c111350cc31137a80e24126b00d9aacf3b2a9.tar.bz2 |
clang 13 format #1933 (#1941)
Diffstat (limited to 'tools')
66 files changed, 512 insertions, 514 deletions
diff --git a/tools/h5copy/dynlib_copy.c b/tools/h5copy/dynlib_copy.c index b954a22..f474a55 100644 --- a/tools/h5copy/dynlib_copy.c +++ b/tools/h5copy/dynlib_copy.c @@ -62,7 +62,7 @@ static size_t H5Z_filter_dynlibud(unsigned int flags, size_t cd_nelmts, const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf) { - char * int_ptr = (char *)*buf; /* Pointer to the data values */ + char *int_ptr = (char *)*buf; /* Pointer to the data values */ size_t buf_left = *buf_size; /* Amount of data buffer left to process */ /* Check for the correct number of parameters */ diff --git a/tools/h5copy/h5copy.c b/tools/h5copy/h5copy.c index 63d83b8..f4f4859 100644 --- a/tools/h5copy/h5copy.c +++ b/tools/h5copy/h5copy.c @@ -19,7 +19,7 @@ #define PROGRAMNAME "h5copy" /* command-line options: short and long-named parameters */ -static const char * s_opts = "d:f:hi:o:ps:vVE*"; +static const char *s_opts = "d:f:hi:o:ps:vVE*"; static struct long_options l_opts[] = {{"destination", require_arg, 'd'}, {"flag", require_arg, 'f'}, {"help", no_arg, 'h'}, @@ -31,11 +31,11 @@ static struct long_options l_opts[] = {{"destination", require_arg, 'd'}, {"version", no_arg, 'V'}, {"enable-error-stack", optional_arg, 'E'}, {NULL, 0, '\0'}}; -char * fname_src = NULL; -char * fname_dst = NULL; -char * oname_src = NULL; -char * oname_dst = NULL; -char * str_flag = NULL; +char *fname_src = NULL; +char *fname_dst = NULL; +char *oname_src = NULL; +char *oname_dst = NULL; +char *str_flag = NULL; /*------------------------------------------------------------------------- * Function: leave diff --git a/tools/h5copy/h5copygentest.c b/tools/h5copy/h5copygentest.c index cce63c8..74069c1 100644 --- a/tools/h5copy/h5copygentest.c +++ b/tools/h5copy/h5copygentest.c @@ -280,7 +280,7 @@ gent_nested_vl(hid_t loc_id) hid_t sid, did, tid1, tid2; hsize_t dims[1] = {2}; hvl_t buf[2]; - hvl_t * tvl; + hvl_t *tvl; /* allocate and initialize VL dataset to write */ buf[0].len = 1; diff --git a/tools/h5diff/dynlib_diff.c b/tools/h5diff/dynlib_diff.c index 433522d..9d277e0 100644 --- a/tools/h5diff/dynlib_diff.c +++ b/tools/h5diff/dynlib_diff.c @@ -62,7 +62,7 @@ static size_t H5Z_filter_dynlibud(unsigned int flags, size_t cd_nelmts, const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf) { - char * int_ptr = (char *)*buf; /* Pointer to the data values */ + char *int_ptr = (char *)*buf; /* Pointer to the data values */ size_t buf_left = *buf_size; /* Amount of data buffer left to process */ /* Check for the correct number of parameters */ diff --git a/tools/h5diff/h5diff_common.c b/tools/h5diff/h5diff_common.c index 4add08d..9f7006b 100644 --- a/tools/h5diff/h5diff_common.c +++ b/tools/h5diff/h5diff_common.c @@ -25,7 +25,7 @@ static int check_d_input(const char *); * Command-line options: The user can specify short or long-named * parameters. */ -static const char * s_opts = "hVrv*qn:d:p:NcelxE:A:S*"; +static const char *s_opts = "hVrv*qn:d:p:NcelxE:A:S*"; static struct long_options l_opts[] = {{"help", no_arg, 'h'}, {"version", no_arg, 'V'}, {"report", no_arg, 'r'}, @@ -88,8 +88,8 @@ check_options(diff_opt_t *opts) static void parse_hsize_list(const char *h_list, subset_d *d) { - hsize_t * p_list; - const char * ptr; + hsize_t *p_list; + const char *ptr; unsigned int size_count = 0; unsigned int i = 0; unsigned int last_digit = 0; @@ -148,7 +148,7 @@ static struct subset_t * parse_subset_params(const char *dset) { struct subset_t *s = NULL; - char * brace; + char *brace; H5TOOLS_START_DEBUG(" - dset:%s", dset); if ((brace = HDstrrchr(dset, '[')) != NULL) { diff --git a/tools/h5diff/h5diffgentest.c b/tools/h5diff/h5diffgentest.c index 3015883..8cf067a 100644 --- a/tools/h5diff/h5diffgentest.c +++ b/tools/h5diff/h5diffgentest.c @@ -3326,8 +3326,8 @@ test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new /* compound1 datatype */ typedef struct comp1_t { - char * str_vlen; /* vlen string */ - char * str_vlen_repeat; /* vlen string */ + char *str_vlen; /* vlen string */ + char *str_vlen_repeat; /* vlen string */ char str_fixlen[FIXLEN_STR_SIZE]; /* fixed len string */ char str_fixlen_repeat[FIXLEN_STR_SIZE]; /* fixed len string */ const char *str_array_vlen[VLEN_STR_ARRY_DIM]; /* vlen string array */ @@ -3338,9 +3338,9 @@ test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new /* compound2 datatype */ typedef struct comp2_t { - char * str_vlen; /* vlen string */ + char *str_vlen; /* vlen string */ char str_fixlen[FIXLEN_STR_SIZE]; /* fixed len string */ - char * str_vlen_repeat; /* vlen string */ + char *str_vlen_repeat; /* vlen string */ char str_fixlen_repeat[FIXLEN_STR_SIZE]; /* fixed len string */ const char *str_array_vlen[VLEN_STR_ARRY_DIM]; /* vlen string array */ char str_array_fixlen[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */ @@ -3363,9 +3363,9 @@ test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new /* compound4 datatype */ typedef struct comp4_t { char str_fixlen[FIXLEN_STR_SIZE]; /* fixed len string */ - char * str_vlen; /* vlen string */ + char *str_vlen; /* vlen string */ char str_fixlen_repeat[FIXLEN_STR_SIZE]; /* fixed len string */ - char * str_vlen_repeat; /* vlen string */ + char *str_vlen_repeat; /* vlen string */ char str_array_fixlen[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */ const char *str_array_vlen[VLEN_STR_ARRY_DIM]; /* vlen string array */ char str_fixlen_array_again[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */ @@ -3404,8 +3404,8 @@ test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new const char *str_vlen_array_again[VLEN_STR_ARRY_DIM]; /* vlen string array */ char str_fixlen[FIXLEN_STR_SIZE]; /* fixed len string */ char str_fixlen_repeat[FIXLEN_STR_SIZE]; /* fixed len string */ - char * str_vlen; /* vlen string */ - char * str_vlen_repeat; /* vlen string */ + char *str_vlen; /* vlen string */ + char *str_vlen_repeat; /* vlen string */ } comp7_t; /* compound8 datatype */ @@ -3415,9 +3415,9 @@ test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new char str_fixlen_array_again[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */ const char *str_vlen_array_again[VLEN_STR_ARRY_DIM]; /* vlen string array */ char str_fixlen[FIXLEN_STR_SIZE]; /* fixed len string */ - char * str_vlen; /* vlen string */ + char *str_vlen; /* vlen string */ char str_fixlen_repeat[FIXLEN_STR_SIZE]; /* fixed len string */ - char * str_vlen_repeat; /* vlen string */ + char *str_vlen_repeat; /* vlen string */ } comp8_t; /* compound9 datatype */ @@ -3431,9 +3431,9 @@ test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new hobj_ref_t objref1; /* reference */ char str_fixlen_repeat[FIXLEN_STR_SIZE]; /* fixed len string */ hobj_ref_t objref2; /* reference */ - char * str_vlen; /* vlen string */ + char *str_vlen; /* vlen string */ int int_data2; - char * str_vlen_repeat; /* vlen string */ + char *str_vlen_repeat; /* vlen string */ hobj_ref_t objref3; /* reference */ int int_data3; } comp9_t; @@ -4629,15 +4629,15 @@ test_data_nocomparables(const char *fname, int make_diffs) int rank_attr; char data1_str[DIM_ARRY][STR_SIZE] = {"ab", "cd", "ef"}; herr_t status = SUCCEED; - void * dset_data_ptr1 = NULL; - void * dset_data_ptr2 = NULL; - void * dset_data_ptr3 = NULL; - void * attr_data_ptr1 = NULL; - void * attr_data_ptr2 = NULL; - void * attr_data_ptr3 = NULL; - void * attr_data_ptr4 = NULL; - void * attr2_dim_ptr = NULL; - void * attr3_dim_ptr = NULL; + void *dset_data_ptr1 = NULL; + void *dset_data_ptr2 = NULL; + void *dset_data_ptr3 = NULL; + void *attr_data_ptr1 = NULL; + void *attr_data_ptr2 = NULL; + void *attr_data_ptr3 = NULL; + void *attr_data_ptr4 = NULL; + void *attr2_dim_ptr = NULL; + void *attr3_dim_ptr = NULL; /* init */ tid_dset1 = H5Tcopy(H5T_NATIVE_INT); @@ -5109,7 +5109,7 @@ write_attr_strings(hid_t loc_id, const char *dset_name, hid_t fid, /* create 1D attributes with dimension [2], 2 elements */ hsize_t dims[1] = {2}; char buf1[2][STR_SIZE] = {"ab", "de"}; /* string */ - char * buf1a[2]; /* VL string */ + char *buf1a[2]; /* VL string */ char buf2[2] = {1, 2}; /* bitfield, opaque */ s_t buf3[2] = {{1, 2.0}, {3, 4.0}}; /* compound */ hobj_ref_t buf4[2]; /* reference */ @@ -5123,7 +5123,7 @@ write_attr_strings(hid_t loc_id, const char *dset_name, hid_t fid, /* create 2D attributes with dimension [3][2], 6 elements */ hsize_t dims2[2] = {3, 2}; char buf12[3][2][STR_SIZE] = {{"ab", "cd"}, {"ef", "gh"}, {"ij", "kl"}}; /* string */ - char * buf12a[3][2]; /* VL string */ + char *buf12a[3][2]; /* VL string */ char buf22[3][2] = {{1, 2}, {3, 4}, {5, 6}}; /* bitfield, opaque */ s_t buf32[6] = {{1, 2.0}, {3, 4.0}, {5, 6.0}, {7, 8.0}, {9, 10.0}, {11, 12.0}}; /* compound */ hobj_ref_t buf42[3][2]; /* reference */ @@ -5139,7 +5139,7 @@ write_attr_strings(hid_t loc_id, const char *dset_name, hid_t fid, {{"mn", "pq"}, {"rs", "tu"}, {"vw", "xz"}}, {{"AB", "CD"}, {"EF", "GH"}, {"IJ", "KL"}}, {{"MN", "PQ"}, {"RS", "TU"}, {"VW", "XZ"}}}; /* string */ - char * buf13a[4][3][2]; /* VL string */ + char *buf13a[4][3][2]; /* VL string */ char buf23[4][3][2]; /* bitfield, opaque */ s_t buf33[4][3][2]; /* compound */ hobj_ref_t buf43[4][3][2]; /* reference */ @@ -6098,7 +6098,7 @@ write_attr_in(hid_t loc_id, const char *dset_name, hid_t fid, /* create 1D attributes with dimension [2], 2 elements */ hsize_t dims[1] = {2}; char buf1[2][STR_SIZE] = {"ab", "de"}; /* string */ - char * buf1a[2]; /* VL string */ + char *buf1a[2]; /* VL string */ char buf2[2] = {1, 2}; /* bitfield, opaque */ s_t buf3[2] = {{1, 2.0}, {3, 4.0}}; /* compound */ hobj_ref_t buf4[2]; /* reference */ @@ -6112,7 +6112,7 @@ write_attr_in(hid_t loc_id, const char *dset_name, hid_t fid, /* create 2D attributes with dimension [3][2], 6 elements */ hsize_t dims2[2] = {3, 2}; char buf12[3][2][STR_SIZE] = {{"ab", "cd"}, {"ef", "gh"}, {"ij", "kl"}}; /* string */ - char * buf12a[3][2]; /* VL string */ + char *buf12a[3][2]; /* VL string */ char buf22[3][2] = {{1, 2}, {3, 4}, {5, 6}}; /* bitfield, opaque */ s_t buf32[6] = {{1, 2.0}, {3, 4.0}, {5, 6.0}, {7, 8.0}, {9, 10.0}, {11, 12.0}}; /* compound */ hobj_ref_t buf42[3][2]; /* reference */ @@ -6128,7 +6128,7 @@ write_attr_in(hid_t loc_id, const char *dset_name, hid_t fid, {{"mn", "pq"}, {"rs", "tu"}, {"vw", "xz"}}, {{"AB", "CD"}, {"EF", "GH"}, {"IJ", "KL"}}, {{"MN", "PQ"}, {"RS", "TU"}, {"VW", "XZ"}}}; /* string */ - char * buf13a[4][3][2]; /* VL string */ + char *buf13a[4][3][2]; /* VL string */ char buf23[4][3][2]; /* bitfield, opaque */ s_t buf33[4][3][2]; /* compound */ hobj_ref_t buf43[4][3][2]; /* reference */ @@ -7090,7 +7090,7 @@ write_dset_in(hid_t loc_id, const char *dset_name, hid_t fid, /* create 1D attributes with dimension [2], 2 elements */ hsize_t dims[1] = {2}; char buf1[2][STR_SIZE] = {"ab", "de"}; /* string */ - char * buf1a[2]; /* VL string */ + char *buf1a[2]; /* VL string */ char buf2[2] = {1, 2}; /* bitfield, opaque */ s_t buf3[2] = {{1, 2.0}, {3, 4.0}}; /* compound */ hobj_ref_t buf4[2]; /* reference */ @@ -7104,7 +7104,7 @@ write_dset_in(hid_t loc_id, const char *dset_name, hid_t fid, /* create 2D attributes with dimension [3][2], 6 elements */ hsize_t dims2[2] = {3, 2}; char buf12[3][2][STR_SIZE] = {{"ab", "cd"}, {"ef", "gh"}, {"ij", "kl"}}; /* string */ - char * buf12a[3][2]; /* VL string */ + char *buf12a[3][2]; /* VL string */ char buf22[3][2] = {{1, 2}, {3, 4}, {5, 6}}; /* bitfield, opaque */ s_t buf32[6] = {{1, 2.0}, {3, 4.0}, {5, 6.0}, {7, 8.0}, {9, 10.0}, {11, 12.0}}; /* compound */ hobj_ref_t buf42[3][2]; /* reference */ @@ -7119,7 +7119,7 @@ write_dset_in(hid_t loc_id, const char *dset_name, hid_t fid, {{"mn", "pq"}, {"rs", "tu"}, {"vw", "xz"}}, {{"AB", "CD"}, {"EF", "GH"}, {"IJ", "KL"}}, {{"MN", "PQ"}, {"RS", "TU"}, {"VW", "XZ"}}}; /* string */ - char * buf13a[4][3][2]; /* VL string */ + char *buf13a[4][3][2]; /* VL string */ char buf23[4][3][2]; /* bitfield, opaque */ s_t buf33[4][3][2]; /* compound */ hobj_ref_t buf43[4][3][2]; /* reference */ @@ -7706,7 +7706,7 @@ gen_datareg(hid_t fid, int make_diffs /* flag to modify data buffers */) hid_t did1 = H5I_INVALID_HID; /* dataset ID */ hid_t sid1 = H5I_INVALID_HID; /* dataspace ID */ hsize_t dims1[2] = {10, 10}; /* dimensions */ - int * buf; /* dataset buffer */ + int *buf; /* dataset buffer */ /* reference dataset */ hid_t did2 = H5I_INVALID_HID; /* dataset ID */ hid_t sid2 = H5I_INVALID_HID; /* dataspace ID */ @@ -7826,7 +7826,7 @@ test_hyperslab(const char *fname, int make_diffs /* flag to modify data buffers size_t size; size_t nelmts = (size_t)GBLL / (1024 * 1024); /* elements in each hyperslab */ char fillvalue = -1; - char * buf = NULL; + char *buf = NULL; int i, j, s; char c; diff --git a/tools/h5dump/binread.c b/tools/h5dump/binread.c index 341a085..4e46c57 100644 --- a/tools/h5dump/binread.c +++ b/tools/h5dump/binread.c @@ -61,11 +61,11 @@ usage(void) int main(int argc, char *argv[]) { - FILE * stream; + FILE *stream; size_t numread; TYPE buf[NELMTS]; size_t i, nelmts = NELMTS; - char * fname = NULL; + char *fname = NULL; if (argc != 2) { usage(); diff --git a/tools/h5dump/dynlib_dump.c b/tools/h5dump/dynlib_dump.c index 433522d..9d277e0 100644 --- a/tools/h5dump/dynlib_dump.c +++ b/tools/h5dump/dynlib_dump.c @@ -62,7 +62,7 @@ static size_t H5Z_filter_dynlibud(unsigned int flags, size_t cd_nelmts, const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf) { - char * int_ptr = (char *)*buf; /* Pointer to the data values */ + char *int_ptr = (char *)*buf; /* Pointer to the data values */ size_t buf_left = *buf_size; /* Amount of data buffer left to process */ /* Check for the correct number of parameters */ diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c index 97a79cb..4b4dd84 100644 --- a/tools/h5dump/h5dump.c +++ b/tools/h5dump/h5dump.c @@ -19,7 +19,7 @@ #define PROGRAMNAME "h5dump" static const char *driver_name_g = NULL; /* The driver to open the file with. */ -const char * outfname_g = NULL; +const char *outfname_g = NULL; static hbool_t doxml_g = FALSE; static hbool_t useschema_g = TRUE; static const char *xml_dtd_uri_g = NULL; @@ -66,7 +66,7 @@ static void init_prefix(char **prfx, size_t prfx_len); /* a structure for handling the order command-line parameters come in */ struct handler_t { void (*func)(hid_t, const char *, void *, int, const char *); - char * obj; + char *obj; struct subset_t *subset_info; }; @@ -77,7 +77,7 @@ struct handler_t { */ /* The following initialization makes use of C language concatenating */ /* "xxx" "yyy" into "xxxyyy". */ -static const char * s_opts = "a:b*c:d:ef:g:hik:l:m:n*o*pq:rs:t:uvw:xyz:A*BCD:E*F:G:HM:N:O*RS:VX:"; +static const char *s_opts = "a:b*c:d:ef:g:hik:l:m:n*o*pq:rs:t:uvw:xyz:A*BCD:E*F:G:HM:N:O*RS:VX:"; static struct long_options l_opts[] = {{"attribute", require_arg, 'a'}, {"attribut", require_arg, 'a'}, {"attribu", require_arg, 'a'}, @@ -614,8 +614,8 @@ set_sort_order(const char *form) static void parse_hsize_list(const char *h_list, subset_d *d) { - hsize_t * p_list; - const char * ptr; + hsize_t *p_list; + const char *ptr; unsigned int size_count = 0; unsigned int i = 0; unsigned int last_digit = 0; @@ -668,7 +668,7 @@ static struct subset_t * parse_subset_params(const char *dset) { struct subset_t *s = NULL; - char * brace; + char *brace; if (!dump_opts.disable_compact_subset && ((brace = HDstrrchr(dset, '[')) != NULL)) { *brace++ = '\0'; @@ -723,7 +723,7 @@ parse_mask_list(const char *h_list) int slength_value; unsigned length_value; unsigned long long temp_mask; - const char * ptr = NULL; + const char *ptr = NULL; /* sanity check */ if (h_list) { @@ -1340,7 +1340,7 @@ main(int argc, char *argv[]) struct handler_t *hand = NULL; int i; unsigned u; - char * fname = NULL; + char *fname = NULL; h5tools_setprogname(PROGRAMNAME); h5tools_setstatus(EXIT_SUCCESS); diff --git a/tools/h5dump/h5dump.h b/tools/h5dump/h5dump.h index 518d17f..7689477 100644 --- a/tools/h5dump/h5dump.h +++ b/tools/h5dump/h5dump.h @@ -39,9 +39,9 @@ typedef struct dump_functions_t { typedef struct h5dump_table_items_t { unsigned long fileno; /* File number that these tables refer to */ hid_t oid; /* ID of an object in this file, held open so fileno is consistent */ - table_t * group_table; /* Table of groups */ - table_t * dset_table; /* Table of datasets */ - table_t * type_table; /* Table of datatypes */ + table_t *group_table; /* Table of groups */ + table_t *dset_table; /* Table of datasets */ + table_t *type_table; /* Table of datatypes */ } h5dump_table_items_t; typedef struct h5dump_table_list_t { @@ -51,13 +51,13 @@ typedef struct h5dump_table_list_t { } h5dump_table_list_t; h5dump_table_list_t table_list = {0, 0, NULL}; -table_t * group_table = NULL, *dset_table = NULL, *type_table = NULL; +table_t *group_table = NULL, *dset_table = NULL, *type_table = NULL; unsigned dump_indent = 0; /* how far in to indent the line */ int unamedtype = 0; /* shared datatype with no name */ hbool_t hit_elink = FALSE; /* whether we have traversed an external link */ size_t prefix_len = 1024; -char * prefix = NULL; +char *prefix = NULL; const char *fp_format = NULL; /* things to display or which are set via command line parameters */ diff --git a/tools/h5dump/h5dump_ddl.c b/tools/h5dump/h5dump_ddl.c index 241f5f9..5394a06 100644 --- a/tools/h5dump/h5dump_ddl.c +++ b/tools/h5dump/h5dump_ddl.c @@ -47,7 +47,7 @@ void dump_datatype(hid_t type) { h5tools_context_t ctx; /* print context */ - h5tool_format_t * outputformat = &h5tools_dataformat; + h5tool_format_t *outputformat = &h5tools_dataformat; HDmemset(&ctx, 0, sizeof(ctx)); ctx.indent_level = dump_indent / COL; @@ -71,7 +71,7 @@ void dump_dataspace(hid_t space) { h5tools_context_t ctx; /* print context */ - h5tool_format_t * outputformat = &h5tools_dataformat; + h5tool_format_t *outputformat = &h5tools_dataformat; HDmemset(&ctx, 0, sizeof(ctx)); ctx.indent_level = dump_indent / COL; @@ -94,7 +94,7 @@ dump_attr_cb(hid_t oid, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED * void H5_ATTR_UNUSED *_op_data) { h5tools_context_t ctx; /* print context */ - h5tool_format_t * outputformat = &h5tools_dataformat; + h5tool_format_t *outputformat = &h5tools_dataformat; h5tool_format_t string_dataformat; hid_t attr_id; @@ -156,10 +156,10 @@ dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_ATTR hid_t obj; hid_t dapl_id = H5P_DEFAULT; /* dataset access property list ID */ herr_t ret = SUCCEED; - char * obj_path = NULL; /* Full path of object */ + char *obj_path = NULL; /* Full path of object */ h5tools_str_t buffer; /* string into which to render */ h5tools_context_t ctx; /* print context */ - h5tool_format_t * outputformat = &h5tools_dataformat; + h5tool_format_t *outputformat = &h5tools_dataformat; h5tool_format_t string_dataformat; hsize_t curr_pos = 0; /* total data element position */ @@ -617,7 +617,7 @@ dump_named_datatype(hid_t tid, const char *name) hsize_t curr_pos = 0; /* total data element position */ h5tools_str_t buffer; /* string into which to render */ h5tools_context_t ctx; /* print context */ - h5tool_format_t * outputformat = &h5tools_dataformat; + h5tool_format_t *outputformat = &h5tools_dataformat; h5tool_format_t string_dataformat; /* setup */ @@ -750,7 +750,7 @@ dump_group(hid_t gid, const char *name) char type_name[1024]; h5tools_str_t buffer; /* string into which to render */ h5tools_context_t ctx; /* print context */ - h5tool_format_t * outputformat = &h5tools_dataformat; + h5tool_format_t *outputformat = &h5tools_dataformat; h5tool_format_t string_dataformat; hsize_t curr_pos = 0; /* total data element position */ @@ -898,7 +898,7 @@ void dump_dataset(hid_t did, const char *name, struct subset_t *sset) { h5tools_context_t ctx; /* print context */ - h5tool_format_t * outputformat = &h5tools_dataformat; + h5tool_format_t *outputformat = &h5tools_dataformat; h5tool_format_t string_dataformat; hid_t type, space; unsigned attr_crt_order_flags; @@ -1072,7 +1072,7 @@ void dump_data(hid_t obj_id, int obj_data, struct subset_t *sset, int display_index) { h5tools_context_t ctx; /* print context */ - h5tool_format_t * outputformat = &h5tools_dataformat; + h5tool_format_t *outputformat = &h5tools_dataformat; h5tool_format_t string_dataformat; int print_dataset = FALSE; @@ -1247,11 +1247,11 @@ attr_search(hid_t oid, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *a { herr_t ret = SUCCEED; int j; - char * obj_op_name; - char * obj_name; + char *obj_op_name; + char *obj_name; trav_attr_udata_t *attr_data = (trav_attr_udata_t *)_op_data; - const char * buf = attr_data->path; - const char * op_name = attr_data->op_name; + const char *buf = attr_data->path; + const char *op_name = attr_data->op_name; j = (int)HDstrlen(op_name) - 1; /* find the last / */ @@ -1302,7 +1302,7 @@ static herr_t obj_search(const char *path, const H5O_info_t *oi, const char H5_ATTR_UNUSED *already_visited, void *_op_data) { trav_handle_udata_t *handle_data = (trav_handle_udata_t *)_op_data; - const char * op_name = handle_data->op_name; + const char *op_name = handle_data->op_name; trav_attr_udata_t attr_data; attr_data.path = path; @@ -1340,9 +1340,9 @@ lnk_search(const char *path, const H5L_info_t *li, void *_op_data) { size_t search_len; size_t k; - char * search_name; + char *search_name; trav_handle_udata_t *handle_data = (trav_handle_udata_t *)_op_data; - const char * op_name = handle_data->op_name; + const char *op_name = handle_data->op_name; search_len = HDstrlen(op_name); if (search_len > 0 && op_name[0] != '/') @@ -1453,12 +1453,12 @@ handle_attributes(hid_t fid, const char *attr, void H5_ATTR_UNUSED *data, int H5 { hid_t oid = H5I_INVALID_HID; hid_t attr_id = H5I_INVALID_HID; - char * obj_name = NULL; - char * attr_name = NULL; + char *obj_name = NULL; + char *attr_name = NULL; int j; h5tools_str_t buffer; /* string into which to render */ h5tools_context_t ctx; /* print context */ - h5tool_format_t * outputformat = &h5tools_dataformat; + h5tool_format_t *outputformat = &h5tools_dataformat; h5tool_format_t string_dataformat; hsize_t curr_pos = 0; /* total data element position */ @@ -1597,7 +1597,7 @@ handle_datasets(hid_t fid, const char *dset, void *data, int pe, const char *dis hid_t dsetid; hid_t dapl_id = H5P_DEFAULT; /* dataset access property list ID */ struct subset_t *sset = (struct subset_t *)data; - const char * real_name = display_name ? display_name : dset; + const char *real_name = display_name ? display_name : dset; if ((dsetid = H5Dopen2(fid, dset, dapl_id)) < 0) { if (pe) @@ -1942,9 +1942,9 @@ dump_extlink(hid_t group, const char *linkname, const char *objname) { hid_t oid; H5O_info_t oi; - table_t * old_group_table = group_table; - table_t * old_dset_table = dset_table; - table_t * old_type_table = type_table; + table_t *old_group_table = group_table; + table_t *old_dset_table = dset_table; + table_t *old_type_table = type_table; hbool_t old_hit_elink; ssize_t idx; diff --git a/tools/h5dump/h5dump_extern.h b/tools/h5dump/h5dump_extern.h index c4eb2ed..e987181 100644 --- a/tools/h5dump/h5dump_extern.h +++ b/tools/h5dump/h5dump_extern.h @@ -42,20 +42,20 @@ typedef struct h5dump_table_list_t { struct { unsigned long fileno; /* File number that these tables refer to */ hid_t oid; /* ID of an object in this file, held open so fileno is consistent */ - table_t * group_table; /* Table of groups */ - table_t * dset_table; /* Table of datasets */ - table_t * type_table; /* Table of datatypes */ + table_t *group_table; /* Table of groups */ + table_t *dset_table; /* Table of datasets */ + table_t *type_table; /* Table of datatypes */ } * tables; } h5dump_table_list_t; extern h5dump_table_list_t table_list; -extern table_t * group_table, *dset_table, *type_table; +extern table_t *group_table, *dset_table, *type_table; extern unsigned dump_indent; /* how far in to indent the line */ extern int unamedtype; /* shared datatype with no name */ extern hbool_t hit_elink; /* whether we have traversed an external link */ extern size_t prefix_len; -extern char * prefix; +extern char *prefix; extern const char *fp_format; /* things to display or which are set via command line parameters */ diff --git a/tools/h5dump/h5dump_xml.c b/tools/h5dump/h5dump_xml.c index dd27bb4..62f7cf1 100644 --- a/tools/h5dump/h5dump_xml.c +++ b/tools/h5dump/h5dump_xml.c @@ -133,10 +133,10 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_ { hid_t obj; herr_t ret = SUCCEED; - char * obj_path = NULL; /* Full path of object */ + char *obj_path = NULL; /* Full path of object */ h5tools_str_t buffer; /* string into which to render */ h5tools_context_t ctx; /* print context */ - h5tool_format_t * outputformat = &xml_dataformat; + h5tool_format_t *outputformat = &xml_dataformat; h5tool_format_t string_dataformat; hsize_t curr_pos = 0; /* total data element position */ @@ -643,8 +643,8 @@ xml_escape_the_name(const char *str) size_t len; size_t i; const char *cp; - char * ncp; - char * rcp; + char *ncp; + char *rcp; size_t ncp_len; if (!str) @@ -733,8 +733,8 @@ xml_escape_the_string(const char *str, int slen) size_t len; size_t i; const char *cp = NULL; - char * ncp = NULL; - char * rcp = NULL; + char *ncp = NULL; + char *rcp = NULL; size_t ncp_len; if (!str) @@ -835,7 +835,7 @@ xml_escape_the_string(const char *str, int slen) static void xml_print_datatype(hid_t type, unsigned in_group) { - char * mname; + char *mname; hid_t mtype; unsigned nmembers; unsigned ndims; @@ -857,7 +857,7 @@ xml_print_datatype(hid_t type, unsigned in_group) htri_t is_vlstr = FALSE; h5tools_str_t buffer; /* string into which to render */ h5tools_context_t ctx; /* print context */ - h5tool_format_t * outputformat = &xml_dataformat; + h5tool_format_t *outputformat = &xml_dataformat; h5tool_format_t string_dataformat; hsize_t curr_pos = 0; /* total data element position */ @@ -887,7 +887,7 @@ xml_print_datatype(hid_t type, unsigned in_group) if (!in_group && H5Tcommitted(type) > 0) { H5O_info_t oinfo; - obj_t * found_obj; /* Found object */ + obj_t *found_obj; /* Found object */ /* detect a shared datatype, output only once */ H5Oget_info(type, &oinfo); @@ -1555,7 +1555,7 @@ xml_dump_datatype(hid_t type) { h5tools_str_t buffer; /* string into which to render */ h5tools_context_t ctx; /* print context */ - h5tool_format_t * outputformat = &xml_dataformat; + h5tool_format_t *outputformat = &xml_dataformat; h5tool_format_t string_dataformat; hsize_t curr_pos = 0; /* total data element position */ @@ -1588,7 +1588,7 @@ xml_dump_datatype(hid_t type) if (H5Tcommitted(type) > 0) { H5O_info_t oinfo; - obj_t * found_obj; /* Found object */ + obj_t *found_obj; /* Found object */ /* Datatype is a shared or named datatype */ H5Oget_info(type, &oinfo); @@ -1687,7 +1687,7 @@ xml_dump_dataspace(hid_t space) int i; h5tools_str_t buffer; /* string into which to render */ h5tools_context_t ctx; /* print context */ - h5tool_format_t * outputformat = &xml_dataformat; + h5tool_format_t *outputformat = &xml_dataformat; h5tool_format_t string_dataformat; hsize_t curr_pos = 0; /* total data element position */ @@ -1866,7 +1866,7 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t H5_ATTR_UNUSED *sset, hsize_t curr_pos = 0; /* total data element position */ h5tools_str_t buffer; /* string into which to render */ h5tools_context_t ctx; /* print context */ - h5tool_format_t * outputformat = &xml_dataformat; + h5tool_format_t *outputformat = &xml_dataformat; h5tool_format_t string_dataformat; HDmemset(&ctx, 0, sizeof(ctx)); @@ -2033,7 +2033,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED hsize_t curr_pos = 0; /* total data element position */ h5tools_str_t buffer; /* string into which to render */ h5tools_context_t ctx; /* print context */ - h5tool_format_t * outputformat = &xml_dataformat; + h5tool_format_t *outputformat = &xml_dataformat; h5tool_format_t string_dataformat; char *t_aname = xml_escape_the_name(attr_name); @@ -2349,14 +2349,14 @@ xml_dump_named_datatype(hid_t type, const char *name) hsize_t curr_pos = 0; /* total data element position */ h5tools_str_t buffer; /* string into which to render */ h5tools_context_t ctx; /* print context */ - h5tool_format_t * outputformat = &xml_dataformat; + h5tool_format_t *outputformat = &xml_dataformat; h5tool_format_t string_dataformat; - char * tmp; - char * dtxid; - char * parentxid; - char * t_tmp; - char * t_prefix; - char * t_name; + char *tmp; + char *dtxid; + char *parentxid; + char *t_tmp; + char *t_prefix; + char *t_name; tmp = (char *)HDmalloc(HDstrlen(prefix) + HDstrlen(name) + 2); HDstrcpy(tmp, prefix); @@ -2550,14 +2550,14 @@ xml_dump_group(hid_t gid, const char *name) unsigned attr_crt_order_flags; int isRoot = 0; char type_name[1024]; - char * t_objname = NULL; - char * par_name = NULL; - char * cp = NULL; - char * tmp = NULL; - char * par = NULL; + char *t_objname = NULL; + char *par_name = NULL; + char *cp = NULL; + char *tmp = NULL; + char *par = NULL; h5tools_str_t buffer; /* string into which to render */ h5tools_context_t ctx; /* print context */ - h5tool_format_t * outputformat = &xml_dataformat; + h5tool_format_t *outputformat = &xml_dataformat; h5tool_format_t string_dataformat; hsize_t curr_pos = 0; /* total data element position */ @@ -2914,11 +2914,11 @@ xml_print_refs(hid_t did, int source) hssize_t ssiz = -1; hsize_t i; size_t tsiz; - hobj_ref_t * refbuf = NULL; - char * buf = NULL; + hobj_ref_t *refbuf = NULL; + char *buf = NULL; h5tools_str_t buffer; /* string into which to render */ h5tools_context_t ctx; /* print context */ - h5tool_format_t * outputformat = &xml_dataformat; + h5tool_format_t *outputformat = &xml_dataformat; h5tool_format_t string_dataformat; hsize_t curr_pos = 0; /* total data element position */ @@ -3069,12 +3069,12 @@ xml_print_strs(hid_t did, int source) size_t tsiz = 0; hsize_t i; size_t str_size = 0; - char * bp = NULL; - char * onestring = NULL; - void * buf = NULL; + char *bp = NULL; + char *onestring = NULL; + void *buf = NULL; h5tools_str_t buffer; /* string into which to render */ h5tools_context_t ctx; /* print context */ - h5tool_format_t * outputformat = &xml_dataformat; + h5tool_format_t *outputformat = &xml_dataformat; h5tool_format_t string_dataformat; hsize_t curr_pos = 0; /* total data element position */ @@ -3238,7 +3238,7 @@ check_filters(hid_t dcpl) unsigned int flags; h5tools_str_t buffer; /* string into which to render */ h5tools_context_t ctx; /* print context */ - h5tool_format_t * outputformat = &xml_dataformat; + h5tool_format_t *outputformat = &xml_dataformat; h5tool_format_t string_dataformat; hsize_t curr_pos = 0; /* total data element position */ @@ -3375,11 +3375,11 @@ xml_dump_fill_value(hid_t dcpl, hid_t type) size_t sz; size_t i; hsize_t space; - void * buf; - char * name; + void *buf; + char *name; h5tools_str_t buffer; /* string into which to render */ h5tools_context_t ctx; /* print context */ - h5tool_format_t * outputformat = &xml_dataformat; + h5tool_format_t *outputformat = &xml_dataformat; h5tool_format_t string_dataformat; hsize_t curr_pos = 0; /* total data element position */ @@ -3722,20 +3722,20 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss hid_t dcpl; H5D_fill_value_t fvstatus; int maxdims; - hsize_t * chsize; + hsize_t *chsize; int ndims; int i; H5D_alloc_time_t at; H5D_fill_time_t ft; hsize_t tempi; - char * tmp; - char * t_name; - char * t_tmp; - char * t_prefix; + char *tmp; + char *t_name; + char *t_tmp; + char *t_prefix; unsigned attr_crt_order_flags; h5tools_str_t buffer; /* string into which to render */ h5tools_context_t ctx; /* print context */ - h5tool_format_t * outputformat = &xml_dataformat; + h5tool_format_t *outputformat = &xml_dataformat; h5tool_format_t string_dataformat; hsize_t curr_pos = 0; /* total data element position */ @@ -4325,8 +4325,8 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss static void xml_print_enum(hid_t type) { - char ** name = NULL; /*member names */ - unsigned char * value = NULL; /*value array */ + char **name = NULL; /*member names */ + unsigned char *value = NULL; /*value array */ unsigned nmembs; /*number of members */ hid_t super; /*enum base integer type */ hid_t native = H5I_INVALID_HID; /*native integer datatype */ @@ -4335,7 +4335,7 @@ xml_print_enum(hid_t type) size_t j; h5tools_str_t buffer; /* string into which to render */ h5tools_context_t ctx; /* print context */ - h5tool_format_t * outputformat = &xml_dataformat; + h5tool_format_t *outputformat = &xml_dataformat; h5tool_format_t string_dataformat; hsize_t curr_pos = 0; /* total data element position */ diff --git a/tools/h5dump/h5dumpgentest.c b/tools/h5dump/h5dumpgentest.c index 1272ba2..13ebe7f 100644 --- a/tools/h5dump/h5dumpgentest.c +++ b/tools/h5dump/h5dumpgentest.c @@ -435,10 +435,10 @@ gent_dataset(void) { hid_t fid, dataset, space; hsize_t dims[2]; - int ** dset1 = NULL; - int * dset1_data = NULL; + int **dset1 = NULL; + int *dset1_data = NULL; double **dset2 = NULL; - double * dset2_data = NULL; + double *dset2_data = NULL; int i, j; /* Set up data arrays */ @@ -1776,7 +1776,7 @@ gent_str(void) } compound_t; compound_t **comp1 = NULL; - compound_t * comp1_data = NULL; + compound_t *comp1_data = NULL; hsize_t mdims[2]; /* Set up data array */ @@ -2092,7 +2092,7 @@ gent_objref(void) hobj_ref_t *wbuf, /* buffer to write to disk */ *rbuf, /* buffer read from disk */ *tbuf; /* temp. buffer read from disk */ - uint32_t * tu32; /* Temporary pointer to uint32 data */ + uint32_t *tu32; /* Temporary pointer to uint32 data */ int i; /* counting variables */ const char *write_comment = "Foo!"; /* Comments for group */ @@ -2325,9 +2325,9 @@ gent_attrreg(void) hsize_t coord1[POINT1_NPOINTS][SPACE2_RANK]; /* Coordinates for point selection */ hdset_reg_ref_t *wbuf; /* buffer to write to disk */ hdset_reg_ref_t *rbuf; /* buffer read from disk */ - uint8_t * dwbuf; /* Buffer for writing numeric data to disk */ - uint8_t * drbuf; /* Buffer for reading numeric data from disk */ - uint8_t * tu8; /* Temporary pointer to uint8 data */ + uint8_t *dwbuf; /* Buffer for writing numeric data to disk */ + uint8_t *drbuf; /* Buffer for reading numeric data from disk */ + uint8_t *tu8; /* Temporary pointer to uint8 data */ int i; /* counting variables */ /* Allocate write & read buffers */ @@ -2741,7 +2741,7 @@ static void gent_vldatatypes2(void) { hvl_t wdata[SPACE1_DIM1]; /* Information to write */ - hvl_t * t1; /* Temporary pointer to VL information */ + hvl_t *t1; /* Temporary pointer to VL information */ hid_t fid1; /* HDF5 File IDs */ hid_t dataset; /* Dataset ID */ hid_t sid1; /* Dataspace ID */ @@ -3019,7 +3019,7 @@ gent_vldatatypes5(void) static void gent_array1_big(void) { - int * wdata; /* Information to write */ + int *wdata; /* Information to write */ hid_t fid1; /* HDF5 File IDs */ hid_t dataset; /* Dataset ID */ hid_t sid1; /* Dataspace ID */ @@ -3929,10 +3929,10 @@ gent_char(void) "men are created equal. Now we are engaged in a great " "civil war, testing whether that nation or any nation " "so conceived and so dedicated can long endure."; - hid_t fid1; /* HDF5 File IDs */ - hid_t dataset; /* Dataset ID */ - hid_t sid1; /* Dataspace ID */ - hsize_t dims1[1]; + hid_t fid1; /* HDF5 File IDs */ + hid_t dataset; /* Dataset ID */ + hid_t sid1; /* Dataspace ID */ + hsize_t dims1[1]; dims1[0] = HDstrlen(wdata); @@ -6182,7 +6182,7 @@ gent_longlinks(void) hid_t fid = (-1); /* File ID */ hid_t gid = (-1); /* Group ID */ hid_t gid2 = (-1); /* Datatype ID */ - char * objname = NULL; /* Name of object [Long] */ + char *objname = NULL; /* Name of object [Long] */ size_t u; /* Local index variable */ /* Create files */ @@ -6404,7 +6404,7 @@ gent_bigdims(void) hsize_t hs_size[1]; /* hyperslab dimensions */ size_t size; char fillvalue = 0; - char * buf = NULL; + char *buf = NULL; hsize_t i; char c; size_t nelmts; @@ -8325,15 +8325,15 @@ gent_intscalars(void) hid_t tid = H5I_INVALID_HID; hsize_t dims[2]; - uint8_t ** dsetu8 = NULL; + uint8_t **dsetu8 = NULL; uint16_t **dsetu16 = NULL; uint32_t **dsetu32 = NULL; uint64_t **dsetu64 = NULL; - int8_t ** dset8 = NULL; - int16_t ** dset16 = NULL; - int32_t ** dset32 = NULL; - int64_t ** dset64 = NULL; - double ** dsetdbl = NULL; + int8_t **dset8 = NULL; + int16_t **dset16 = NULL; + int32_t **dset32 = NULL; + int64_t **dset64 = NULL; + double **dsetdbl = NULL; uint8_t valu8bits; uint16_t valu16bits; @@ -8568,15 +8568,15 @@ gent_attr_intscalars(void) hid_t tid = H5I_INVALID_HID; hsize_t dims[2]; - uint8_t ** dsetu8 = NULL; + uint8_t **dsetu8 = NULL; uint16_t **dsetu16 = NULL; uint32_t **dsetu32 = NULL; uint64_t **dsetu64 = NULL; - int8_t ** dset8 = NULL; - int16_t ** dset16 = NULL; - int32_t ** dset32 = NULL; - int64_t ** dset64 = NULL; - double ** dsetdbl = NULL; + int8_t **dset8 = NULL; + int16_t **dset16 = NULL; + int32_t **dset32 = NULL; + int64_t **dset64 = NULL; + double **dsetdbl = NULL; uint8_t valu8bits; uint16_t valu16bits; @@ -9342,15 +9342,15 @@ gent_intattrscalars(void) hid_t tid = H5I_INVALID_HID; hsize_t dims[2]; - uint8_t ** dsetu8 = NULL; + uint8_t **dsetu8 = NULL; uint16_t **dsetu16 = NULL; uint32_t **dsetu32 = NULL; uint64_t **dsetu64 = NULL; - int8_t ** dset8 = NULL; - int16_t ** dset16 = NULL; - int32_t ** dset32 = NULL; - int64_t ** dset64 = NULL; - double ** dsetdbl = NULL; + int8_t **dset8 = NULL; + int16_t **dset16 = NULL; + int32_t **dset32 = NULL; + int64_t **dset64 = NULL; + double **dsetdbl = NULL; uint8_t valu8bits; uint16_t valu16bits; @@ -9620,25 +9620,25 @@ gent_intsattrs(void) hid_t aspace = H5I_INVALID_HID; hsize_t dims[2], adims[1]; - uint8_t ** dsetu8 = NULL; + uint8_t **dsetu8 = NULL; uint16_t **dsetu16 = NULL; uint32_t **dsetu32 = NULL; uint64_t **dsetu64 = NULL; - int8_t ** dset8 = NULL; - int16_t ** dset16 = NULL; - int32_t ** dset32 = NULL; - int64_t ** dset64 = NULL; - double ** dsetdbl = NULL; + int8_t **dset8 = NULL; + int16_t **dset16 = NULL; + int32_t **dset32 = NULL; + int64_t **dset64 = NULL; + double **dsetdbl = NULL; - uint8_t * asetu8 = NULL; + uint8_t *asetu8 = NULL; uint16_t *asetu16 = NULL; uint32_t *asetu32 = NULL; uint64_t *asetu64 = NULL; - int8_t * aset8 = NULL; - int16_t * aset16 = NULL; - int32_t * aset32 = NULL; - int64_t * aset64 = NULL; - double * asetdbl = NULL; + int8_t *aset8 = NULL; + int16_t *aset16 = NULL; + int32_t *aset32 = NULL; + int64_t *aset64 = NULL; + double *asetdbl = NULL; uint8_t valu8bits; uint16_t valu16bits; @@ -9962,12 +9962,12 @@ gent_floatsattrs(void) hid_t aspace = H5I_INVALID_HID; hsize_t dims[2], adims[1]; - float ** dset32 = NULL; - double ** dset64 = NULL; + float **dset32 = NULL; + double **dset64 = NULL; long double **dset128 = NULL; - float * aset32 = NULL; - double * aset64 = NULL; + float *aset32 = NULL; + double *aset64 = NULL; long double *aset128 = NULL; float val32bits; @@ -10786,7 +10786,7 @@ static size_t H5Z_filter_dynlibud(unsigned int flags, size_t cd_nelmts, const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf) { - char * int_ptr = (char *)*buf; /* Pointer to the data values */ + char *int_ptr = (char *)*buf; /* Pointer to the data values */ size_t buf_left = *buf_size; /* Amount of data buffer left to process */ /* Check for the correct number of parameters */ diff --git a/tools/h5import/h5import.c b/tools/h5import/h5import.c index 2a65591..b475981 100644 --- a/tools/h5import/h5import.c +++ b/tools/h5import/h5import.c @@ -78,7 +78,7 @@ main(int argc, char *argv[]) int token; int i; int state = 0; - struct Input * in = NULL; + struct Input *in = NULL; const char *err1 = "Invalid number of arguments: %d.\n"; const char *err2 = "Error in state table.\n"; @@ -352,7 +352,7 @@ gtoken(char *s) static int processDataFile(char *infile, struct Input *in, hid_t file_id) { - FILE * strm = NULL; + FILE *strm = NULL; const char *err1 = "Unable to open the input file %s for reading.\n"; const char *err2 = "Error in allocating integer data storage.\n"; const char *err3 = "Error in allocating floating-point data storage.\n"; @@ -462,7 +462,7 @@ error: static int readIntegerData(FILE *strm, struct Input *in) { - H5DT_INT8 * in08; + H5DT_INT8 *in08; H5DT_INT16 *in16; H5DT_INT16 temp16; H5DT_INT32 *in32; @@ -638,7 +638,7 @@ readIntegerData(FILE *strm, struct Input *in) static int readUIntegerData(FILE *strm, struct Input *in) { - H5DT_UINT8 * in08; + H5DT_UINT8 *in08; H5DT_UINT16 *in16; H5DT_UINT16 temp16; H5DT_UINT32 *in32; @@ -810,10 +810,10 @@ static int readFloatData(FILE *strm, struct Input *in) { H5DT_FLOAT32 *fp32; - uint32_t * bfp32; + uint32_t *bfp32; uint32_t temp32; H5DT_FLOAT64 *fp64; - uint64_t * bfp64; + uint64_t *bfp64; uint64_t temp64; hsize_t len = 1; @@ -1045,7 +1045,7 @@ processStrData(FILE *strm, struct Input *in, hid_t file_id) i++; if (c == 10) { /* eol */ - char * str2 = str; + char *str2 = str; hid_t fspace_id; hsize_t start[1]; hsize_t count[1] = {1}; @@ -1103,9 +1103,9 @@ processStrHDFData(FILE *strm, struct Input *in, hid_t file_id) hid_t mspace_id = H5I_INVALID_HID; hid_t type_id = H5I_INVALID_HID; hid_t handle = H5I_INVALID_HID; - char * str1 = NULL; - char * str2 = NULL; - char * str3 = NULL; + char *str1 = NULL; + char *str2 = NULL; + char *str3 = NULL; char str[1024] = ""; int j; hsize_t line; @@ -2530,7 +2530,7 @@ static int parsePathInfo(struct path_info *path, char *temp) { const char delimiter[] = "/\""; - char * token; + char *token; int i = 0; const char *err1 = "Path string larger than MAX_PATH_NAME_LENGTH.\n"; @@ -2560,7 +2560,7 @@ parseDimensions(struct Input *in, char *strm) { const char delimiter[] = ","; char temp[255]; - char * token; + char *token; int i = 0; const char *err1 = "Unable to allocate dynamic memory.\n"; @@ -4606,7 +4606,7 @@ static int process(struct Options *opt) { struct Input *in; - FILE * extfile; + FILE *extfile; hid_t file_id; hid_t group_id; hid_t handle; diff --git a/tools/h5import/h5import.h b/tools/h5import/h5import.h index efd40e1..2ebeecc 100644 --- a/tools/h5import/h5import.h +++ b/tools/h5import/h5import.h @@ -84,16 +84,16 @@ struct Input { int inputArchitecture; int inputByteOrder; int rank; - hsize_t * sizeOfDimension; + hsize_t *sizeOfDimension; int outputClass; int outputSize; int outputArchitecture; int outputByteOrder; - hsize_t * sizeOfChunk; - hsize_t * maxsizeOfDimension; + hsize_t *sizeOfChunk; + hsize_t *maxsizeOfDimension; int compressionType; int compressionParam; - char * externFilename; + char *externFilename; VOIDP data; int configOptionVector[NUM_KEYS]; }; diff --git a/tools/h5jam/getub.c b/tools/h5jam/getub.c index 6f35518..869c4aa 100644 --- a/tools/h5jam/getub.c +++ b/tools/h5jam/getub.c @@ -21,7 +21,7 @@ void parse_command_line(int argc, const char *const *argv); #define PROGRAM_NAME "getub" char *nbytes = NULL; -static const char * s_opts = "c:"; /* add more later ? */ +static const char *s_opts = "c:"; /* add more later ? */ static struct long_options l_opts[] = {{"c", require_arg, 'c'}, /* input file */ {NULL, 0, '\0'}}; @@ -81,9 +81,9 @@ main(int argc, char *argv[]) { int fd = H5I_INVALID_HID; unsigned size; - char * filename = NULL; + char *filename = NULL; long res; - char * buf = NULL; + char *buf = NULL; h5tools_setprogname(PROGRAM_NAME); h5tools_setstatus(EXIT_SUCCESS); diff --git a/tools/h5jam/h5jam.c b/tools/h5jam/h5jam.c index cbbdc4a..43f3c3d 100644 --- a/tools/h5jam/h5jam.c +++ b/tools/h5jam/h5jam.c @@ -34,7 +34,7 @@ char *ub_file = NULL; * 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 = "hi:u:o:c:V"; /* add more later ? */ +static const char *s_opts = "hi:u:o:c:V"; /* add more later ? */ static struct long_options l_opts[] = { {"help", no_arg, 'h'}, {"hel", no_arg, 'h'}, {"i", require_arg, 'i'}, /* input file */ {"u", require_arg, 'u'}, /* user block file */ diff --git a/tools/h5jam/h5jamgentest.c b/tools/h5jam/h5jamgentest.c index cade9df..c3e2bea 100644 --- a/tools/h5jam/h5jamgentest.c +++ b/tools/h5jam/h5jamgentest.c @@ -133,7 +133,7 @@ gent_ub(const char *filename, size_t ub_size, size_t ub_fill) size_t u; float dset2_1[10], dset2_2[3][5]; int fd; - char * bp; + char *bp; if (ub_size > 0) { create_plist = H5Pcreate(H5P_FILE_CREATE); @@ -291,10 +291,10 @@ gent_ub(const char *filename, size_t ub_size, size_t ub_fill) static void create_textfile(const char *name, size_t size) { - char * buf; + char *buf; int fd; size_t i; - char * bp; + char *bp; fd = HDcreat(name, 0777); HDassert(fd >= 0); diff --git a/tools/h5jam/h5unjam.c b/tools/h5jam/h5unjam.c index 242a584..a74dd1a 100644 --- a/tools/h5jam/h5unjam.c +++ b/tools/h5jam/h5unjam.c @@ -35,7 +35,7 @@ char *ub_file = NULL; * 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 = "hu:i:o:d:V"; +static const char *s_opts = "hu:i:o:d:V"; static struct long_options l_opts[] = { {"help", no_arg, 'h'}, {"hel", no_arg, 'h'}, {"i", require_arg, 'i'}, /* input file */ {"u", require_arg, 'u'}, /* user block file */ diff --git a/tools/h5jam/tellub.c b/tools/h5jam/tellub.c index 90e1072..70bb7d2 100644 --- a/tools/h5jam/tellub.c +++ b/tools/h5jam/tellub.c @@ -24,7 +24,7 @@ * 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 = "h"; +static const char *s_opts = "h"; static struct long_options l_opts[] = {{"help", no_arg, 'h'}, {"hel", no_arg, 'h'}, {NULL, 0, '\0'}}; /*------------------------------------------------------------------------- @@ -100,7 +100,7 @@ leave(int ret) int main(int argc, char *argv[]) { - char * ifname; + char *ifname; hid_t ifile = H5I_INVALID_HID; hsize_t usize; htri_t testval; diff --git a/tools/h5ls/dynlib_ls.c b/tools/h5ls/dynlib_ls.c index 433522d..9d277e0 100644 --- a/tools/h5ls/dynlib_ls.c +++ b/tools/h5ls/dynlib_ls.c @@ -62,7 +62,7 @@ static size_t H5Z_filter_dynlibud(unsigned int flags, size_t cd_nelmts, const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf) { - char * int_ptr = (char *)*buf; /* Pointer to the data values */ + char *int_ptr = (char *)*buf; /* Pointer to the data values */ size_t buf_left = *buf_size; /* Amount of data buffer left to process */ /* Check for the correct number of parameters */ diff --git a/tools/h5ls/h5ls.c b/tools/h5ls/h5ls.c index a4eecdf..6bc42f7 100644 --- a/tools/h5ls/h5ls.c +++ b/tools/h5ls/h5ls.c @@ -108,7 +108,7 @@ static h5tool_format_t ls_dataformat = { /* Struct to pass through to visitors */ typedef struct { - const char * fname; /* Filename */ + const char *fname; /* Filename */ hid_t fid; /* File ID */ hid_t gid; /* Group ID */ hbool_t symlink_target; /* Whether this is the target of an symbolic link */ @@ -827,7 +827,7 @@ print_float_type(h5tools_str_t *buffer, hid_t type, int ind) static hbool_t print_cmpd_type(h5tools_str_t *buffer, hid_t type, int ind) { - char * name = NULL; /* member name */ + char *name = NULL; /* member name */ size_t size; /* total size of type in bytes */ hid_t subtype; /* member data type */ int nmembs; /* number of members */ @@ -886,7 +886,7 @@ print_enum_type(h5tools_str_t *buffer, hid_t type, int ind) h5tools_str_append(buffer, " {"); if (nmembs > 0) { - char ** name; /* member names */ + char **name; /* member names */ unsigned char *value; /* value array */ hid_t native = H5I_INVALID_HID; /* native integer data type */ size_t dst_size; /* destination value type size */ @@ -1109,7 +1109,7 @@ print_reference_type(h5tools_str_t *buffer, hid_t type, int H5_ATTR_UNUSED ind) static hbool_t print_opaque_type(h5tools_str_t *buffer, hid_t type, int ind) { - char * tag; + char *tag; size_t size; if (H5T_OPAQUE != H5Tget_class(type)) @@ -1300,8 +1300,8 @@ dump_dataset_values(hid_t dset) h5tools_str_t buffer; /* string into which to render */ h5tools_context_t ctx; /* print context */ h5tool_format_t outputformat; - h5tool_format_t * info = &ls_dataformat; - unsigned char * region_buf = NULL; + h5tool_format_t *info = &ls_dataformat; + unsigned char *region_buf = NULL; H5TOOLS_START_DEBUG(" "); @@ -1469,8 +1469,8 @@ dump_attribute_values(hid_t attr) h5tools_str_t buffer; /* string into which to render */ h5tools_context_t ctx; /* print context */ h5tool_format_t outputformat; - h5tool_format_t * info = &ls_dataformat; - unsigned char * region_buf = NULL; + h5tool_format_t *info = &ls_dataformat; + unsigned char *region_buf = NULL; H5TOOLS_START_DEBUG(" "); @@ -1646,7 +1646,7 @@ list_attr(hid_t obj, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *ain hsize_t curr_pos = 0; /* total data element position */ h5tools_str_t buffer; /* string into which to render */ h5tools_context_t ctx; /* print context */ - h5tool_format_t * info = &ls_dataformat; + h5tool_format_t *info = &ls_dataformat; H5TOOLS_START_DEBUG(" "); @@ -1756,7 +1756,7 @@ dataset_list1(hid_t dset) hsize_t curr_pos = 0; /* total data element position */ h5tools_str_t buffer; /* string into which to render */ h5tools_context_t ctx; /* print context */ - h5tool_format_t * info = &ls_dataformat; + h5tool_format_t *info = &ls_dataformat; HDmemset(&ctx, 0, sizeof(ctx)); HDmemset(&buffer, 0, sizeof(h5tools_str_t)); @@ -1828,7 +1828,7 @@ dataset_list2(hid_t dset, const char H5_ATTR_UNUSED *name) hsize_t curr_pos = 0; /* total data element position */ h5tools_str_t buffer; /* string into which to render */ h5tools_context_t ctx; /* print context */ - h5tool_format_t * info = &ls_dataformat; + h5tool_format_t *info = &ls_dataformat; HDmemset(&ctx, 0, sizeof(ctx)); HDmemset(&buffer, 0, sizeof(h5tools_str_t)); @@ -1954,7 +1954,7 @@ dataset_list2(hid_t dset, const char H5_ATTR_UNUSED *name) for (i = 0; i < nf; i++) { cd_nelmts = NELMTS(cd_values); filt_id = H5Pget_filter2(dcpl, (unsigned)i, &filt_flags, &cd_nelmts, cd_values, - sizeof(f_name), f_name, NULL); + sizeof(f_name), f_name, NULL); f_name[sizeof(f_name) - 1] = '\0'; HDsnprintf(s, sizeof(s), "Filter-%d:", i); h5tools_str_append(&buffer, " %-10s %s-%u %s {", s, (f_name[0] ? f_name : "method"), @@ -2010,7 +2010,7 @@ datatype_list2(hid_t type, const char H5_ATTR_UNUSED *name) hsize_t curr_pos = 0; /* total data element position */ h5tools_str_t buffer; /* string into which to render */ h5tools_context_t ctx; /* print context */ - h5tool_format_t * info = &ls_dataformat; + h5tool_format_t *info = &ls_dataformat; HDmemset(&ctx, 0, sizeof(ctx)); HDmemset(&buffer, 0, sizeof(h5tools_str_t)); @@ -2041,11 +2041,11 @@ static herr_t list_obj(const char *name, const H5O_info_t *oinfo, const char *first_seen, void *_iter) { H5O_type_t obj_type = oinfo->type; /* Type of the object */ - iter_t * iter = (iter_t *)_iter; + iter_t *iter = (iter_t *)_iter; hsize_t curr_pos = 0; /* total data element position */ h5tools_str_t buffer; /* string into which to render */ h5tools_context_t ctx; /* print context */ - h5tool_format_t * info = &ls_dataformat; + h5tool_format_t *info = &ls_dataformat; H5TOOLS_START_DEBUG(" "); @@ -2112,7 +2112,7 @@ list_obj(const char *name, const H5O_info_t *oinfo, const char *first_seen, void * which is common to all objects. */ if (verbose_g > 0) { size_t buf_size = 0; - char * comment = NULL; + char *comment = NULL; ssize_t cmt_bufsize = -1; /* Display attributes */ @@ -2206,14 +2206,14 @@ done: static herr_t list_lnk(const char *name, const H5L_info_t *linfo, void *_iter) { - char * buf = NULL; - iter_t * iter = (iter_t *)_iter; + char *buf = NULL; + iter_t *iter = (iter_t *)_iter; int ret; hsize_t curr_pos = 0; /* total data element position */ h5tool_link_info_t lnk_info; h5tools_str_t buffer; /* string into which to render */ h5tools_context_t ctx; /* print context */ - h5tool_format_t * info = &ls_dataformat; + h5tool_format_t *info = &ls_dataformat; HDmemset(&ctx, 0, sizeof(ctx)); HDmemset(&buffer, 0, sizeof(h5tools_str_t)); @@ -2399,7 +2399,7 @@ visit_obj(hid_t file, const char *oname, iter_t *iter) hsize_t curr_pos = 0; /* total data element position */ h5tools_str_t buffer; /* string into which to render */ h5tools_context_t ctx; /* print context */ - h5tool_format_t * info = &ls_dataformat; + h5tool_format_t *info = &ls_dataformat; HDmemset(&ctx, 0, sizeof(ctx)); HDmemset(&buffer, 0, sizeof(h5tools_str_t)); @@ -2590,9 +2590,9 @@ int main(int argc, char *argv[]) { hid_t file_id = H5I_INVALID_HID; - char * fname = NULL, *oname = NULL, *x = NULL; + char *fname = NULL, *oname = NULL, *x = NULL; const char *s = NULL; - char * rest; + char *rest; int argno; static char root_name[] = "/"; char drivername[50]; @@ -3010,7 +3010,7 @@ main(int argc, char *argv[]) hsize_t curr_pos = 0; /* total data element position */ h5tools_str_t buffer; /* string into which to render */ h5tools_context_t ctx; /* print context */ - h5tool_format_t * info = &ls_dataformat; + h5tool_format_t *info = &ls_dataformat; HDmemset(&ctx, 0, sizeof(ctx)); HDmemset(&buffer, 0, sizeof(h5tools_str_t)); diff --git a/tools/h5repack/dynlib_rpk.c b/tools/h5repack/dynlib_rpk.c index b228344..ed602ea 100644 --- a/tools/h5repack/dynlib_rpk.c +++ b/tools/h5repack/dynlib_rpk.c @@ -68,7 +68,7 @@ static size_t H5Z_filter_dynlib1(unsigned int flags, size_t cd_nelmts, const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf) { - int * int_ptr = (int *)*buf; /* Pointer to the data values */ + int *int_ptr = (int *)*buf; /* Pointer to the data values */ size_t buf_left = *buf_size; /* Amount of data buffer left to process */ int add_on = 0; diff --git a/tools/h5repack/dynlib_vrpk.c b/tools/h5repack/dynlib_vrpk.c index 5eac4f2..65cb054 100644 --- a/tools/h5repack/dynlib_vrpk.c +++ b/tools/h5repack/dynlib_vrpk.c @@ -65,7 +65,7 @@ static size_t H5Z_filter_dynlib4(unsigned int flags, size_t cd_nelmts, const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf) { - int * int_ptr = (int *)*buf; /* Pointer to the data values */ + int *int_ptr = (int *)*buf; /* Pointer to the data values */ size_t buf_left = *buf_size; /* Amount of data buffer left to process */ int add_on = 0; unsigned ver_info[3]; diff --git a/tools/h5repack/h5repack.c b/tools/h5repack/h5repack.c index 6ea0178..4f50c99 100644 --- a/tools/h5repack/h5repack.c +++ b/tools/h5repack/h5repack.c @@ -115,7 +115,7 @@ h5repack_end(pack_opt_t *options) int h5repack_addfilter(const char *str, pack_opt_t *options) { - obj_list_t * obj_list = NULL; /* one object list for the -f and -l option entry */ + obj_list_t *obj_list = NULL; /* one object list for the -f and -l option entry */ filter_info_t filter; /* filter info for the current -f option entry */ unsigned n_objs; /* number of objects in the current -f or -l option entry */ int is_glb; /* is the filter global */ @@ -350,7 +350,7 @@ copy_attr(hid_t loc_in, hid_t loc_out, named_dt_t **named_dt_head_p, trav_table_ hid_t ftype_id = H5I_INVALID_HID; /* file type ID */ hid_t wtype_id = H5I_INVALID_HID; /* read/write type ID */ size_t msize; /* size of type */ - void * buf = NULL; /* data buffer */ + void *buf = NULL; /* data buffer */ hsize_t nelmts; /* number of elements in dataset */ int rank; /* rank of dataset */ htri_t is_named; /* Whether the datatype is named */ @@ -654,7 +654,7 @@ check_options(pack_opt_t *options) for (i = 0; i < options->op_tbl->nelems; i++) { pack_info_t pack = options->op_tbl->objs[i]; - char * name = pack.path; + char *name = pack.path; for (j = 0; j < pack.nfilters; j++) { if (options->verbose) { @@ -773,7 +773,7 @@ check_objects(const char *fname, pack_opt_t *options) for (i = 0; i < options->op_tbl->nelems; i++) { pack_info_t obj = options->op_tbl->objs[i]; - char * name = obj.path; + char *name = obj.path; if (options->verbose) HDprintf(" <%s>", name); diff --git a/tools/h5repack/h5repack.h b/tools/h5repack/h5repack.h index a52089d..20f7f73 100644 --- a/tools/h5repack/h5repack.h +++ b/tools/h5repack/h5repack.h @@ -183,13 +183,13 @@ void init_packobject(pack_info_t *obj); *------------------------------------------------------------------------- */ -int apply_filters(const char * name, /* object name from traverse list */ +int apply_filters(const char *name, /* object name from traverse list */ int rank, /* rank of dataset */ const hsize_t *dims, /* dimensions of dataset */ size_t msize, /* size of type */ hid_t dcpl_id, /* dataset creation property list */ - pack_opt_t * options, /* repack options */ - int * has_filter); /* (OUT) object NAME has a filter */ + pack_opt_t *options, /* repack options */ + int *has_filter); /* (OUT) object NAME has a filter */ /*------------------------------------------------------------------------- * options table diff --git a/tools/h5repack/h5repack_copy.c b/tools/h5repack/h5repack_copy.c index 0726d27..02eab4f 100644 --- a/tools/h5repack/h5repack_copy.c +++ b/tools/h5repack/h5repack_copy.c @@ -548,7 +548,7 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti hid_t wtype_id = H5I_INVALID_HID; /* read/write type ID */ hid_t ocpl_id = H5I_INVALID_HID; /* property to pass copy options */ hid_t lcpl_id = H5I_INVALID_HID; /* link creation property list */ - named_dt_t * named_dt_head = NULL; /* Pointer to the stack of named datatypes copied */ + named_dt_t *named_dt_head = NULL; /* Pointer to the stack of named datatypes copied */ size_t msize; /* size of type */ hsize_t nelmts; /* number of elements in dataset */ H5D_space_status_t space_status; /* determines whether space has been allocated for the dataset */ @@ -558,8 +558,8 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti hsize_t dsize_out; /* output dataset size after filter */ int apply_s; /* flag for apply filter to small dataset sizes */ int apply_f; /* flag for apply filter to return error on H5Dcreate */ - void * buf = NULL; /* buffer for raw data */ - void * hslab_buf = NULL; /* hyperslab buffer for raw data */ + void *buf = NULL; /* buffer for raw data */ + void *hslab_buf = NULL; /* hyperslab buffer for raw data */ int has_filter; /* current object has a filter */ int req_filter; /* there was a request for a filter */ int req_obj_layout = 0; /* request layout to current object */ diff --git a/tools/h5repack/h5repack_filters.c b/tools/h5repack/h5repack_filters.c index 1fca4e4..3fb49e5 100644 --- a/tools/h5repack/h5repack_filters.c +++ b/tools/h5repack/h5repack_filters.c @@ -34,7 +34,7 @@ */ static int aux_copy_obj(hid_t dcpl_id, /* dataset creation property list */ - const char * name, /* object name from traverse list */ + const char *name, /* object name from traverse list */ pack_info_t *objout /*OUT*/) /* info about object to filter */ { int nfilters; /* number of filters in DCPL */ @@ -84,12 +84,12 @@ done: *------------------------------------------------------------------------- */ static int -aux_find_obj(const char * name, /* object name from traverse list */ - pack_opt_t * options, /* repack options */ +aux_find_obj(const char *name, /* object name from traverse list */ + pack_opt_t *options, /* repack options */ pack_info_t *obj /*OUT*/) /* info about object to filter */ { - char * pdest = NULL; - const char * pname = NULL; + char *pdest = NULL; + const char *pname = NULL; unsigned int i; for (i = 0; i < options->op_tbl->nelems; i++) { @@ -124,8 +124,8 @@ aux_find_obj(const char * name, /* object name from traverse list */ *------------------------------------------------------------------------- */ static int -aux_assign_obj(const char * name, /* object name from traverse list */ - pack_opt_t * options, /* repack options */ +aux_assign_obj(const char *name, /* object name from traverse list */ + pack_opt_t *options, /* repack options */ pack_info_t *obj /*OUT*/) /* info about object to filter */ { int idx, i; @@ -233,13 +233,13 @@ aux_assign_obj(const char * name, /* object name from traverse list */ */ int -apply_filters(const char * name, /* object name from traverse list */ +apply_filters(const char *name, /* object name from traverse list */ int rank, /* rank of dataset */ const hsize_t *dims, /* dimensions of dataset */ size_t msize, /* size of type */ hid_t dcpl_id, /* dataset creation property list */ - pack_opt_t * options, /* repack options */ - int * has_filter) /* (OUT) object NAME has a filter */ + pack_opt_t *options, /* repack options */ + int *has_filter) /* (OUT) object NAME has a filter */ { int nfilters; /* number of filters in DCPL */ hsize_t chsize[64]; /* chunk size in elements */ diff --git a/tools/h5repack/h5repack_main.c b/tools/h5repack/h5repack_main.c index ee2fec5..e9b89df 100644 --- a/tools/h5repack/h5repack_main.c +++ b/tools/h5repack/h5repack_main.c @@ -31,7 +31,7 @@ const char *outfile = NULL; * Command-line options: The user can specify short or long-named * parameters. */ -static const char * s_opts = "a:b:c:d:e:f:hi:l:m:no:q:s:t:u:vz:ELM:VXW"; +static const char *s_opts = "a:b:c:d:e:f:hi:l:m:no:q:s:t:u:vz:ELM:VXW"; static struct long_options l_opts[] = {{"alignment", require_arg, 'a'}, {"block", require_arg, 'b'}, {"compact", require_arg, 'c'}, diff --git a/tools/h5repack/h5repack_refs.c b/tools/h5repack/h5repack_refs.c index 4524538..f10fbcc 100644 --- a/tools/h5repack/h5repack_refs.c +++ b/tools/h5repack/h5repack_refs.c @@ -53,7 +53,7 @@ do_copy_refobjs(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti hsize_t dims[H5S_MAX_RANK]; /* dimensions of dataset */ unsigned int i, j; int k; - named_dt_t * named_dt_head = NULL; /* Pointer to the stack of named datatypes copied */ + named_dt_t *named_dt_head = NULL; /* Pointer to the stack of named datatypes copied */ int ret_value = 0; /*------------------------------------------------------------------------- @@ -224,7 +224,7 @@ do_copy_refobjs(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti hid_t refobj_id = H5I_INVALID_HID; hdset_reg_ref_t *refbuf = NULL; /* input buffer for region references */ hdset_reg_ref_t *buf = NULL; /* output buffer */ - const char * refname; + const char *refname; unsigned u; /*------------------------------------------------------------------------- @@ -450,10 +450,10 @@ copy_refs_attr(hid_t loc_in, hid_t loc_out, trav_table_t *travt, hid_t fidout) / int rank; H5T_class_t type_class = -1; hbool_t is_ref = 0, is_ref_vlen = 0, is_ref_array = 0, is_ref_comp = 0; - void * refbuf = NULL; - void * buf = NULL; - unsigned * ref_comp_index = NULL; - size_t * ref_comp_size = NULL; + void *refbuf = NULL; + void *buf = NULL; + unsigned *ref_comp_index = NULL; + size_t *ref_comp_size = NULL; int ref_comp_field_n = 0; int ret_value = 0; @@ -809,7 +809,7 @@ static const char * MapIdToName(hid_t refobj_id, trav_table_t *travt) { unsigned int u; - const char * ret = NULL; + const char *ret = NULL; /* linear search */ for (u = 0; u < travt->nobjs; u++) { diff --git a/tools/h5repack/h5repack_verify.c b/tools/h5repack/h5repack_verify.c index ed29bd2..d07b443 100644 --- a/tools/h5repack/h5repack_verify.c +++ b/tools/h5repack/h5repack_verify.c @@ -54,7 +54,7 @@ h5repack_verify(const char *in_fname, const char *out_fname, pack_opt_t *options H5TOOLS_GOTO_ERROR((-1), "H5Fopen failed on <%s>", out_fname); for (i = 0; i < options->op_tbl->nelems; i++) { - char * name = options->op_tbl->objs[i].path; + char *name = options->op_tbl->objs[i].path; pack_info_t *obj = &options->op_tbl->objs[i]; /*------------------------------------------------------------------------- diff --git a/tools/h5repack/h5repacktst.c b/tools/h5repack/h5repacktst.c index f1f2115..72dc47b 100644 --- a/tools/h5repack/h5repacktst.c +++ b/tools/h5repack/h5repacktst.c @@ -2045,7 +2045,7 @@ make_szip(hid_t loc_id) unsigned szip_pixels_per_block = 8; hsize_t dims[RANK] = {DIM1, DIM2}; hsize_t chunk_dims[RANK] = {CDIM1, CDIM2}; - int ** buf = NULL; + int **buf = NULL; int szip_can_encode = 0; /* Create and fill array */ @@ -2083,7 +2083,7 @@ make_szip(hid_t loc_id) /* WARNING? SZIP is decoder only, can't generate test files */ if (H5Sclose(sid) < 0) - goto error; + goto error; if (H5Pclose(dcpl) < 0) goto error; @@ -2119,7 +2119,7 @@ make_deflate(hid_t loc_id) hid_t sid = H5I_INVALID_HID; /* dataspace ID */ hsize_t dims[RANK] = {DIM1, DIM2}; hsize_t chunk_dims[RANK] = {CDIM1, CDIM2}; - int ** buf = NULL; + int **buf = NULL; hobj_ref_t bufref[1]; /* reference */ hsize_t dims1r[1] = {1}; @@ -2198,7 +2198,7 @@ make_shuffle(hid_t loc_id) hid_t sid = H5I_INVALID_HID; /* dataspace ID */ hsize_t dims[RANK] = {DIM1, DIM2}; hsize_t chunk_dims[RANK] = {CDIM1, CDIM2}; - int ** buf = NULL; + int **buf = NULL; /* Create and fill array */ H5TEST_ALLOCATE_2D_ARRAY(buf, int, DIM1, DIM2); @@ -2267,7 +2267,7 @@ make_fletcher32(hid_t loc_id) hid_t sid = H5I_INVALID_HID; /* dataspace ID */ hsize_t dims[RANK] = {DIM1, DIM2}; hsize_t chunk_dims[RANK] = {CDIM1, CDIM2}; - int ** buf = NULL; + int **buf = NULL; /* Create and fill array */ H5TEST_ALLOCATE_2D_ARRAY(buf, int, DIM1, DIM2); @@ -2341,7 +2341,7 @@ make_nbit(hid_t loc_id) hid_t dsid = H5I_INVALID_HID; hsize_t dims[RANK] = {DIM1, DIM2}; hsize_t chunk_dims[RANK] = {CDIM1, CDIM2}; - int ** buf = NULL; + int **buf = NULL; /* Create and fill array */ H5TEST_ALLOCATE_2D_ARRAY(buf, int, DIM1, DIM2); @@ -2428,7 +2428,7 @@ make_scaleoffset(hid_t loc_id) hid_t dsid = H5I_INVALID_HID; hsize_t dims[RANK] = {DIM1, DIM2}; hsize_t chunk_dims[RANK] = {CDIM1, CDIM2}; - int ** buf = NULL; + int **buf = NULL; /* Create and fill array */ H5TEST_ALLOCATE_2D_ARRAY(buf, int, DIM1, DIM2); @@ -2513,7 +2513,7 @@ make_all_filters(hid_t loc_id) #endif /* H5_HAVE_FILTER_SZIP */ hsize_t dims[RANK] = {DIM1, DIM2}; hsize_t chunk_dims[RANK] = {CDIM1, CDIM2}; - int ** buf = NULL; + int **buf = NULL; #if defined(H5_HAVE_FILTER_SZIP) int szip_can_encode = 0; #endif @@ -2765,7 +2765,7 @@ make_layout(hid_t loc_id) hid_t sid = H5I_INVALID_HID; /* dataspace ID */ hsize_t dims[RANK] = {DIM1, DIM2}; hsize_t chunk_dims[RANK] = {CDIM1, CDIM2}; - int ** buf = NULL; + int **buf = NULL; int i; char name[16]; @@ -2956,8 +2956,8 @@ make_layout3(hid_t loc_id) hsize_t chunk_dims1[RANK] = {DIM1_L3 * 2, 5}; hsize_t chunk_dims2[RANK] = {SDIM1_L3 + 2, SDIM2_L3 / 2}; hsize_t chunk_dims3[RANK] = {SDIM1_L3 - 2, SDIM2_L3 / 2}; - int ** buf1 = NULL; - int ** buf2 = NULL; + int **buf1 = NULL; + int **buf2 = NULL; /* Create and fill arrays */ H5TEST_ALLOCATE_2D_ARRAY(buf1, int, DIM1_L3, DIM2_L3); @@ -3676,7 +3676,7 @@ write_dset_in(hid_t loc_id, const char *dset_name, /* for saving reference to da { hsize_t TEST_BUFSIZE = (128 * 1024 * 1024); /* 128MB */ - double * dbuf; /* information to write */ + double *dbuf; /* information to write */ size_t size; hsize_t sdims[] = {1}; hsize_t tdims[] = {TEST_BUFSIZE / sizeof(double) + 1}; @@ -4180,7 +4180,7 @@ make_dset_reg_ref(hid_t loc_id) hsize_t count[SPACE2_RANK]; /* Element count of hyperslab */ hsize_t block[SPACE2_RANK]; /* Block size of hyperslab */ hdset_reg_ref_t *wbuf = NULL; /* buffer to write to disk */ - int * dwbuf = NULL; /* Buffer for writing numeric data to disk */ + int *dwbuf = NULL; /* Buffer for writing numeric data to disk */ int i; /* counting variables */ int retval = -1; /* return value */ diff --git a/tools/h5stat/h5stat.c b/tools/h5stat/h5stat.c index b9e3ea4..14cc518 100644 --- a/tools/h5stat/h5stat.c +++ b/tools/h5stat/h5stat.c @@ -74,7 +74,7 @@ typedef struct iter_t { unsigned long dset_layouts[H5D_NLAYOUTS]; /* Type of storage for each dataset */ unsigned long dset_comptype[H5_NFILTERS_IMPL]; /* Number of currently implemented filters */ unsigned long dset_ntypes; /* Number of diff. dataset datatypes found */ - dtype_info_t * dset_type_info; /* Pointer to dataset datatype information found */ + dtype_info_t *dset_type_info; /* Pointer to dataset datatype information found */ unsigned dset_dim_nbins; /* Number of bins for dataset dimensions */ unsigned long *dset_dim_bins; /* Pointer to array of bins for dataset dimensions */ ohdr_info_t dset_ohdr_info; /* Object header information for datasets */ @@ -1596,7 +1596,7 @@ int main(int argc, char *argv[]) { iter_t iter; - const char * fname = NULL; + const char *fname = NULL; hid_t fid = H5I_INVALID_HID; struct handler_t *hand = NULL; hid_t fapl_id = H5P_DEFAULT; diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c index 7fc4999..fae52de 100644 --- a/tools/lib/h5diff.c +++ b/tools/lib/h5diff.c @@ -342,8 +342,8 @@ build_match_list(const char *objname1, trav_info_t *info1, const char *objname2, size_t curr1 = 0; size_t curr2 = 0; unsigned infile[2]; - char * path1_lp = NULL; - char * path2_lp = NULL; + char *path1_lp = NULL; + char *path2_lp = NULL; h5trav_type_t type1_l; h5trav_type_t type2_l; size_t path1_offset = 0; @@ -476,11 +476,11 @@ trav_grp_objs(const char *path, const H5O_info_t *oinfo, const char *already_vis static herr_t trav_grp_symlinks(const char *path, const H5L_info_t *linfo, void *udata) { - trav_info_t * tinfo = (trav_info_t *)udata; - diff_opt_t * opts = (diff_opt_t *)tinfo->opts; + trav_info_t *tinfo = (trav_info_t *)udata; + diff_opt_t *opts = (diff_opt_t *)tinfo->opts; h5tool_link_info_t lnk_info; - const char * ext_fname; - const char * ext_path; + const char *ext_fname; + const char *ext_path; herr_t ret_value = SUCCEED; H5TOOLS_START_DEBUG(" "); @@ -587,8 +587,8 @@ h5diff(const char *fname1, const char *fname2, const char *objname1, const char hsize_t nfound = 0; int l_ret1 = -1; int l_ret2 = -1; - char * obj1fullname = NULL; - char * obj2fullname = NULL; + char *obj1fullname = NULL; + char *obj2fullname = NULL; int both_objs_grp = 0; /* init to group type */ h5trav_type_t obj1type = H5TRAV_TYPE_GROUP; @@ -1070,8 +1070,8 @@ diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1, hid_t file2_id, unsigned i; const char *grp1_path = ""; const char *grp2_path = ""; - char * obj1_fullpath = NULL; - char * obj2_fullpath = NULL; + char *obj1_fullpath = NULL; + char *obj2_fullpath = NULL; diff_args_t argdata; size_t idx1 = 0; size_t idx2 = 0; @@ -1120,7 +1120,7 @@ diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1, hid_t file2_id, */ #ifdef H5_HAVE_PARALLEL { - char * workerTasks = (char *)HDmalloc((size_t)(g_nTasks - 1) * sizeof(char)); + char *workerTasks = (char *)HDmalloc((size_t)(g_nTasks - 1) * sizeof(char)); int n; int busyTasks = 0; struct diffs_found nFoundbyWorker; diff --git a/tools/lib/h5diff.h b/tools/lib/h5diff.h index e811041..548f019 100644 --- a/tools/lib/h5diff.h +++ b/tools/lib/h5diff.h @@ -36,7 +36,7 @@ typedef struct { */ /* linked list to keep exclude path list */ struct exclude_path_list { - const char * obj_path; + const char *obj_path; h5trav_type_t obj_type; struct exclude_path_list *next; }; @@ -86,8 +86,8 @@ typedef struct { hsize_t acc[H5S_MAX_RANK]; /* accumulator position */ hsize_t pos[H5S_MAX_RANK]; /* matrix position */ hsize_t sm_pos[H5S_MAX_RANK]; /* stripmine position */ - char * obj_name[2]; /* name for object */ - struct subset_t * sset[2]; /* subsetting parameters */ + char *obj_name[2]; /* name for object */ + struct subset_t *sset[2]; /* subsetting parameters */ hbool_t custom_vol[2]; /* Using a custom input, output VOL? */ } diff_opt_t; diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c index 57b8a5c..296c3a2 100644 --- a/tools/lib/h5diff_array.c +++ b/tools/lib/h5diff_array.c @@ -129,8 +129,8 @@ static hbool_t not_comparable; typedef struct mcomp_t { unsigned n; /* number of members */ - hid_t * ids; /* member type id */ - size_t * offsets; + hid_t *ids; /* member type id */ + size_t *offsets; struct mcomp_t **m; /* members */ } mcomp_t; @@ -528,10 +528,10 @@ diff_datum(void *_mem1, void *_mem2, hsize_t elemtno, diff_opt_t *opts, hid_t co case H5T_STRING: H5TOOLS_DEBUG("H5T_STRING"); { - char * s = NULL; - char * sx = NULL; - char * s1 = NULL; - char * s2 = NULL; + char *s = NULL; + char *sx = NULL; + char *s1 = NULL; + char *s2 = NULL; size_t size1; size_t size2; size_t sizex; diff --git a/tools/lib/h5diff_attr.c b/tools/lib/h5diff_attr.c index 1360efe..725e86c 100644 --- a/tools/lib/h5diff_attr.c +++ b/tools/lib/h5diff_attr.c @@ -19,7 +19,7 @@ #define ATTR_NAME_MAX 255 typedef struct table_attr_t { - char * name; + char *name; unsigned exist[2]; } match_attr_t; @@ -334,8 +334,8 @@ diff_attr_data(hid_t attr1_id, hid_t attr2_id, const char *name1, const char *na hid_t mtype2_id = H5I_INVALID_HID; /* memory data type ID */ size_t msize1; /* memory size of memory type */ size_t msize2; /* memory size of memory type */ - void * buf1 = NULL; /* data buffer */ - void * buf2 = NULL; /* data buffer */ + void *buf1 = NULL; /* data buffer */ + void *buf2 = NULL; /* data buffer */ hbool_t buf1hasdata = FALSE; /* buffer has data */ hbool_t buf2hasdata = FALSE; /* buffer has data */ int rank1; /* rank of dataset */ @@ -600,8 +600,8 @@ diff_attr(hid_t loc1_id, hid_t loc2_id, const char *path1, const char *path2, di table_attrs_t *match_list_attrs = NULL; hid_t attr1_id = H5I_INVALID_HID; /* attr ID */ hid_t attr2_id = H5I_INVALID_HID; /* attr ID */ - char * name1 = NULL; - char * name2 = NULL; + char *name1 = NULL; + char *name2 = NULL; unsigned u; /* Local index variable */ hsize_t nfound = 0; hsize_t nfound_total = 0; diff --git a/tools/lib/h5diff_dset.c b/tools/lib/h5diff_dset.c index b2331f1..23d709b 100644 --- a/tools/lib/h5diff_dset.c +++ b/tools/lib/h5diff_dset.c @@ -182,10 +182,10 @@ diff_datasetid(hid_t did1, hid_t did2, const char *obj1_name, const char *obj2_n hsize_t storage_size2; hsize_t nfound = 0; /* number of differences found */ int can_compare = 1; /* do diff or not */ - void * buf1 = NULL; - void * buf2 = NULL; - void * sm_buf1 = NULL; - void * sm_buf2 = NULL; + void *buf1 = NULL; + void *buf2 = NULL; + void *sm_buf1 = NULL; + void *sm_buf2 = NULL; hid_t sm_space1 = H5I_INVALID_HID; /*stripmine data space */ hid_t sm_space2 = H5I_INVALID_HID; /*stripmine data space */ size_t need; /* bytes needed for malloc */ diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c index 2902bb4..675d6c4 100644 --- a/tools/lib/h5tools.c +++ b/tools/lib/h5tools.c @@ -30,8 +30,8 @@ int H5tools_INDENT_g = 0; /* global variables */ H5E_auto2_t lib_func; H5E_auto2_t tools_func; -void * lib_edata; -void * tools_edata; +void *lib_edata; +void *tools_edata; hid_t H5tools_ERR_STACK_g = H5I_INVALID_HID; hid_t H5tools_ERR_CLS_g = H5I_INVALID_HID; @@ -1136,8 +1136,8 @@ h5tools_render_element(FILE *stream, const h5tool_format_t *info, h5tools_contex hsize_t elmt_counter) { hbool_t dimension_break = TRUE; - char * s = NULL; - char * section = NULL; /* a section of output */ + char *s = NULL; + char *section = NULL; /* a section of output */ int secnum; /* section sequence number */ int multiline; /* datum was multiline */ @@ -1301,8 +1301,8 @@ h5tools_render_region_element(FILE *stream, const h5tool_format_t *info, h5tools hsize_t local_elmt_counter, hsize_t elmt_counter) { hbool_t dimension_break = TRUE; - char * s = NULL; - char * section = NULL; /* a section of output */ + char *s = NULL; + char *section = NULL; /* a section of output */ int secnum; /* section sequence number */ int multiline; /* datum was multiline */ @@ -1545,7 +1545,7 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t case H5T_STRING: { unsigned int i; H5T_str_t pad; - char * s = NULL; + char *s = NULL; unsigned char tempuchar; H5TOOLS_DEBUG("H5T_STRING"); @@ -1738,7 +1738,7 @@ render_bin_output_region_data_blocks(hid_t region_id, FILE *stream, hid_t contai unsigned jndx; size_t type_size; hid_t mem_space = H5I_INVALID_HID; - void * region_buf = NULL; + void *region_buf = NULL; hbool_t past_catch = FALSE; hsize_t blkndx; hid_t sid1 = H5I_INVALID_HID; @@ -1902,7 +1902,7 @@ render_bin_output_region_data_points(hid_t region_space, hid_t region_id, FILE * hsize_t *dims1 = NULL; size_t type_size; hid_t mem_space = H5I_INVALID_HID; - void * region_buf = NULL; + void *region_buf = NULL; int ret_value = 0; H5TOOLS_START_DEBUG(" "); diff --git a/tools/lib/h5tools.h b/tools/lib/h5tools.h index 2ee83ef..90498ef 100644 --- a/tools/lib/h5tools.h +++ b/tools/lib/h5tools.h @@ -488,7 +488,7 @@ typedef struct h5tool_format_t { } h5tool_format_t; typedef struct subset_d { - hsize_t * data; + hsize_t *data; unsigned int len; } subset_d; @@ -563,29 +563,29 @@ extern "C" { H5TOOLS_DLLVAR const char *drivernames[]; -H5TOOLS_DLLVAR h5tool_format_t h5tools_dataformat; -H5TOOLS_DLLVAR const h5tools_dump_header_t h5tools_standardformat; +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 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 */ 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 */ -H5TOOLS_DLLVAR FILE *rawinstream; /* input stream for raw input */ -H5TOOLS_DLLVAR FILE *rawoutstream; /* output stream for raw output */ -H5TOOLS_DLLVAR FILE *rawerrorstream; /* output stream for raw error */ -H5TOOLS_DLLVAR int bin_output; /* binary output */ -H5TOOLS_DLLVAR int bin_form; /* binary form */ -H5TOOLS_DLLVAR int region_output; /* region output */ -H5TOOLS_DLLVAR int oid_output; /* oid output */ -H5TOOLS_DLLVAR int data_output; /* data output */ -H5TOOLS_DLLVAR int attr_data_output; /* attribute data output */ +H5TOOLS_DLLVAR FILE *rawattrstream; /* output stream for raw attribute data */ +H5TOOLS_DLLVAR FILE *rawdatastream; /* output stream for raw data */ +H5TOOLS_DLLVAR FILE *rawinstream; /* input stream for raw input */ +H5TOOLS_DLLVAR FILE *rawoutstream; /* output stream for raw output */ +H5TOOLS_DLLVAR FILE *rawerrorstream; /* output stream for raw error */ +H5TOOLS_DLLVAR int bin_output; /* binary output */ +H5TOOLS_DLLVAR int bin_form; /* binary form */ +H5TOOLS_DLLVAR int region_output; /* region output */ +H5TOOLS_DLLVAR int oid_output; /* oid output */ +H5TOOLS_DLLVAR int data_output; /* data output */ +H5TOOLS_DLLVAR int attr_data_output; /* attribute data output */ /* sort parameters */ H5TOOLS_DLLVAR H5_index_t sort_by; /* sort_by [creation_order | name] */ diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c index 6aa1a50..9ad78bd 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -175,13 +175,13 @@ const h5tools_dump_header_t h5tools_standardformat = { }; const h5tools_dump_header_t *h5tools_dump_header_format; -table_t * h5dump_type_table = NULL; /* type table reference for datatype dump */ +table_t *h5dump_type_table = NULL; /* type table reference for datatype dump */ /* local prototypes */ static int h5tools_print_region_data_blocks(hid_t region_id, FILE *stream, const h5tool_format_t *info, h5tools_context_t *cur_ctx, - h5tools_str_t * buffer, /* string into which to render */ + h5tools_str_t *buffer, /* string into which to render */ size_t ncols, unsigned ndims, hid_t type_id, hsize_t nblocks, hsize_t *ptdata); @@ -328,14 +328,14 @@ h5tools_dump_simple_data(FILE *stream, const h5tool_format_t *info, h5tools_cont static int h5tools_print_region_data_blocks(hid_t region_id, FILE *stream, const h5tool_format_t *info, h5tools_context_t *cur_ctx, - h5tools_str_t * buffer, /* string into which to render */ + h5tools_str_t *buffer, /* string into which to render */ size_t ncols, unsigned ndims, hid_t type_id, hsize_t nblocks, hsize_t *ptdata) { hbool_t dimension_break = TRUE; - hsize_t * dims1 = NULL; - hsize_t * start = NULL; - hsize_t * count = NULL; + hsize_t *dims1 = NULL; + hsize_t *start = NULL; + hsize_t *count = NULL; hsize_t blkndx; hsize_t total_size[H5S_MAX_RANK]; hsize_t elmtno; /* element index */ @@ -350,7 +350,7 @@ h5tools_print_region_data_blocks(hid_t region_id, FILE *stream, const h5tool_for hid_t mem_space = H5I_INVALID_HID; hid_t sid1 = H5I_INVALID_HID; h5tools_context_t ctx; - void * region_buf = NULL; + void *region_buf = NULL; int ret_value = 0; HDassert(info); @@ -512,7 +512,7 @@ hbool_t h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id, 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 */ + hsize_t *curr_pos, /* total data element position */ size_t ncols, hsize_t region_elmt_counter, /* element counter */ hsize_t elmt_counter) { @@ -520,7 +520,7 @@ h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id, FILE *strea hssize_t snblocks; hsize_t nblocks; hsize_t alloc_size; - hsize_t * ptdata = NULL; + hsize_t *ptdata = NULL; int sndims; unsigned ndims; hsize_t indx; @@ -733,7 +733,7 @@ h5tools_print_region_data_points(hid_t region_space, hid_t region_id, FILE *stre hsize_t npoints, hsize_t *ptdata) { hbool_t dimension_break = TRUE; - hsize_t * dims1 = NULL; + hsize_t *dims1 = NULL; hsize_t elmtno; /* element index */ hsize_t curr_pos = 0; hsize_t total_size[H5S_MAX_RANK]; @@ -742,7 +742,7 @@ h5tools_print_region_data_points(hid_t region_space, hid_t region_id, FILE *stre size_t type_size; unsigned int region_flags; /* buffer extent flags */ hid_t mem_space = H5I_INVALID_HID; - void * region_buf = NULL; + void *region_buf = NULL; h5tools_context_t ctx; hbool_t past_catch = FALSE; int ret_value = 0; @@ -877,7 +877,7 @@ h5tools_dump_region_data_points(hid_t region_space, hid_t region_id, FILE *strea hssize_t snpoints; hsize_t npoints; hsize_t alloc_size; - hsize_t * ptdata; + hsize_t *ptdata; int sndims; unsigned ndims; hsize_t indx; @@ -1095,10 +1095,10 @@ done: static herr_t h5tools_print_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx, hid_t dset, hid_t p_type, hid_t f_space, hsize_t hyperslab_count, - hsize_t * temp_start, /* start inside offset count loop */ - hsize_t * temp_count, /* count inside offset count loop */ - hsize_t * temp_block, /* block size used in loop */ - hsize_t * temp_stride, /* stride size used in loop */ + hsize_t *temp_start, /* start inside offset count loop */ + hsize_t *temp_count, /* count inside offset count loop */ + hsize_t *temp_block, /* block size used in loop */ + hsize_t *temp_stride, /* stride size used in loop */ const hsize_t *total_size, /* total size of dataset */ unsigned int row_dim) /* index of row_counter dimension */ { @@ -1893,7 +1893,7 @@ int h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_t *info, h5tools_context_t *ctx, hid_t type, int object_search) { - char * mname; + char *mname; hid_t mtype = H5I_INVALID_HID; hid_t str_type = H5I_INVALID_HID; hid_t super = H5I_INVALID_HID; @@ -1922,7 +1922,7 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_ H5TOOLS_THROW((-1), "H5Tget_class failed"); if (object_search && H5Tcommitted(type) > 0) { H5O_info_t oinfo; - obj_t * obj = NULL; /* Found object */ + obj_t *obj = NULL; /* Found object */ H5Oget_info(type, &oinfo); obj = search_obj(h5dump_type_table, oinfo.addr); @@ -2567,7 +2567,7 @@ int h5tools_print_enum(FILE *stream, h5tools_str_t *buffer, const h5tool_format_t *info, h5tools_context_t *ctx, hid_t type) { - char ** name = NULL; /*member names */ + char **name = NULL; /*member names */ unsigned char *value = NULL; /*value array */ unsigned char *copy = NULL; /*a pointer to value array */ unsigned i; @@ -2843,7 +2843,7 @@ h5tools_print_fill_value(h5tools_str_t *buffer /*in,out*/, const h5tool_format_t { size_t size; hid_t n_type = H5I_INVALID_HID; - void * buf = NULL; + void *buf = NULL; n_type = H5Tget_native_type(type_id, H5T_DIR_DEFAULT); @@ -2953,7 +2953,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t * for (i = 0; i < nfilters && !ok; i++) { cd_nelmts = NELMTS(cd_values); filtn = H5Pget_filter2(dcpl_id, (unsigned)i, &filt_flags, &cd_nelmts, cd_values, - sizeof(f_name), f_name, NULL); + sizeof(f_name), f_name, NULL); ok = (filtn >= 0); } @@ -3395,7 +3395,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t * void h5tools_dump_comment(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx, hid_t obj_id) { - char * comment = NULL; + char *comment = NULL; ssize_t cmt_bufsize = -1; size_t buf_size = 0; size_t ncols = 80; /* available output width */ @@ -3791,7 +3791,7 @@ h5tools_dump_data(FILE *stream, const h5tool_format_t *info, h5tools_context_t * size_t ncols = 80; /* available output width */ h5tool_format_t string_dataformat; h5tool_format_t outputformat; - unsigned char * region_buf = NULL; + unsigned char *region_buf = NULL; H5TOOLS_START_DEBUG(" file=%p", (void *)stream); H5TOOLS_DEBUG("rawdata file=%p", (void *)rawdatastream); diff --git a/tools/lib/h5tools_ref.c b/tools/lib/h5tools_ref.c index 22416b9..b591b8e 100644 --- a/tools/lib/h5tools_ref.c +++ b/tools/lib/h5tools_ref.c @@ -34,7 +34,7 @@ typedef struct { haddr_t objno; /* Object ID (i.e. address) */ - char * path; /* Object path */ + char *path; /* Object path */ } ref_path_node_t; static H5SL_t *ref_path_table = NULL; /* the "table" (implemented with a skip list) */ diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c index f23d726..571f27d 100644 --- a/tools/lib/h5tools_str.c +++ b/tools/lib/h5tools_str.c @@ -35,7 +35,7 @@ /* Variable length string datatype */ #define STR_INIT_LEN 4096 /*initial length */ -static char * h5tools_escape(char *s, size_t size); +static char *h5tools_escape(char *s, size_t size); static hbool_t h5tools_str_is_zero(const void *_mem, size_t size); static void h5tools_print_char(h5tools_str_t *str, const h5tool_format_t *info, char ch); void h5tools_str_indent(h5tools_str_t *str, const h5tool_format_t *info, h5tools_context_t *ctx); @@ -572,15 +572,15 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai { size_t nsize, offset, size = 0, nelmts, start; H5T_sign_t nsign; - char * name = NULL; + char *name = NULL; unsigned char *ucp_vp = (unsigned char *)vp; - char * cp_vp = (char *)vp; + char *cp_vp = (char *)vp; hid_t memb = H5I_INVALID_HID; hid_t obj = H5I_INVALID_HID; static char fmt_llong[8], fmt_ullong[8]; H5T_str_t pad; H5T_class_t type_class; - char * ret_value = NULL; + char *ret_value = NULL; H5TOOLS_START_DEBUG(" "); /* Build default formats for long long types */ @@ -644,7 +644,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai case H5T_STRING: { unsigned int i; char quote = '\0'; - char * s; + char *s; H5TOOLS_DEBUG("H5T_STRING"); quote = '\0'; @@ -1182,7 +1182,7 @@ static char * h5tools_escape(char *s /*in,out*/, size_t size) { register size_t i; - const char * escape; + const char *escape; char octal[8]; size_t n = HDstrlen(s); diff --git a/tools/lib/h5tools_str.h b/tools/lib/h5tools_str.h index ad43590..2c27691 100644 --- a/tools/lib/h5tools_str.h +++ b/tools/lib/h5tools_str.h @@ -19,18 +19,18 @@ #define H5TOOLS_STR_H typedef struct h5tools_str_t { - char * s; /*allocate string */ + char *s; /*allocate string */ size_t len; /*length of actual value */ size_t nalloc; /*allocated size of string */ } h5tools_str_t; H5TOOLS_DLL void h5tools_str_close(h5tools_str_t *str); H5TOOLS_DLL size_t h5tools_str_len(h5tools_str_t *str); -H5TOOLS_DLL char * h5tools_str_append(h5tools_str_t *str, const char *fmt, ...); -H5TOOLS_DLL char * h5tools_str_reset(h5tools_str_t *str); -H5TOOLS_DLL char * h5tools_str_trunc(h5tools_str_t *str, size_t size); -H5TOOLS_DLL char * h5tools_str_fmt(h5tools_str_t *str, size_t start, const char *fmt); -H5TOOLS_DLL char * h5tools_str_prefix(h5tools_str_t *str, const h5tool_format_t *info, hsize_t elmtno, +H5TOOLS_DLL char *h5tools_str_append(h5tools_str_t *str, const char *fmt, ...); +H5TOOLS_DLL char *h5tools_str_reset(h5tools_str_t *str); +H5TOOLS_DLL char *h5tools_str_trunc(h5tools_str_t *str, size_t size); +H5TOOLS_DLL char *h5tools_str_fmt(h5tools_str_t *str, size_t start, const char *fmt); +H5TOOLS_DLL char *h5tools_str_prefix(h5tools_str_t *str, const h5tool_format_t *info, hsize_t elmtno, h5tools_context_t *ctx); /* * new functions needed to display region reference data diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c index 0f2279c..3a6c7f0 100644 --- a/tools/lib/h5tools_utils.c +++ b/tools/lib/h5tools_utils.c @@ -30,7 +30,7 @@ unsigned h5tools_nCols = 80; /* ``get_option'' variables */ int opt_err = 1; /*get_option prints errors if this is on */ int opt_ind = 1; /*token pointer */ -const char * opt_arg; /*flag argument (or value) */ +const char *opt_arg; /*flag argument (or value) */ static int h5tools_d_status = 0; static const char *h5tools_progname = "h5tools"; @@ -49,7 +49,7 @@ hsize_t H5TOOLS_BUFSIZE = (32 * 1024 * 1024); /* 32 MB */ unsigned char g_Parallel = 0; /*0 for serial, 1 for parallel */ char outBuff[OUTBUFF_SIZE]; unsigned outBuffOffset; -FILE * overflow_file = NULL; +FILE *overflow_file = NULL; /* local functions */ static void init_table(table_t **tbl); @@ -196,7 +196,7 @@ get_option(int argc, char **argv, const char *opts, const struct long_options *l /* long command line option */ int i; const char ch = '='; - char * arg = HDstrdup(&argv[opt_ind][2]); + char *arg = HDstrdup(&argv[opt_ind][2]); size_t arg_len = 0; opt_arg = strchr(&argv[opt_ind][2], ch); @@ -389,12 +389,12 @@ get_option(int argc, char **argv, const char *opts, const struct long_options *l herr_t parse_tuple(const char *start, int sep, char **cpy_out, unsigned *nelems, char ***ptrs_out) { - char * elem_ptr = NULL; - char * dest_ptr = NULL; + char *elem_ptr = NULL; + char *dest_ptr = NULL; unsigned elems_count = 0; - char ** elems = NULL; /* more like *elems[], but complier... */ - char ** elems_re = NULL; /* temporary pointer, for realloc */ - char * cpy = NULL; + char **elems = NULL; /* more like *elems[], but complier... */ + char **elems_re = NULL; /* temporary pointer, for realloc */ + char *cpy = NULL; herr_t ret_value = SUCCEED; unsigned init_slots = 2; @@ -1064,8 +1064,8 @@ h5tools_parse_ros3_fapl_tuple(const char *tuple_str, int delim, H5FD_ros3_fapl_t { const char *ccred[3]; unsigned nelems = 0; - char * s3cred_src = NULL; - char ** s3cred = NULL; + char *s3cred_src = NULL; + char **s3cred = NULL; herr_t ret_value = SUCCEED; /* Attempt to parse S3 credentials tuple */ @@ -1217,8 +1217,8 @@ h5tools_parse_hdfs_fapl_tuple(const char *tuple_str, int delim, H5FD_hdfs_fapl_t { unsigned long k = 0; unsigned nelems = 0; - char * props_src = NULL; - char ** props = NULL; + char *props_src = NULL; + char **props = NULL; herr_t ret_value = SUCCEED; /* Attempt to parse HDFS configuration tuple */ diff --git a/tools/lib/h5tools_utils.h b/tools/lib/h5tools_utils.h index 6ed5aa4..e9560d6 100644 --- a/tools/lib/h5tools_utils.h +++ b/tools/lib/h5tools_utils.h @@ -34,7 +34,7 @@ H5TOOLS_DLLVAR int g_nTasks; H5TOOLS_DLLVAR unsigned char g_Parallel; H5TOOLS_DLLVAR char outBuff[]; H5TOOLS_DLLVAR unsigned outBuffOffset; -H5TOOLS_DLLVAR FILE *overflow_file; +H5TOOLS_DLLVAR FILE *overflow_file; /* Maximum size used in a call to malloc for a dataset */ H5TOOLS_DLLVAR hsize_t H5TOOLS_MALLOCSIZE; @@ -96,7 +96,7 @@ H5TOOLS_DLL int get_option(int argc, char **argv, const char *opt, const struct /*struct taken from the dumper. needed in table struct*/ typedef struct obj_t { haddr_t objno; - char * objname; + char *objname; hbool_t displayed; /* Flag to indicate that the object has been displayed */ hbool_t recorded; /* Flag for named datatypes to indicate they were found in the group hierarchy */ } obj_t; @@ -160,7 +160,7 @@ typedef struct { /* obtain link info from H5tools_get_symlink_info() */ typedef struct { H5O_type_t trg_type; /* OUT: target type */ - char * trg_path; /* OUT: target obj path. This must be freed + char *trg_path; /* OUT: target obj path. This must be freed * when used with H5tools_get_symlink_info() */ haddr_t objno; /* OUT: target object address */ unsigned long fileno; /* OUT: File number that target object is located in */ diff --git a/tools/lib/h5trav.c b/tools/lib/h5trav.c index 57d71ac..23def21 100644 --- a/tools/lib/h5trav.c +++ b/tools/lib/h5trav.c @@ -21,7 +21,7 @@ */ typedef struct trav_addr_path_t { haddr_t addr; - char * path; + char *path; } trav_addr_path_t; typedef struct trav_addr_t { @@ -33,14 +33,14 @@ typedef struct trav_addr_t { typedef struct { h5trav_obj_func_t visit_obj; /* Callback for visiting objects */ h5trav_lnk_func_t visit_lnk; /* Callback for visiting links */ - void * udata; /* User data to pass to callbacks */ + void *udata; /* User data to pass to callbacks */ } trav_visitor_t; typedef struct { - trav_addr_t * seen; /* List of addresses seen already */ + trav_addr_t *seen; /* List of addresses seen already */ const trav_visitor_t *visitor; /* Information for visiting each link/object */ hbool_t is_absolute; /* Whether the traversal has absolute paths */ - const char * base_grp_name; /* Name of the group that serves as the base + const char *base_grp_name; /* Name of the group that serves as the base * for iteration */ } trav_ud_traverse_t; @@ -168,9 +168,9 @@ static herr_t traverse_cb(hid_t loc_id, const char *path, const H5L_info_t *linfo, void *_udata) { trav_ud_traverse_t *udata = (trav_ud_traverse_t *)_udata; /* User data */ - char * new_name = NULL; - const char * full_name; - const char * already_visited = NULL; /* Whether the link/object was already visited */ + char *new_name = NULL; + const char *full_name; + const char *already_visited = NULL; /* Whether the link/object was already visited */ /* Create the full path name for the link */ if (udata->is_absolute) { @@ -694,7 +694,7 @@ trav_table_addlink(trav_table_t *table, haddr_t objno, const char *path) if (table->objs[i].nlinks == (unsigned)table->objs[i].sizelinks) { table->objs[i].sizelinks = MAX(1, table->objs[i].sizelinks * 2); table->objs[i].links = (trav_link_t *)HDrealloc( - table->objs[i].links, table->objs[i].sizelinks * sizeof(trav_link_t)); + table->objs[i].links, table->objs[i].sizelinks * sizeof(trav_link_t)); } /* end if */ /* insert it */ @@ -800,7 +800,7 @@ trav_attr(hid_t const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *ainfo, void *_op_data) { trav_path_op_data_t *op_data = (trav_path_op_data_t *)_op_data; - const char * buf = op_data->path; + const char *buf = op_data->path; if ((strlen(buf) == 1) && (*buf == '/')) HDprintf(" %-10s %s%s", "attribute", buf, attr_name); @@ -949,7 +949,7 @@ trav_print_visit_lnk(const char *path, const H5L_info_t *linfo, void *udata) case H5L_TYPE_EXTERNAL: if (linfo->u.val_size > 0) { - char * targbuf = NULL; + char *targbuf = NULL; const char *filename = NULL; const char *objname = NULL; diff --git a/tools/lib/h5trav.h b/tools/lib/h5trav.h index 2525e2b..92cf0f9 100644 --- a/tools/lib/h5trav.h +++ b/tools/lib/h5trav.h @@ -50,8 +50,8 @@ typedef enum { */ typedef struct symlink_trav_path_t { H5L_type_t type; - char * file; - char * path; + char *file; + char *path; } symlink_trav_path_t; typedef struct symlink_trav_t { @@ -62,7 +62,7 @@ typedef struct symlink_trav_t { } symlink_trav_t; typedef struct trav_path_t { - char * path; + char *path; h5trav_type_t type; haddr_t objno; /* object address */ unsigned long fileno; /* File number that object is located in */ @@ -71,11 +71,11 @@ typedef struct trav_path_t { typedef struct trav_info_t { size_t nalloc; size_t nused; - const char * fname; + const char *fname; hid_t fid; /* File ID */ - trav_path_t * paths; + trav_path_t *paths; symlink_trav_t symlink_visited; /* already visited symbolic links */ - void * opts; /* optional data passing */ + void *opts; /* optional data passing */ } trav_info_t; /*------------------------------------------------------------------------- @@ -95,9 +95,9 @@ typedef struct trav_obj_t { haddr_t objno; /* object address */ unsigned flags[2]; /* h5diff.object is present or not in both files*/ hbool_t is_same_trgobj; /* same target object? no need to compare */ - char * name; /* name */ + char *name; /* name */ h5trav_type_t type; /* type of object */ - trav_link_t * links; /* array of possible link names */ + trav_link_t *links; /* array of possible link names */ size_t sizelinks; /* size of links array */ size_t nlinks; /* number of links */ } trav_obj_t; diff --git a/tools/libtest/h5tools_test_utils.c b/tools/libtest/h5tools_test_utils.c index 069d62f..e2abfaa 100644 --- a/tools/libtest/h5tools_test_utils.c +++ b/tools/libtest/h5tools_test_utils.c @@ -513,8 +513,8 @@ test_parse_tuple(void) unsigned i = 0; unsigned count = 0; unsigned elem_i = 0; - char ** parsed = NULL; - char * cpy = NULL; + char **parsed = NULL; + char *cpy = NULL; herr_t success = TRUE; hbool_t show_progress = FALSE; @@ -665,7 +665,7 @@ test_populate_ros3_fa(void) */ { H5FD_ros3_fapl_t fa = {bad_version, TRUE, "u", "v", "w"}; - const char * values[] = {"", "", ""}; + const char *values[] = {"", "", ""}; if (show_progress) { HDprintf("all empty values\n"); @@ -684,7 +684,7 @@ test_populate_ros3_fa(void) */ { H5FD_ros3_fapl_t fa = {bad_version, FALSE, "a", "b", "c"}; - const char * values[] = {"x", "y", "z", "a"}; + const char *values[] = {"x", "y", "z", "a"}; if (show_progress) { HDprintf("successful full set\n"); @@ -703,7 +703,7 @@ test_populate_ros3_fa(void) */ { H5FD_ros3_fapl_t fa = {bad_version, FALSE, "a", "b", "c"}; - const char * values[] = {NULL, "y", "z", NULL}; + const char *values[] = {NULL, "y", "z", NULL}; if (show_progress) { HDprintf("NULL region\n"); @@ -722,7 +722,7 @@ test_populate_ros3_fa(void) */ { H5FD_ros3_fapl_t fa = {bad_version, FALSE, "a", "b", "c"}; - const char * values[] = {"", "y", "z", NULL}; + const char *values[] = {"", "y", "z", NULL}; if (show_progress) { HDprintf("empty region; non-empty id, key\n"); @@ -741,8 +741,8 @@ test_populate_ros3_fa(void) */ { H5FD_ros3_fapl_t fa = {bad_version, FALSE, "a", "b", "c"}; - const char * values[] = {"somewhere over the rainbow not too high " - "there is another rainbow bounding some darkened sky", + const char *values[] = {"somewhere over the rainbow not too high " + "there is another rainbow bounding some darkened sky", "y", "z"}; if (show_progress) { @@ -764,7 +764,7 @@ test_populate_ros3_fa(void) */ { H5FD_ros3_fapl_t fa = {bad_version, FALSE, "a", "b", "c"}; - const char * values[] = {"x", NULL, "z", NULL}; + const char *values[] = {"x", NULL, "z", NULL}; if (show_progress) { HDprintf("NULL id\n"); @@ -783,7 +783,7 @@ test_populate_ros3_fa(void) */ { H5FD_ros3_fapl_t fa = {bad_version, FALSE, "a", "b", "c"}; - const char * values[] = {"x", "", "z", NULL}; + const char *values[] = {"x", "", "z", NULL}; if (show_progress) { HDprintf("empty id; non-empty region and key\n"); @@ -802,17 +802,17 @@ test_populate_ros3_fa(void) */ { H5FD_ros3_fapl_t fa = {bad_version, FALSE, "a", "b", "c"}; - const char * values[] = {"x", + const char *values[] = {"x", "Why is it necessary to solve the problem? " - "What benefits will you receive by solving the problem? " - "What is the unknown? " - "What is it you don't yet understand? " - "What is the information you have? " - "What isn't the problem? " - "Is the information insufficient, redundant, or contradictory? " - "Should you draw a diagram or figure of the problem? " - "What are the boundaries of the problem? " - "Can you separate the various parts of the problem?", + "What benefits will you receive by solving the problem? " + "What is the unknown? " + "What is it you don't yet understand? " + "What is the information you have? " + "What isn't the problem? " + "Is the information insufficient, redundant, or contradictory? " + "Should you draw a diagram or figure of the problem? " + "What are the boundaries of the problem? " + "Can you separate the various parts of the problem?", "z"}; if (show_progress) { @@ -834,7 +834,7 @@ test_populate_ros3_fa(void) */ { H5FD_ros3_fapl_t fa = {bad_version, FALSE, "a", "b", "c"}; - const char * values[] = {"x", "y", NULL, NULL}; + const char *values[] = {"x", "y", NULL, NULL}; if (show_progress) { HDprintf("NULL key\n"); @@ -853,7 +853,7 @@ test_populate_ros3_fa(void) */ { H5FD_ros3_fapl_t fa = {bad_version, FALSE, "a", "b", "c"}; - const char * values[] = {"x", "y", "", NULL}; + const char *values[] = {"x", "y", "", NULL}; if (show_progress) { HDprintf("empty key; non-empty region and id\n"); @@ -872,7 +872,7 @@ test_populate_ros3_fa(void) */ { H5FD_ros3_fapl_t fa = {bad_version, FALSE, "a", "b", "c"}; - const char * values[] = {"", "y", "", NULL}; + const char *values[] = {"", "y", "", NULL}; if (show_progress) { HDprintf("empty key and region; non-empty id\n"); @@ -891,7 +891,7 @@ test_populate_ros3_fa(void) */ { H5FD_ros3_fapl_t fa = {bad_version, FALSE, "a", "b", "c"}; - const char * values[] = {"x", "", "", NULL}; + const char *values[] = {"x", "", "", NULL}; if (show_progress) { HDprintf("empty key and id; non-empty region\n"); @@ -910,17 +910,17 @@ test_populate_ros3_fa(void) */ { H5FD_ros3_fapl_t fa = {bad_version, FALSE, "a", "b", "c"}; - const char * values[] = {"x", "y", + const char *values[] = {"x", "y", "Why is it necessary to solve the problem? " - "What benefits will you receive by solving the problem? " - "What is the unknown? " - "What is it you don't yet understand? " - "What is the information you have? " - "What isn't the problem? " - "Is the information insufficient, redundant, or contradictory? " - "Should you draw a diagram or figure of the problem? " - "What are the boundaries of the problem? " - "Can you separate the various parts of the problem?"}; + "What benefits will you receive by solving the problem? " + "What is the unknown? " + "What is it you don't yet understand? " + "What is the information you have? " + "What isn't the problem? " + "Is the information insufficient, redundant, or contradictory? " + "Should you draw a diagram or figure of the problem? " + "What are the boundaries of the problem? " + "Can you separate the various parts of the problem?"}; if (show_progress) { HDprintf("key overflow\n"); @@ -940,7 +940,7 @@ test_populate_ros3_fa(void) */ { H5FD_ros3_fapl_t fa = {0, 0, "", "", ""}; - const char * values[] = {"us-east-2", "AKIAIMC3D3XLYXLN5COA", + const char *values[] = {"us-east-2", "AKIAIMC3D3XLYXLN5COA", "ugs5aVVnLFCErO/8uW14iWE3K5AgXMpsMlWneO/+"}; JSVERIFY(1, h5tools_populate_ros3_fapl(&fa, values), "unable to set use case") JSVERIFY(1, fa.version, "version check") @@ -992,7 +992,7 @@ test_set_configured_fapl(void) int expected; int fapl_choice; const char vfdname[12]; - void * conf_fa; + void *conf_fa; } testcase; typedef struct other_fa_t { diff --git a/tools/misc/h5debug.c b/tools/misc/h5debug.c index 9128706..bc3e150 100644 --- a/tools/misc/h5debug.c +++ b/tools/misc/h5debug.c @@ -140,12 +140,12 @@ main(int argc, char *argv[]) hid_t fid = H5I_INVALID_HID; hid_t fapl = H5I_INVALID_HID; hid_t dxpl = H5I_INVALID_HID; - H5F_t * f; + H5F_t *f; haddr_t addr = 0, extra = 0, extra2 = 0, extra3 = 0, extra4 = 0; uint8_t sig[H5F_SIGNATURE_LEN]; size_t u; H5E_auto2_t func = NULL; - void * edata = NULL; + void *edata = NULL; herr_t status = SUCCEED; int exit_value = 0; diff --git a/tools/misc/h5mkgrp.c b/tools/misc/h5mkgrp.c index 9b0d8f0..2bab6b0 100644 --- a/tools/misc/h5mkgrp.c +++ b/tools/misc/h5mkgrp.c @@ -22,19 +22,19 @@ int d_status = EXIT_SUCCESS; /* command-line options: short and long-named parameters */ -static const char * s_opts = "hlpvV"; +static const char *s_opts = "hlpvV"; static struct long_options l_opts[] = {{"help", no_arg, 'h'}, {"latest", no_arg, 'l'}, {"parents", no_arg, 'p'}, {"verbose", no_arg, 'v'}, {"version", no_arg, 'V'}, {NULL, 0, '\0'}}; /* Command line parameter settings */ typedef struct mkgrp_opt_t { - char * fname; /* File name to operate on */ + char *fname; /* File name to operate on */ hbool_t latest; /* Whether file should use latest format versions */ hbool_t verbose; /* Whether output should be verbose */ hbool_t parents; /* Whether to create intermediate groups */ size_t ngroups; /* Number of groups to create */ - char ** groups; /* Pointer to array of group names */ + char **groups; /* Pointer to array of group names */ hid_t fapl_id; /* fapl to use when opening the file */ } mkgrp_opt_t; diff --git a/tools/misc/h5repart.c b/tools/misc/h5repart.c index 7f00d30..cd8be0e 100644 --- a/tools/misc/h5repart.c +++ b/tools/misc/h5repart.c @@ -165,7 +165,7 @@ main(int argc, char *argv[]) { const char *prog_name; /*program name */ size_t blk_size = 1024; /*size of each I/O block */ - char * buf = NULL; /*I/O block buffer */ + char *buf = NULL; /*I/O block buffer */ size_t n, i; /*counters */ ssize_t nio; /*I/O return value */ int argno = 1; /*program argument number */ @@ -177,13 +177,13 @@ main(int argc, char *argv[]) int verbose = FALSE; /*display file names? */ const char *src_gen_name; /*general source name */ - char * src_name = NULL; /*source member name */ + char *src_name = NULL; /*source member name */ int src_is_family; /*is source name a family name? */ int src_membno = 0; /*source member number */ const char *dst_gen_name; /*general destination name */ - char * dst_name = NULL; /*destination member name */ + char *dst_name = NULL; /*destination member name */ int dst_is_family; /*is dst name a family name? */ int dst_membno = 0; /*destination member number */ diff --git a/tools/perform/chunk.c b/tools/perform/chunk.c index 1b6793a..8be50c7 100644 --- a/tools/perform/chunk.c +++ b/tools/perform/chunk.c @@ -331,7 +331,7 @@ main(void) { size_t io_size; double effic, io_percent; - FILE * f, *d; + FILE *f, *d; size_t cache_size; double w0; diff --git a/tools/perform/overhead.c b/tools/perform/overhead.c index 2687ce9..41eef0c 100644 --- a/tools/perform/overhead.c +++ b/tools/perform/overhead.c @@ -181,7 +181,7 @@ test(fill_t fill_style, const double splits[], hbool_t verbose, hbool_t use_rdcc hsize_t hs_start[1]; /*hyperslab start offset*/ hsize_t hs_count[1] = {1}; /*hyperslab nelmts */ int fd = (-1); /*h5 file direct */ - int * had = NULL; /*for random filling */ + int *had = NULL; /*for random filling */ const char *sname = NULL; /*fill style nam */ int mdc_nelmts; /*num meta objs to cache*/ hsize_t i, k; diff --git a/tools/perform/perf.c b/tools/perform/perf.c index 30bda7b..aecc861 100644 --- a/tools/perform/perf.c +++ b/tools/perform/perf.c @@ -88,7 +88,7 @@ hid_t dataset; /* Dataset ID */ hsize_t opt_alignment = 1; hsize_t opt_threshold = 1; int opt_split_vfd = 0; -char * meta_ext, *raw_ext; /* holds the meta and raw file extension if */ +char *meta_ext, *raw_ext; /* holds the meta and raw file extension if */ /* opt_split_vfd is set */ /* DEFAULT VALUES FOR OPTIONS */ @@ -114,7 +114,7 @@ extern char *optarg; int main(int argc, char **argv) { - char * buf, *tmp, *buf2 = NULL, *tmp2 = NULL, *check; + char *buf, *tmp, *buf2 = NULL, *tmp2 = NULL, *check; int i, j, mynod = 0, nprocs = 1, my_correct = 1, correct, myerrno; double stim, etim; double write_tim = 0; diff --git a/tools/perform/pio_engine.c b/tools/perform/pio_engine.c index 65194b0..f090a53 100644 --- a/tools/perform/pio_engine.c +++ b/tools/perform/pio_engine.c @@ -120,7 +120,7 @@ typedef union _file_descr { } file_descr; /* local functions */ -static char * pio_create_filename(iotype iot, const char *base_name, char *fullname, size_t size); +static char *pio_create_filename(iotype iot, const char *base_name, char *fullname, size_t size); static herr_t do_write(results *res, file_descr *fd, parameters *parms, long ndsets, off_t nelmts, size_t buf_size, void *buffer); static herr_t do_read(results *res, file_descr *fd, parameters *parms, long ndsets, off_t nelmts, @@ -155,7 +155,7 @@ do_pio(parameters param) off_t snbytes; /*general dataset size */ /*for 1D, it is the actual dataset size */ /*for 2D, it is the size of a side of the dataset square */ - char * buffer = NULL; /*data buffer pointer */ + char *buffer = NULL; /*data buffer pointer */ size_t buf_size; /*general buffer size in bytes */ /*for 1D, it is the actual buffer size */ /*for 2D, it is the length of the buffer rectangle */ @@ -387,7 +387,7 @@ static char * pio_create_filename(iotype iot, const char *base_name, char *fullname, size_t size) { const char *prefix, *suffix = ""; - char * ptr, last = '\0'; + char *ptr, last = '\0'; size_t i, j; if (!base_name || !fullname || size < 1) @@ -1223,15 +1223,14 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets, off_t nby /* Interleaved access pattern */ else { /* Compute offset in file */ - mpi_offset = - mpi_file_offset + - (MPI_Offset)( - ((((size_t)nbytes_xfer / buf_size) * (size_t)pio_mpi_nprocs_g) / - (size_t)snbytes) * - (buf_size * (size_t)snbytes)) + - (MPI_Offset)( - (((size_t)nbytes_xfer / buf_size) * (size_t)pio_mpi_nprocs_g) % - (size_t)snbytes); + mpi_offset = mpi_file_offset + + (MPI_Offset)(((((size_t)nbytes_xfer / buf_size) * + (size_t)pio_mpi_nprocs_g) / + (size_t)snbytes) * + (buf_size * (size_t)snbytes)) + + (MPI_Offset)((((size_t)nbytes_xfer / buf_size) * + (size_t)pio_mpi_nprocs_g) % + (size_t)snbytes); /* Number of bytes to be transferred per I/O operation */ nbytes_xfer_advance = blk_size; @@ -2194,15 +2193,14 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets, off_t nbyt /* Interleaved access pattern */ else { /* Compute offset in file */ - mpi_offset = - mpi_file_offset + - (MPI_Offset)( - ((((size_t)nbytes_xfer / buf_size) * (size_t)pio_mpi_nprocs_g) / - (size_t)snbytes) * - (buf_size * (size_t)snbytes)) + - (MPI_Offset)( - (((size_t)nbytes_xfer / buf_size) * (size_t)pio_mpi_nprocs_g) % - (size_t)snbytes); + mpi_offset = mpi_file_offset + + (MPI_Offset)(((((size_t)nbytes_xfer / buf_size) * + (size_t)pio_mpi_nprocs_g) / + (size_t)snbytes) * + (buf_size * (size_t)snbytes)) + + (MPI_Offset)((((size_t)nbytes_xfer / buf_size) * + (size_t)pio_mpi_nprocs_g) % + (size_t)snbytes); /* Number of bytes to be transferred per I/O operation */ nbytes_xfer_advance = blk_size; diff --git a/tools/perform/pio_perf.c b/tools/perform/pio_perf.c index 333e209..e85d440 100644 --- a/tools/perform/pio_perf.c +++ b/tools/perform/pio_perf.c @@ -96,7 +96,7 @@ #endif /* FALSE */ /* global variables */ -FILE * output; /* output file */ +FILE *output; /* output file */ int comm_world_rank_g; /* my rank in MPI_COMM_RANK */ int comm_world_nprocs_g; /* num. of processes of MPI_COMM_WORLD */ MPI_Comm pio_comm_g; /* Communicator to run the PIO */ @@ -525,18 +525,18 @@ run_test(iotype iot, parameters parms, struct options *opts) register int i, ret_value = SUCCESS; int comm_size; off_t raw_size; - minmax * write_mpi_mm_table = NULL; - minmax * write_mm_table = NULL; - minmax * write_gross_mm_table = NULL; - minmax * write_raw_mm_table = NULL; - minmax * read_mpi_mm_table = NULL; - minmax * read_mm_table = NULL; - minmax * read_gross_mm_table = NULL; - minmax * read_raw_mm_table = NULL; - minmax * read_open_mm_table = NULL; - minmax * read_close_mm_table = NULL; - minmax * write_open_mm_table = NULL; - minmax * write_close_mm_table = NULL; + minmax *write_mpi_mm_table = NULL; + minmax *write_mm_table = NULL; + minmax *write_gross_mm_table = NULL; + minmax *write_raw_mm_table = NULL; + minmax *read_mpi_mm_table = NULL; + minmax *read_mm_table = NULL; + minmax *read_gross_mm_table = NULL; + minmax *read_raw_mm_table = NULL; + minmax *read_open_mm_table = NULL; + minmax *read_close_mm_table = NULL; + minmax *write_open_mm_table = NULL; + minmax *write_close_mm_table = NULL; minmax write_mpi_mm = {0.0, 0.0, 0.0, 0}; minmax write_mm = {0.0, 0.0, 0.0, 0}; minmax write_gross_mm = {0.0, 0.0, 0.0, 0}; diff --git a/tools/perform/pio_perf.h b/tools/perform/pio_perf.h index 24621da..88ea11c 100644 --- a/tools/perform/pio_perf.h +++ b/tools/perform/pio_perf.h @@ -67,7 +67,7 @@ typedef struct results_ { #define FAIL -1 #endif /* !FAIL */ -extern FILE * output; /* output file */ +extern FILE *output; /* output file */ extern io_time_t *timer_g; /* timer: global for stub functions */ extern int comm_world_rank_g; /* my rank in MPI_COMM_RANK */ extern int comm_world_nprocs_g; /* num. of processes of MPI_COMM_WORLD */ diff --git a/tools/perform/pio_standalone.c b/tools/perform/pio_standalone.c index c046d65..a80346a 100644 --- a/tools/perform/pio_standalone.c +++ b/tools/perform/pio_standalone.c @@ -197,7 +197,7 @@ h5_set_info_object(void) do { size_t len; - char * key_val, *endp, *namep; + char *key_val, *endp, *namep; if (*valp == ';') valp++; diff --git a/tools/perform/pio_standalone.h b/tools/perform/pio_standalone.h index f08cbd0..2985221 100644 --- a/tools/perform/pio_standalone.h +++ b/tools/perform/pio_standalone.h @@ -446,7 +446,7 @@ H5_DLL int64_t HDstrtoll(const char *s, const char **rest, int base); #else /* H5_HAVE_WIN32_API */ #if !defined strdup && !defined H5_HAVE_STRDUP -extern char * strdup(const char *s); +extern char *strdup(const char *s); #endif #define HDstrdup(S) strdup(S) diff --git a/tools/perform/sio_engine.c b/tools/perform/sio_engine.c index d42a450..c36e4a4 100644 --- a/tools/perform/sio_engine.c +++ b/tools/perform/sio_engine.c @@ -86,7 +86,7 @@ typedef union _file_descr { } file_descr; /* local functions */ -static char * sio_create_filename(iotype iot, const char *base_name, char *fullname, size_t size, +static char *sio_create_filename(iotype iot, const char *base_name, char *fullname, size_t size, parameters *param); static herr_t do_write(results *res, file_descr *fd, parameters *parms, void *buffer); static herr_t do_read(results *res, file_descr *fd, parameters *parms, void *buffer); @@ -109,7 +109,7 @@ static int cont_dim; /* lowest dimension for contigu static size_t cont_size; /* size of contiguous POSIX access */ static hid_t fapl; /* file access list */ static unsigned char *buf_p; /* buffer pointer */ -static const char * multi_letters = "msbrglo"; /* string for multi driver */ +static const char *multi_letters = "msbrglo"; /* string for multi driver */ /* HDF5 global variables */ static hsize_t h5count[MAX_DIMS]; /*selection count */ @@ -130,7 +130,7 @@ static hid_t h5dxpl = H5I_INVALID_HID; /* Dataset transfer property void do_sio(parameters param, results *res) { - char * buffer = NULL; /*data buffer pointer */ + char *buffer = NULL; /*data buffer pointer */ size_t buf_size[MAX_DIMS]; /* general buffer size in bytes */ file_descr fd; /* file handles */ iotype iot; /* API type */ @@ -289,7 +289,7 @@ static char * sio_create_filename(iotype iot, const char *base_name, char *fullname, size_t size, parameters *param) { const char *prefix, *suffix = ""; - char * ptr, last = '\0'; + char *ptr, last = '\0'; size_t i, j; vfdtype vfd; vfd = param->vfd; @@ -768,7 +768,7 @@ done: static herr_t do_read(results *res, file_descr *fd, parameters *parms, void *buffer) { - char * buffer2 = NULL; /* Buffer for data verification */ + char *buffer2 = NULL; /* Buffer for data verification */ int ret_code = SUCCESS; char dname[64]; int i; diff --git a/tools/perform/sio_perf.c b/tools/perform/sio_perf.c index d7f13c6..90793f1 100644 --- a/tools/perform/sio_perf.c +++ b/tools/perform/sio_perf.c @@ -98,7 +98,7 @@ static const char *progname = "h5perf_serial"; * It seems that only the options that accept additional information * such as dataset size (-e) require the colon next to it. */ -static const char * s_opts = "a:A:B:c:Cd:D:e:F:ghi:Imno:p:P:r:stT:v:wx:X:"; +static const char *s_opts = "a:A:B:c:Cd:D:e:F:ghi:Imno:p:P:r:stT:v:wx:X:"; static struct long_options l_opts[] = {{"align", require_arg, 'a'}, {"alig", require_arg, 'a'}, {"ali", require_arg, 'a'}, @@ -439,14 +439,14 @@ run_test(iotype iot, parameters parms, struct options *opts) results res; register int i, ret_value = SUCCESS; off_t raw_size; - minmax * write_sys_mm_table = NULL; - minmax * write_mm_table = NULL; - minmax * write_gross_mm_table = NULL; - minmax * write_raw_mm_table = NULL; - minmax * read_sys_mm_table = NULL; - minmax * read_mm_table = NULL; - minmax * read_gross_mm_table = NULL; - minmax * read_raw_mm_table = NULL; + minmax *write_sys_mm_table = NULL; + minmax *write_mm_table = NULL; + minmax *write_gross_mm_table = NULL; + minmax *write_raw_mm_table = NULL; + minmax *read_sys_mm_table = NULL; + minmax *read_mm_table = NULL; + minmax *read_gross_mm_table = NULL; + minmax *read_raw_mm_table = NULL; minmax write_sys_mm = {0.0F, 0.0F, 0.0F, 0}; minmax write_mm = {0.0F, 0.0F, 0.0F, 0}; minmax write_gross_mm = {0.0F, 0.0F, 0.0F, 0}; @@ -1325,7 +1325,7 @@ static hsize_t parse_size_directive(const char *size) { hsize_t s; - char * endptr; + char *endptr; s = HDstrtoull(size, &endptr, 10); diff --git a/tools/perform/sio_perf.h b/tools/perform/sio_perf.h index 6242782..610ebc0 100644 --- a/tools/perform/sio_perf.h +++ b/tools/perform/sio_perf.h @@ -82,7 +82,7 @@ typedef struct results_ { #define FAIL -1 #endif /* !FAIL */ -extern FILE * output; /* output file */ +extern FILE *output; /* output file */ extern io_time_t *timer_g; /* timer: global for stub functions */ extern int sio_debug_level; /* The debug level: * 0 - Off diff --git a/tools/perform/sio_standalone.h b/tools/perform/sio_standalone.h index 48d9ed4..289efb1 100644 --- a/tools/perform/sio_standalone.h +++ b/tools/perform/sio_standalone.h @@ -461,7 +461,7 @@ H5_DLL int64_t HDstrtoll(const char *s, const char **rest, int base); #else /* H5_HAVE_WIN32_API */ #if !defined strdup && !defined H5_HAVE_STRDUP -extern char * strdup(const char *s); +extern char *strdup(const char *s); #endif #define HDstrdup(S) strdup(S) diff --git a/tools/perform/zip_perf.c b/tools/perform/zip_perf.c index 53a9678..a7b35f1 100644 --- a/tools/perform/zip_perf.c +++ b/tools/perform/zip_perf.c @@ -52,7 +52,7 @@ /* internal variables */ static const char *prog = NULL; static const char *option_prefix = NULL; -static char * filename = NULL; +static char *filename = NULL; static int compress_percent = 0; static int compress_level = Z_DEFAULT_COMPRESSION; static int output, random_test = FALSE; @@ -64,7 +64,7 @@ static void error(const char *fmt, ...); static void compress_buffer(Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen); /* commandline options : long and short form */ -static const char * s_opts = "hB:b:c:p:rs:0123456789"; +static const char *s_opts = "hB:b:c:p:rs:0123456789"; static struct long_options l_opts[] = {{"help", no_arg, 'h'}, {"compressability", require_arg, 'c'}, {"compressabilit", require_arg, 'c'}, @@ -162,7 +162,7 @@ cleanup(void) static void write_file(Bytef *source, uLongf sourceLen) { - Bytef * d_ptr, *dest; + Bytef *d_ptr, *dest; uLongf d_len, destLen; struct timeval timer_start, timer_stop; @@ -354,7 +354,7 @@ static unsigned long parse_size_directive(const char *size) { unsigned long s; - char * endptr; + char *endptr; s = HDstrtoul(size, &endptr, 10); @@ -434,7 +434,7 @@ do_write_test(unsigned long file_size, unsigned long min_buf_size, unsigned long uLongf src_len, total_len; struct timeval timer_start, timer_stop; double total_time; - Bytef * src; + Bytef *src; for (src_len = min_buf_size; src_len <= max_buf_size; src_len <<= 1) { register unsigned long i, iters; |