summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5tools_utils.h
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-09-30 14:27:10 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-09-30 14:27:10 (GMT)
commitb2d661b508a7fc7a2592c13bc6bdc175551f075d (patch)
tree13baeb0d83a7c2a4c6299993c182b1227c2f6114 /tools/lib/h5tools_utils.h
parent29ab58b58dce556639ea3154e262895773a8a8df (diff)
downloadhdf5-b2d661b508a7fc7a2592c13bc6bdc175551f075d.zip
hdf5-b2d661b508a7fc7a2592c13bc6bdc175551f075d.tar.gz
hdf5-b2d661b508a7fc7a2592c13bc6bdc175551f075d.tar.bz2
Clang-format of source files
Diffstat (limited to 'tools/lib/h5tools_utils.h')
-rw-r--r--tools/lib/h5tools_utils.h96
1 files changed, 50 insertions, 46 deletions
diff --git a/tools/lib/h5tools_utils.h b/tools/lib/h5tools_utils.h
index 07069cc..65c54fa 100644
--- a/tools/lib/h5tools_utils.h
+++ b/tools/lib/h5tools_utils.h
@@ -27,13 +27,13 @@ extern "C" {
#endif
/* ``parallel_print'' information */
-#define PRINT_DATA_MAX_SIZE 512
-#define OUTBUFF_SIZE (PRINT_DATA_MAX_SIZE*4)
+#define PRINT_DATA_MAX_SIZE 512
+#define OUTBUFF_SIZE (PRINT_DATA_MAX_SIZE * 4)
-H5TOOLS_DLLVAR int g_nTasks;
+H5TOOLS_DLLVAR int g_nTasks;
H5TOOLS_DLLVAR unsigned char g_Parallel;
-H5TOOLS_DLLVAR char outBuff[];
-H5TOOLS_DLLVAR unsigned outBuffOffset;
+H5TOOLS_DLLVAR char outBuff[];
+H5TOOLS_DLLVAR unsigned outBuffOffset;
H5TOOLS_DLLVAR FILE *overflow_file;
/* Maximum size used in a call to malloc for a dataset */
@@ -43,14 +43,14 @@ H5TOOLS_DLLVAR hsize_t H5TOOLS_BUFSIZE;
/*
* begin get_option section
*/
-H5TOOLS_DLLVAR int opt_err; /* getoption prints errors if this is on */
-H5TOOLS_DLLVAR int opt_ind; /* token pointer */
-H5TOOLS_DLLVAR const char *opt_arg; /* flag argument (or value) */
+H5TOOLS_DLLVAR int opt_err; /* getoption prints errors if this is on */
+H5TOOLS_DLLVAR int opt_ind; /* token pointer */
+H5TOOLS_DLLVAR const char *opt_arg; /* flag argument (or value) */
enum {
- no_arg = 0, /* doesn't take an argument */
- require_arg, /* requires an argument */
- optional_arg /* argument is optional */
+ no_arg = 0, /* doesn't take an argument */
+ require_arg, /* requires an argument */
+ optional_arg /* argument is optional */
};
/*
@@ -82,10 +82,10 @@ enum {
* end.
*/
typedef struct long_options {
- const char *name; /* name of the long option */
- int has_arg; /* whether we should look for an arg */
- char shortval; /* the shortname equivalent of long arg
- * this gets returned from get_option */
+ const char *name; /* name of the long option */
+ int has_arg; /* whether we should look for an arg */
+ char shortval; /* the shortname equivalent of long arg
+ * this gets returned from get_option */
} long_options;
H5TOOLS_DLL int get_option(int argc, const char **argv, const char *opt, const struct long_options *l_opt);
@@ -95,15 +95,15 @@ H5TOOLS_DLL int get_option(int argc, const char **argv, const char *opt, const s
/*struct taken from the dumper. needed in table struct*/
typedef struct obj_t {
- H5O_token_t obj_token;
- 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 */
+ H5O_token_t obj_token;
+ 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;
/*struct for the tables that the find_objs function uses*/
typedef struct table_t {
- hid_t fid;
+ hid_t fid;
size_t size;
size_t nobjs;
obj_t *objs;
@@ -117,21 +117,23 @@ typedef struct find_objs_t {
table_t *dset_table;
} find_objs_t;
-H5TOOLS_DLLVAR unsigned h5tools_nCols; /*max number of columns for outputting */
+H5TOOLS_DLLVAR unsigned h5tools_nCols; /*max number of columns for outputting */
/* Definitions of useful routines */
-H5TOOLS_DLL void indentation(unsigned);
-H5TOOLS_DLL void print_version(const char *progname);
-H5TOOLS_DLL void parallel_print(const char* format, ... );
-H5TOOLS_DLL herr_t parse_tuple(const char *start, int sep, char **cpy_out, unsigned *nelems, char ***ptrs_out);
-H5TOOLS_DLL void error_msg(const char *fmt, ...);
-H5TOOLS_DLL void warn_msg(const char *fmt, ...);
-H5TOOLS_DLL void help_ref_msg(FILE *output);
-H5TOOLS_DLL void free_table(table_t *table);
+H5TOOLS_DLL void indentation(unsigned);
+H5TOOLS_DLL void print_version(const char *progname);
+H5TOOLS_DLL void parallel_print(const char *format, ...);
+H5TOOLS_DLL herr_t parse_tuple(const char *start, int sep, char **cpy_out, unsigned *nelems,
+ char ***ptrs_out);
+H5TOOLS_DLL void error_msg(const char *fmt, ...);
+H5TOOLS_DLL void warn_msg(const char *fmt, ...);
+H5TOOLS_DLL void help_ref_msg(FILE *output);
+H5TOOLS_DLL void free_table(table_t *table);
#ifdef H5DUMP_DEBUG
H5TOOLS_DLL void dump_tables(find_objs_t *info);
-#endif /* H5DUMP_DEBUG */
-H5TOOLS_DLL herr_t init_objs(hid_t fid, find_objs_t *info, table_t **group_table, table_t **dset_table, table_t **type_table);
+#endif /* H5DUMP_DEBUG */
+H5TOOLS_DLL herr_t init_objs(hid_t fid, find_objs_t *info, table_t **group_table, table_t **dset_table,
+ table_t **type_table);
H5TOOLS_DLL obj_t *search_obj(table_t *temp, const H5O_token_t *obj_token);
#ifndef H5_HAVE_TMPFILE
H5TOOLS_DLL FILE *tmpfile(void);
@@ -145,46 +147,48 @@ H5TOOLS_DLL FILE *tmpfile(void);
/* This code is layout for common code among tools */
typedef enum toolname_t {
- TOOL_H5DIFF, TOOL_H5LS, TOOL__H5DUMP /* add as necessary */
+ TOOL_H5DIFF,
+ TOOL_H5LS,
+ TOOL__H5DUMP /* add as necessary */
} h5tool_toolname_t;
/* this struct can be used to differntiate among tools */
typedef struct {
h5tool_toolname_t toolname;
- int msg_mode;
+ int msg_mode;
} h5tool_opt_t;
/* 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
+ H5O_type_t trg_type; /* OUT: target type */
+ 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 */
+ H5O_token_t obj_token; /* OUT: target object token */
unsigned long fileno; /* OUT: File number that target object is located in */
H5L_info2_t linfo; /* OUT: link info */
h5tool_opt_t opt; /* IN: options */
} h5tool_link_info_t;
-
/* Definitions of routines */
-H5TOOLS_DLL int H5tools_get_symlink_info(hid_t file_id, const char * linkpath, h5tool_link_info_t *link_info, hbool_t get_obj_type);
+H5TOOLS_DLL int H5tools_get_symlink_info(hid_t file_id, const char *linkpath, h5tool_link_info_t *link_info,
+ hbool_t get_obj_type);
H5TOOLS_DLL const char *h5tools_getprogname(void);
-H5TOOLS_DLL void h5tools_setprogname(const char*progname);
-H5TOOLS_DLL int h5tools_getstatus(void);
-H5TOOLS_DLL void h5tools_setstatus(int d_status);
-H5TOOLS_DLL int h5tools_getenv_update_hyperslab_bufsize(void);
+H5TOOLS_DLL void h5tools_setprogname(const char *progname);
+H5TOOLS_DLL int h5tools_getstatus(void);
+H5TOOLS_DLL void h5tools_setstatus(int d_status);
+H5TOOLS_DLL int h5tools_getenv_update_hyperslab_bufsize(void);
#ifdef H5_HAVE_ROS3_VFD
H5TOOLS_DLL herr_t h5tools_parse_ros3_fapl_tuple(const char *tuple_str, int delim,
- H5FD_ros3_fapl_t *fapl_config_out);
-H5TOOLS_DLL int h5tools_populate_ros3_fapl(H5FD_ros3_fapl_t *fa, const char **values);
+ H5FD_ros3_fapl_t *fapl_config_out);
+H5TOOLS_DLL int h5tools_populate_ros3_fapl(H5FD_ros3_fapl_t *fa, const char **values);
#endif /* H5_HAVE_ROS3_VFD */
#ifdef H5_HAVE_LIBHDFS
H5TOOLS_DLL herr_t h5tools_parse_hdfs_fapl_tuple(const char *tuple_str, int delim,
- H5FD_hdfs_fapl_t *fapl_config_out);
+ H5FD_hdfs_fapl_t *fapl_config_out);
#endif
#ifdef __cplusplus
}
#endif
-#endif /* H5TOOLS_UTILS_H__ */
+#endif /* H5TOOLS_UTILS_H__ */