diff options
author | Allen Byrne <50328838+byrnHDF@users.noreply.github.com> | 2022-07-26 21:45:46 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-26 21:45:46 (GMT) |
commit | ae414872f50187e64cbd6cc8f076c22cf5df2d53 (patch) | |
tree | b616f33f5daa89f213e7c64e04c63afde906e939 /tools/src | |
parent | 213eac2588369f75a11df6bb1788dde33c4b82e2 (diff) | |
download | hdf5-ae414872f50187e64cbd6cc8f076c22cf5df2d53.zip hdf5-ae414872f50187e64cbd6cc8f076c22cf5df2d53.tar.gz hdf5-ae414872f50187e64cbd6cc8f076c22cf5df2d53.tar.bz2 |
Develop clang 13 format (#1933)
* Update format source to clang 13
* More format changes
Diffstat (limited to 'tools/src')
30 files changed, 225 insertions, 227 deletions
diff --git a/tools/src/h5copy/h5copy.c b/tools/src/h5copy/h5copy.c index eacd05b..2da54e2 100644 --- a/tools/src/h5copy/h5copy.c +++ b/tools/src/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 h5_long_options l_opts[] = {{"destination", require_arg, 'd'}, {"flag", require_arg, 'f'}, {"help", no_arg, 'h'}, @@ -31,11 +31,11 @@ static struct h5_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/src/h5diff/h5diff_common.c b/tools/src/h5diff/h5diff_common.c index 2619a9d..433f0c7 100644 --- a/tools/src/h5diff/h5diff_common.c +++ b/tools/src/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 h5_long_options l_opts[] = {{"help", no_arg, 'h'}, {"version", no_arg, 'V'}, {"report", no_arg, 'r'}, @@ -100,8 +100,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; @@ -160,7 +160,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/src/h5dump/h5dump.c b/tools/src/h5dump/h5dump.c index 22b869c..be68a47 100644 --- a/tools/src/h5dump/h5dump.c +++ b/tools/src/h5dump/h5dump.c @@ -18,7 +18,7 @@ /* Name of tool */ #define PROGRAMNAME "h5dump" -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; @@ -70,7 +70,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; }; @@ -81,7 +81,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 h5_long_options l_opts[] = {{"attribute", require_arg, 'a'}, {"binary", optional_arg, 'b'}, {"count", require_arg, 'c'}, @@ -569,8 +569,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; @@ -623,7 +623,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'; @@ -678,7 +678,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) { @@ -1344,7 +1344,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/src/h5dump/h5dump.h b/tools/src/h5dump/h5dump.h index a53d1ba..6ad1cb6 100644 --- a/tools/src/h5dump/h5dump.h +++ b/tools/src/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/src/h5dump/h5dump_ddl.c b/tools/src/h5dump/h5dump_ddl.c index 939e5fe..7ca103e 100644 --- a/tools/src/h5dump/h5dump_ddl.c +++ b/tools/src/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_info2_t *linfo, void H5_ATT 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 */ @@ -631,7 +631,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 */ @@ -764,7 +764,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 */ @@ -918,7 +918,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; @@ -1092,7 +1092,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; @@ -1309,11 +1309,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 / */ @@ -1373,7 +1373,7 @@ obj_search(const char *path, const H5O_info2_t *oi, const char H5_ATTR_UNUSED *a 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; @@ -1412,9 +1412,9 @@ lnk_search(const char *path, const H5L_info2_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] != '/') @@ -1525,12 +1525,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 */ @@ -1669,7 +1669,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 (dump_opts.display_data) { if ((dapl_id = H5Pcreate(H5P_DATASET_ACCESS)) < 0) { @@ -2043,9 +2043,9 @@ dump_extlink(hid_t group, const char *linkname, const char *objname) { hid_t oid; H5O_info2_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/src/h5dump/h5dump_extern.h b/tools/src/h5dump/h5dump_extern.h index 308f602..1139390 100644 --- a/tools/src/h5dump/h5dump_extern.h +++ b/tools/src/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/src/h5dump/h5dump_xml.c b/tools/src/h5dump/h5dump_xml.c index 827daf3..ee94ec8 100644 --- a/tools/src/h5dump/h5dump_xml.c +++ b/tools/src/h5dump/h5dump_xml.c @@ -134,10 +134,10 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info2_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 */ @@ -585,7 +585,7 @@ int xml_name_to_XID(hid_t loc_id, const char *str, char *outstr, int outlen, int gen) { H5O_token_t obj_token; - char * obj_tok_str = NULL; + char *obj_tok_str = NULL; int lookup_ret; if (outlen < 22) @@ -659,8 +659,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) @@ -749,8 +749,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) @@ -851,7 +851,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; @@ -873,7 +873,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 */ @@ -903,7 +903,7 @@ xml_print_datatype(hid_t type, unsigned in_group) if (!in_group && H5Tcommitted(type) > 0) { H5O_info2_t oinfo; - obj_t * found_obj; /* Found object */ + obj_t *found_obj; /* Found object */ /* detect a shared datatype, output only once */ H5Oget_info3(type, &oinfo, H5O_INFO_BASIC); @@ -1571,7 +1571,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 */ @@ -1604,7 +1604,7 @@ xml_dump_datatype(hid_t type) if (H5Tcommitted(type) > 0) { H5O_info2_t oinfo; - obj_t * found_obj; /* Found object */ + obj_t *found_obj; /* Found object */ /* Datatype is a shared or named datatype */ H5Oget_info3(type, &oinfo, H5O_INFO_BASIC); @@ -1703,7 +1703,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 */ @@ -1879,7 +1879,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)); @@ -2046,7 +2046,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); @@ -2362,14 +2362,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 = NULL; - char * dtxid = NULL; - char * parentxid = NULL; - char * t_tmp = NULL; - char * t_prefix = NULL; - char * t_name = NULL; + char *tmp = NULL; + char *dtxid = NULL; + char *parentxid = NULL; + char *t_tmp = NULL; + char *t_prefix = NULL; + char *t_name = NULL; tmp = (char *)HDmalloc(HDstrlen(prefix) + HDstrlen(name) + 2); if (tmp == NULL) { @@ -2570,14 +2570,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 */ @@ -2952,11 +2952,11 @@ xml_print_refs(hid_t did, int source) hid_t space = H5I_INVALID_HID; hssize_t ssiz = -1; hsize_t i; - H5R_ref_t * refbuf = NULL; - char * buf = NULL; + H5R_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 */ @@ -3105,12 +3105,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 */ @@ -3277,7 +3277,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 */ @@ -3414,11 +3414,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 */ @@ -3766,20 +3766,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 */ @@ -4377,8 +4377,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 */ @@ -4387,7 +4387,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/src/h5format_convert/h5format_convert.c b/tools/src/h5format_convert/h5format_convert.c index 50d0f5d..9854eac 100644 --- a/tools/src/h5format_convert/h5format_convert.c +++ b/tools/src/h5format_convert/h5format_convert.c @@ -38,7 +38,7 @@ static int verbose_g = 0; * Command-line options: The user can specify short or long-named * parameters. */ -static const char * s_opts = "hVvd:n"; +static const char *s_opts = "hVvd:n"; static struct h5_long_options l_opts[] = {{"help", no_arg, 'h'}, {"version", no_arg, 'V'}, {"verbose", no_arg, 'v'}, {"dname", require_arg, 'd'}, {"noop", no_arg, 'n'}, {"enable-error-stack", no_arg, 'E'}, diff --git a/tools/src/h5import/h5import.c b/tools/src/h5import/h5import.c index 9da348a..5e1a942 100644 --- a/tools/src/h5import/h5import.c +++ b/tools/src/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"; @@ -356,7 +356,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"; @@ -470,7 +470,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; @@ -642,7 +642,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; @@ -653,9 +653,9 @@ readUIntegerData(FILE *strm, struct Input *in) hsize_t len = 1; hsize_t i; int j; - const char * err1 = "Unable to get unsigned integer value from file.\n"; - const char * err2 = "Unrecognized input class type.\n"; - const char * err3 = "Invalid input size.\n"; + const char *err1 = "Unable to get unsigned integer value from file.\n"; + const char *err2 = "Unrecognized input class type.\n"; + const char *err3 = "Invalid input size.\n"; for (j = 0; j < in->rank; j++) len *= in->sizeOfDimension[j]; @@ -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; @@ -2524,7 +2524,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"; @@ -2554,7 +2554,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"; @@ -4601,7 +4601,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/src/h5import/h5import.h b/tools/src/h5import/h5import.h index efd40e1..2ebeecc 100644 --- a/tools/src/h5import/h5import.h +++ b/tools/src/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/src/h5jam/h5jam.c b/tools/src/h5jam/h5jam.c index 45978bb..275e6e9 100644 --- a/tools/src/h5jam/h5jam.c +++ b/tools/src/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"; +static const char *s_opts = "hi:u:o:c:V"; static struct h5_long_options l_opts[] = {{"help", no_arg, 'h'}, {"i", require_arg, 'i'}, {"u", require_arg, 'u'}, {"o", require_arg, 'o'}, {"clobber", no_arg, 'c'}, {NULL, 0, '\0'}}; diff --git a/tools/src/h5jam/h5unjam.c b/tools/src/h5jam/h5unjam.c index 8ff354e..75a2b41 100644 --- a/tools/src/h5jam/h5unjam.c +++ b/tools/src/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 h5_long_options l_opts[] = {{"help", no_arg, 'h'}, {"i", require_arg, 'i'}, {"u", require_arg, 'u'}, {"o", require_arg, 'o'}, {"delete", no_arg, 'd'}, {NULL, 0, '\0'}}; diff --git a/tools/src/h5ls/h5ls.c b/tools/src/h5ls/h5ls.c index b7ee380..a14bb79 100644 --- a/tools/src/h5ls/h5ls.c +++ b/tools/src/h5ls/h5ls.c @@ -109,7 +109,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 */ @@ -836,7 +836,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 */ @@ -895,7 +895,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 */ @@ -1120,7 +1120,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)) @@ -1317,8 +1317,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; - H5R_ref_t * ref_buf = NULL; + h5tool_format_t *info = &ls_dataformat; + H5R_ref_t *ref_buf = NULL; H5TOOLS_START_DEBUG(" "); @@ -1486,8 +1486,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; - H5R_ref_t * ref_buf = NULL; + h5tool_format_t *info = &ls_dataformat; + H5R_ref_t *ref_buf = NULL; H5TOOLS_START_DEBUG(" "); @@ -1663,7 +1663,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(" "); @@ -1771,7 +1771,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)); @@ -1843,7 +1843,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)); @@ -1994,7 +1994,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"), @@ -2050,7 +2050,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)); @@ -2081,11 +2081,11 @@ static herr_t list_obj(const char *name, const H5O_info2_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(" "); @@ -2152,8 +2152,8 @@ list_obj(const char *name, const H5O_info2_t *oinfo, const char *first_seen, voi * which is common to all objects. */ if (verbose_g > 0) { size_t buf_size = 0; - char * comment = NULL; - char * obj_tok_str = NULL; + char *comment = NULL; + char *obj_tok_str = NULL; ssize_t cmt_bufsize = -1; uint64_t supported = 0; @@ -2258,14 +2258,14 @@ done: static herr_t list_lnk(const char *name, const H5L_info2_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)); @@ -2451,7 +2451,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)); @@ -2642,9 +2642,9 @@ int main(int argc, char *argv[]) { hid_t file_id = H5I_INVALID_HID; - char * fname = NULL, *oname = NULL, *x = NULL; - const char * s = NULL; - char * rest; + char *fname = NULL, *oname = NULL, *x = NULL; + const char *s = NULL; + char *rest; int argno; static char root_name[] = "/"; char drivername[50]; @@ -3082,7 +3082,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/src/h5perf/pio_engine.c b/tools/src/h5perf/pio_engine.c index b546c43..26968e3 100644 --- a/tools/src/h5perf/pio_engine.c +++ b/tools/src/h5perf/pio_engine.c @@ -118,7 +118,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, @@ -153,7 +153,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 */ @@ -388,7 +388,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) @@ -1222,15 +1222,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; @@ -2191,15 +2190,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/src/h5perf/pio_perf.c b/tools/src/h5perf/pio_perf.c index 37108d7..3c54214 100644 --- a/tools/src/h5perf/pio_perf.c +++ b/tools/src/h5perf/pio_perf.c @@ -91,7 +91,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 */ @@ -111,7 +111,7 @@ static const char *progname = "h5perf"; #ifndef HDF5_PARAPREFIX #define HDF5_PARAPREFIX "" #endif -char * paraprefix = NULL; /* for command line option para-prefix */ +char *paraprefix = NULL; /* for command line option para-prefix */ MPI_Info h5_io_info_g = MPI_INFO_NULL; /* MPI INFO object for IO */ /* @@ -766,7 +766,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/src/h5perf/pio_perf.h b/tools/src/h5perf/pio_perf.h index 89541bf..05f8d5b 100644 --- a/tools/src/h5perf/pio_perf.h +++ b/tools/src/h5perf/pio_perf.h @@ -71,7 +71,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/src/h5perf/sio_engine.c b/tools/src/h5perf/sio_engine.c index eff5f61..376fc0b 100644 --- a/tools/src/h5perf/sio_engine.c +++ b/tools/src/h5perf/sio_engine.c @@ -84,7 +84,7 @@ typedef union { } 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); @@ -107,7 +107,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 */ @@ -127,7 +127,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 */ @@ -288,7 +288,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; @@ -767,7 +767,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; @@ -1274,7 +1274,7 @@ done: static void do_cleanupfile(iotype iot, char *filename) { - char * temp = NULL; + char *temp = NULL; size_t temp_sz; int j; hid_t driver; diff --git a/tools/src/h5perf/sio_perf.c b/tools/src/h5perf/sio_perf.c index c85ee42..fc300fb 100644 --- a/tools/src/h5perf/sio_perf.c +++ b/tools/src/h5perf/sio_perf.c @@ -97,7 +97,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 h5_long_options l_opts[] = {{"align", require_arg, 'a'}, {"api", require_arg, 'A'}, #if 0 @@ -1187,7 +1187,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/src/h5perf/sio_perf.h b/tools/src/h5perf/sio_perf.h index bff737f..a417bdb 100644 --- a/tools/src/h5perf/sio_perf.h +++ b/tools/src/h5perf/sio_perf.h @@ -77,7 +77,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/src/h5repack/h5repack.c b/tools/src/h5repack/h5repack.c index d0aad79..56e396b 100644 --- a/tools/src/h5repack/h5repack.c +++ b/tools/src/h5repack/h5repack.c @@ -117,7 +117,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 */ @@ -361,7 +361,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 */ @@ -697,7 +697,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 > 0) { @@ -816,7 +816,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 > 0) HDprintf(" <%s>", name); diff --git a/tools/src/h5repack/h5repack.h b/tools/src/h5repack/h5repack.h index 65e5d40..ad81cf7 100644 --- a/tools/src/h5repack/h5repack.h +++ b/tools/src/h5repack/h5repack.h @@ -125,7 +125,7 @@ typedef struct { int grp_indexed; /* Set the minimum number of links to store in the indexed format */ int msg_size[8]; /* Minimum size of shared messages: dataspace, datatype, fill value, filter pipeline, attribute */ - const char * ublock_filename; /* user block file name */ + const char *ublock_filename; /* user block file name */ hsize_t ublock_size; /* user block size */ hsize_t meta_block_size; /* metadata aggregation block size (for H5Pset_meta_block_size) */ hsize_t threshold; /* alignment threshold for H5Pset_alignment */ @@ -201,13 +201,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/src/h5repack/h5repack_copy.c b/tools/src/h5repack/h5repack_copy.c index 25df5c7..08d7127 100644 --- a/tools/src/h5repack/h5repack_copy.c +++ b/tools/src/h5repack/h5repack_copy.c @@ -65,7 +65,7 @@ copy_objects(const char *fnamein, const char *fnameout, pack_opt_t *options) hid_t grp_in = H5I_INVALID_HID; /* group ID */ hid_t gcpl_in = H5I_INVALID_HID; /* group creation property list */ hid_t fcpl = H5P_DEFAULT; /* file creation property list ID */ - trav_table_t * travt = NULL; + trav_table_t *travt = NULL; hsize_t ub_size = 0; /* size of user block */ H5F_fspace_strategy_t set_strategy; /* Strategy to be set in output file */ hbool_t set_persist; /* Persist free-space status to be set in output file */ @@ -628,7 +628,7 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti hid_t ocpl_id = H5I_INVALID_HID; /* property to pass copy options */ hid_t lcpl_id = H5I_INVALID_HID; /* link creation property list */ hid_t dxpl_id = H5I_INVALID_HID; /* dataset transfer 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 */ @@ -638,8 +638,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/src/h5repack/h5repack_filters.c b/tools/src/h5repack/h5repack_filters.c index 76bac5e..3198062 100644 --- a/tools/src/h5repack/h5repack_filters.c +++ b/tools/src/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; @@ -236,13 +236,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/src/h5repack/h5repack_refs.c b/tools/src/h5repack/h5repack_refs.c index 3259b89..e1f23f2 100644 --- a/tools/src/h5repack/h5repack_refs.c +++ b/tools/src/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; /*------------------------------------------------------------------------- @@ -227,7 +227,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; /*------------------------------------------------------------------------- @@ -453,10 +453,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; @@ -812,7 +812,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/src/h5repack/h5repack_verify.c b/tools/src/h5repack/h5repack_verify.c index 71ee72e..7a333e1 100644 --- a/tools/src/h5repack/h5repack_verify.c +++ b/tools/src/h5repack/h5repack_verify.c @@ -46,7 +46,7 @@ h5repack_verify(const char *in_fname, const char *out_fname, pack_opt_t *options hid_t tid = H5I_INVALID_HID; /* type ID */ int ok = 1; /* step results */ unsigned int i; - trav_table_t * travt = NULL; + trav_table_t *travt = NULL; hid_t fcpl_in = H5I_INVALID_HID; /* file creation property for input file */ hid_t fcpl_out = H5I_INVALID_HID; /* file creation property for output file */ H5F_fspace_strategy_t in_strategy, out_strategy; /* file space handling strategy for in/output file */ @@ -60,7 +60,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/src/h5stat/h5stat.c b/tools/src/h5stat/h5stat.c index d5b9a1a..047b573 100644 --- a/tools/src/h5stat/h5stat.c +++ b/tools/src/h5stat/h5stat.c @@ -84,7 +84,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 */ @@ -109,7 +109,7 @@ typedef struct iter_t { hsize_t free_hdr; /* Size of free space manager metadata in the file */ unsigned long num_small_sects[SIZE_SMALL_SECTS]; /* Size of small free-space sections */ unsigned sect_nbins; /* Number of bins for free-space section sizes */ - unsigned long * sect_bins; /* Pointer to array of bins for free-space section sizes */ + unsigned long *sect_bins; /* Pointer to array of bins for free-space section sizes */ hsize_t datasets_index_storage_size; /* meta size for chunked dataset's indexing type */ hsize_t datasets_heap_storage_size; /* heap size for dataset with external storage */ unsigned long nexternal; /* Number of external files for a dataset */ @@ -649,7 +649,7 @@ static herr_t obj_stats(const char *path, const H5O_info2_t *oi, const char *already_visited, void *_iter) { H5O_native_info_t native_info; - iter_t * iter = (iter_t *)_iter; + iter_t *iter = (iter_t *)_iter; herr_t ret_value = SUCCEED; /* If the object has already been seen then just return */ @@ -1685,7 +1685,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/src/misc/h5clear.c b/tools/src/misc/h5clear.c index 15c170d..c86763f 100644 --- a/tools/src/misc/h5clear.c +++ b/tools/src/misc/h5clear.c @@ -34,7 +34,7 @@ /* Default increment is 1 megabytes for the --increment option */ #define DEFAULT_INCREMENT (1024 * 1024) -static char * fname_g = NULL; +static char *fname_g = NULL; static hbool_t clear_status_flags = FALSE; static hbool_t remove_cache_image = FALSE; static hbool_t print_filesize = FALSE; @@ -44,7 +44,7 @@ static hsize_t increment = DEFAULT_INCREMENT; /* * Command-line options: only publicize long options */ -static const char * s_opts = "hVsmzi*"; +static const char *s_opts = "hVsmzi*"; static struct h5_long_options l_opts[] = { {"help", no_arg, 'h'}, {"version", no_arg, 'V'}, {"status", no_arg, 's'}, {"image", no_arg, 'm'}, {"filesize", no_arg, 'z'}, {"increment", optional_arg, 'i'}, @@ -226,7 +226,7 @@ leave(int ret) int main(int argc, char *argv[]) { - char * fname = NULL; /* File name */ + char *fname = NULL; /* File name */ hid_t fapl = H5I_INVALID_HID; /* File access property list */ hid_t fid = H5I_INVALID_HID; /* File ID */ haddr_t image_addr; diff --git a/tools/src/misc/h5debug.c b/tools/src/misc/h5debug.c index e03c72d..ccb91d2 100644 --- a/tools/src/misc/h5debug.c +++ b/tools/src/misc/h5debug.c @@ -240,14 +240,14 @@ main(int argc, char *argv[]) hid_t fid = H5I_INVALID_HID; hid_t fapl = H5I_INVALID_HID; H5VL_object_t *vol_obj; - H5F_t * f; + H5F_t *f; haddr_t addr = 0; int extra_count = 0; /* Number of extra arguments */ haddr_t extra[10]; uint8_t sig[H5F_SIGNATURE_LEN]; size_t u; H5E_auto2_t func = NULL; - void * edata = NULL; + void *edata = NULL; hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */ herr_t status = SUCCEED; int exit_value = 0; diff --git a/tools/src/misc/h5mkgrp.c b/tools/src/misc/h5mkgrp.c index 1b8b23d..a786df6 100644 --- a/tools/src/misc/h5mkgrp.c +++ b/tools/src/misc/h5mkgrp.c @@ -22,7 +22,7 @@ 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 h5_long_options l_opts[] = { {"help", no_arg, 'h'}, {"latest", no_arg, 'l'}, {"parents", no_arg, 'p'}, {"verbose", no_arg, 'v'}, {"version", no_arg, 'V'}, {"vol-value", require_arg, '1'}, @@ -31,12 +31,12 @@ static struct h5_long_options l_opts[] = { /* 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/src/misc/h5repart.c b/tools/src/misc/h5repart.c index 89be169..779b6f9 100644 --- a/tools/src/misc/h5repart.c +++ b/tools/src/misc/h5repart.c @@ -157,7 +157,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 */ @@ -169,13 +169,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 */ |