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/lib | |
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/lib')
-rw-r--r-- | tools/lib/h5diff.c | 22 | ||||
-rw-r--r-- | tools/lib/h5diff.h | 6 | ||||
-rw-r--r-- | tools/lib/h5diff_array.c | 14 | ||||
-rw-r--r-- | tools/lib/h5diff_attr.c | 10 | ||||
-rw-r--r-- | tools/lib/h5diff_dset.c | 8 | ||||
-rw-r--r-- | tools/lib/h5tools.c | 20 | ||||
-rw-r--r-- | tools/lib/h5tools.h | 46 | ||||
-rw-r--r-- | tools/lib/h5tools_dump.c | 60 | ||||
-rw-r--r-- | tools/lib/h5tools_ref.c | 2 | ||||
-rw-r--r-- | tools/lib/h5tools_str.c | 14 | ||||
-rw-r--r-- | tools/lib/h5tools_str.h | 12 | ||||
-rw-r--r-- | tools/lib/h5tools_utils.c | 24 | ||||
-rw-r--r-- | tools/lib/h5tools_utils.h | 6 | ||||
-rw-r--r-- | tools/lib/h5trav.c | 20 | ||||
-rw-r--r-- | tools/lib/h5trav.h | 16 |
15 files changed, 140 insertions, 140 deletions
diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c index debd54a..7eb17ba 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; @@ -486,11 +486,11 @@ trav_grp_objs(const char *path, const H5O_info2_t *oinfo, const char *already_vi static herr_t trav_grp_symlinks(const char *path, const H5L_info2_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(" "); @@ -601,8 +601,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; @@ -1107,8 +1107,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; @@ -1157,7 +1157,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 4afb3f6..33ca593 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 */ h5tools_vol_info_t vol_info[2]; /* VOL information for input file, output file */ h5tools_vfd_info_t vfd_info[2]; /* VFD information for input file, output file */ hbool_t custom_vol[2]; /* Using a custom input, output VOL? */ diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c index 0c28789..0cacba1 100644 --- a/tools/lib/h5diff_array.c +++ b/tools/lib/h5diff_array.c @@ -113,8 +113,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; @@ -504,10 +504,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; @@ -1424,7 +1424,7 @@ diff_region(hid_t obj1_id, hid_t obj2_id, hid_t region1_id, hid_t region2_id, di /* print differences if found */ if (nfound_b && opts->mode_verbose) { H5O_info2_t oi1, oi2; - char * obj1_str = NULL, *obj2_str = NULL; + char *obj1_str = NULL, *obj2_str = NULL; H5Oget_info3(obj1_id, &oi1, H5O_INFO_BASIC); H5Oget_info3(obj2_id, &oi2, H5O_INFO_BASIC); diff --git a/tools/lib/h5diff_attr.c b/tools/lib/h5diff_attr.c index 63b6d8f..a5276d8 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 */ @@ -612,8 +612,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 e6872f0..e86d995 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 06f6b2d..93886d2 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; @@ -625,7 +625,7 @@ h5tools_set_fapl_vol(hid_t fapl_id, h5tools_vol_info_t *vol_info) { htri_t connector_is_registered; hid_t connector_id = H5I_INVALID_HID; - void * connector_info = NULL; + void *connector_info = NULL; herr_t ret_value = SUCCEED; switch (vol_info->type) { @@ -1367,8 +1367,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 */ @@ -1532,8 +1532,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 */ @@ -1776,7 +1776,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"); @@ -1985,7 +1985,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; @@ -2149,7 +2149,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 d3501b3..0620791 100644 --- a/tools/lib/h5tools.h +++ b/tools/lib/h5tools.h @@ -350,11 +350,11 @@ typedef struct h5tool_format_t { * * listv: h5watch: vector containing info about the list of compound fields to be printed. */ - const char * cmpd_name; - const char * cmpd_sep; - const char * cmpd_pre; - const char * cmpd_suf; - const char * cmpd_end; + const char *cmpd_name; + const char *cmpd_sep; + const char *cmpd_pre; + const char *cmpd_suf; + const char *cmpd_end; const struct H5LD_memb_t *const *cmpd_listv; /* @@ -510,7 +510,7 @@ typedef struct h5tool_format_t { } h5tool_format_t; typedef struct subset_d { - hsize_t * data; + hsize_t *data; unsigned int len; } subset_d; @@ -560,7 +560,7 @@ typedef struct h5tools_vol_info_t { /* Field specifying either the connector's name or value (ID) */ union { - const char * name; + const char *name; H5VL_class_value_t value; } u; } h5tools_vol_info_t; @@ -573,7 +573,7 @@ typedef struct h5tools_vfd_info_t { /* Field specifying either the driver's name or value (ID) */ union { - const char * name; + const char *name; H5FD_class_value_t value; } u; } h5tools_vfd_info_t; @@ -615,29 +615,29 @@ extern "C" { H5TOOLS_DLLVAR const char *volnames[]; 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 e76328f..a651230 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -185,13 +185,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); @@ -207,8 +207,8 @@ void h5tools_dump_subsetting_header(FILE *stream, const h5tool_format_t *info, h static void h5tools_print_virtual_selection(hid_t vspace, 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 */ + h5tools_str_t *buffer, /* string into which to render */ + hsize_t *curr_pos, /* total data element position */ size_t ncols); void @@ -349,8 +349,8 @@ h5tools_dump_simple_data(FILE *stream, const h5tool_format_t *info, h5tools_cont hbool_t h5tools_dump_region_attribute(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 */ + h5tools_str_t *buffer, /* string into which to render */ + hsize_t *curr_pos, /* total data element position */ size_t ncols, hsize_t region_elmt_counter, /* element counter */ hsize_t elmt_counter) { @@ -490,14 +490,14 @@ done: 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 */ @@ -512,7 +512,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); @@ -674,7 +674,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) { @@ -682,7 +682,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; @@ -897,7 +897,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]; @@ -906,7 +906,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; @@ -1041,7 +1041,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; @@ -1261,10 +1261,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 */ { @@ -2062,7 +2062,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; @@ -2091,7 +2091,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_info2_t oinfo; - obj_t * obj = NULL; /* Found object */ + obj_t *obj = NULL; /* Found object */ H5Oget_info3(type, &oinfo, H5O_INFO_BASIC); obj = search_obj(h5dump_type_table, &oinfo.token); @@ -2744,7 +2744,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 i; unsigned nmembs = 0; /*number of members */ @@ -3016,8 +3016,8 @@ h5tools_dump_oid(FILE *stream, const h5tool_format_t *info, h5tools_context_t *c static void h5tools_print_virtual_selection(hid_t vspace, 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 */ + h5tools_str_t *buffer, /* string into which to render */ + hsize_t *curr_pos, /* total data element position */ size_t ncols) { switch (H5Sget_select_type(vspace)) { @@ -3095,7 +3095,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); @@ -3205,7 +3205,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); } @@ -3482,7 +3482,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t * for (i = 0; i < nfilters; 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); if (filtn < 0) continue; /* nothing to print for invalid filter */ @@ -3770,7 +3770,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 */ @@ -4306,7 +4306,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; - H5R_ref_t * ref_buf = NULL; + H5R_ref_t *ref_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 1c97a52..c68f64c 100644 --- a/tools/lib/h5tools_ref.c +++ b/tools/lib/h5tools_ref.c @@ -35,7 +35,7 @@ typedef struct { H5O_token_t obj_token; /* Object token */ - 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 551002c..130ba6a 100644 --- a/tools/lib/h5tools_str.c +++ b/tools/lib/h5tools_str.c @@ -44,7 +44,7 @@ typedef struct H5LD_memb_t { /* 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); @@ -667,15 +667,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; H5_GCC_CLANG_DIAG_OFF("format-nonliteral") @@ -748,7 +748,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'; @@ -1101,7 +1101,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai case H5R_OBJECT1: { /* Object references -- show the type and OID of the referenced object. */ H5O_info2_t oi; - char * obj_tok_str = NULL; + char *obj_tok_str = NULL; H5TOOLS_DEBUG("ref_type is H5R_OBJECT1"); if ((obj = H5Ropen_object(ref_vp, H5P_DEFAULT, H5P_DEFAULT)) >= 0) { @@ -1211,7 +1211,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai * Object references -- show the type and OID of the referenced object. */ H5O_info2_t oi; - char * obj_tok_str = NULL; + char *obj_tok_str = NULL; H5TOOLS_DEBUG("H5T_REFERENCE:H5T_STD_REF_OBJ"); obj = H5Rdereference2(container, H5P_DEFAULT, H5R_OBJECT, vp); diff --git a/tools/lib/h5tools_str.h b/tools/lib/h5tools_str.h index f58cd3d..5d35636 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, ...) H5_ATTR_FORMAT(printf, 2, 3); -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, ...) H5_ATTR_FORMAT(printf, 2, 3); +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 66d3ef6..f92f8a7 100644 --- a/tools/lib/h5tools_utils.c +++ b/tools/lib/h5tools_utils.c @@ -45,7 +45,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(hid_t fid, table_t **tbl); @@ -224,12 +224,12 @@ help_ref_msg(FILE *output) 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 compiler... */ - char ** elems_re = NULL; /* temporary pointer, for realloc */ - char * cpy = NULL; + char **elems = NULL; /* more like *elems[], but compiler... */ + char **elems_re = NULL; /* temporary pointer, for realloc */ + char *cpy = NULL; herr_t ret_value = SUCCEED; unsigned init_slots = 2; @@ -467,7 +467,7 @@ static void dump_table(hid_t fid, char *tablename, table_t *table) { unsigned u; - char * obj_tok_str = NULL; + char *obj_tok_str = NULL; PRINTSTREAM(rawoutstream, "%s: # of entries = %d\n", tablename, table->nobjs); for (u = 0; u < table->nobjs; u++) { @@ -508,7 +508,7 @@ dump_tables(find_objs_t *info) *------------------------------------------------------------------------- */ H5_ATTR_PURE obj_t * - search_obj(table_t *table, const H5O_token_t *obj_token) +search_obj(table_t *table, const H5O_token_t *obj_token) { unsigned u; int token_cmp; @@ -911,8 +911,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 */ @@ -1130,8 +1130,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 4cf4e40..15b44ca 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; @@ -44,7 +44,7 @@ H5TOOLS_DLLVAR hsize_t H5TOOLS_BUFSIZE; /*struct taken from the dumper. needed in table struct*/ typedef struct obj_t { H5O_token_t obj_token; - 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; @@ -109,7 +109,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() */ H5O_token_t obj_token; /* OUT: target object token */ 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 cca36e4..712e413 100644 --- a/tools/lib/h5trav.c +++ b/tools/lib/h5trav.c @@ -21,7 +21,7 @@ */ typedef struct trav_addr_path_t { H5O_token_t token; - 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 */ unsigned fields; /* Fields needed in H5O_info2_t struct */ } trav_ud_traverse_t; @@ -168,9 +168,9 @@ static herr_t traverse_cb(hid_t loc_id, const char *path, const H5L_info2_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) { @@ -704,7 +704,7 @@ trav_table_addlink(trav_table_t *table, const H5O_token_t *obj_token, const char 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 */ @@ -814,7 +814,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); @@ -964,7 +964,7 @@ trav_print_visit_lnk(const char *path, const H5L_info2_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 58d347d..a250d23 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; H5O_token_t obj_token; /* object token */ 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 { H5O_token_t obj_token; /* object token */ 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; |