diff options
author | Neil Fortner <nfortne2@hdfgroup.org> | 2015-04-10 23:00:48 (GMT) |
---|---|---|
committer | Neil Fortner <nfortne2@hdfgroup.org> | 2015-04-10 23:00:48 (GMT) |
commit | 6a27582a4488d4d18a0b6cd584b8950ab02b81a7 (patch) | |
tree | 01615f7679a3d3ef4b2d9caa487874aa421df506 /tools/lib | |
parent | 7a4b02567e4de16d7478c10ffa07562b0daf320b (diff) | |
parent | 3875cc6960266775e8078c782c8864516865be67 (diff) | |
download | hdf5-6a27582a4488d4d18a0b6cd584b8950ab02b81a7.zip hdf5-6a27582a4488d4d18a0b6cd584b8950ab02b81a7.tar.gz hdf5-6a27582a4488d4d18a0b6cd584b8950ab02b81a7.tar.bz2 |
[svn-r26781] Merge revisions 26305 through 26780 from trunk to vds branch.
Tested: ummon
Diffstat (limited to 'tools/lib')
-rw-r--r-- | tools/lib/CMakeLists.txt | 4 | ||||
-rw-r--r-- | tools/lib/Makefile.in | 10 | ||||
-rw-r--r-- | tools/lib/h5tools_dump.c | 1 | ||||
-rw-r--r-- | tools/lib/h5tools_filters.c | 32 | ||||
-rw-r--r-- | tools/lib/h5tools_str.c | 8 | ||||
-rw-r--r-- | tools/lib/h5tools_utils.c | 19 | ||||
-rw-r--r-- | tools/lib/h5tools_utils.h | 6 | ||||
-rw-r--r-- | tools/lib/h5trav.c | 16 | ||||
-rw-r--r-- | tools/lib/io_timer.c | 2 |
9 files changed, 21 insertions, 77 deletions
diff --git a/tools/lib/CMakeLists.txt b/tools/lib/CMakeLists.txt index 35ad46e..dbd72cd 100644 --- a/tools/lib/CMakeLists.txt +++ b/tools/lib/CMakeLists.txt @@ -38,14 +38,14 @@ set (H5_TOOLS_LIB_HDRS ) add_library (${HDF5_TOOLS_LIB_TARGET} ${LIB_TYPE} ${H5_TOOLS_LIB_SRCS} ${H5_TOOLS_LIB_HDRS}) -TARGET_C_PROPERTIES (${HDF5_TOOLS_LIB_TARGET} " " " ") +TARGET_C_PROPERTIES (${HDF5_TOOLS_LIB_TARGET} ${LIB_TYPE} " " " ") target_link_libraries (${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_TOOLS_LIB_TARGET}") H5_SET_LIB_OPTIONS ( ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TOOLS_LIB_NAME} ${LIB_TYPE} HDF5_TOOLS_LIB_NAME_RELEASE - HDF5_TOOLS_LIB_NAME_DEBUG + HDF5_TOOLS_LIB_NAME_DEBUG ) #set_target_properties (${HDF5_TOOLS_LIB_TARGET} PROPERTIES COMPILE_DEFINITIONS H5DIFF_DEBUG) set_target_properties (${HDF5_TOOLS_LIB_TARGET} PROPERTIES diff --git a/tools/lib/Makefile.in b/tools/lib/Makefile.in index 607f1ed..0b531b3 100644 --- a/tools/lib/Makefile.in +++ b/tools/lib/Makefile.in @@ -403,7 +403,6 @@ AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@ AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@ AM_MAKEFLAGS = @AM_MAKEFLAGS@ AR = @AR@ -AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -435,7 +434,6 @@ DIRECT_VFD = @DIRECT_VFD@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ -DYNAMIC_DIRS = @DYNAMIC_DIRS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ @@ -454,17 +452,14 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FILTERS = @FILTERS@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ -H5_CXX_SHARED = @H5_CXX_SHARED@ H5_FCFLAGS = @H5_FCFLAGS@ H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@ H5_LDFLAGS = @H5_LDFLAGS@ -H5_LONE_COLON = @H5_LONE_COLON@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ @@ -527,7 +522,6 @@ R_INTEGER = @R_INTEGER@ R_LARGE = @R_LARGE@ SEARCH = @SEARCH@ SED = @SED@ -SETX = @SETX@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIZE_T = @SIZE_T@ @@ -542,10 +536,6 @@ TR = @TR@ TRACE_API = @TRACE_API@ UNAME_INFO = @UNAME_INFO@ USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@ -USE_FILTER_FLETCHER32 = @USE_FILTER_FLETCHER32@ -USE_FILTER_NBIT = @USE_FILTER_NBIT@ -USE_FILTER_SCALEOFFSET = @USE_FILTER_SCALEOFFSET@ -USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@ USE_FILTER_SZIP = @USE_FILTER_SZIP@ USINGMEMCHECKER = @USINGMEMCHECKER@ VERSION = @VERSION@ diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c index 7d25c7a..29a6d68 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -2914,7 +2914,6 @@ h5tools_print_virtual_selection(hid_t vspace, hid_t dcpl_id, size_t index, h5tools_render_element(stream, info, ctx, buffer, curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); } - /*------------------------------------------------------------------------- * Function: dump_fill_value * diff --git a/tools/lib/h5tools_filters.c b/tools/lib/h5tools_filters.c index 79cf253..ccdba26 100644 --- a/tools/lib/h5tools_filters.c +++ b/tools/lib/h5tools_filters.c @@ -107,44 +107,24 @@ int h5tools_canreadf(const char* name, /* object name, serves also as boolean pr *------------------------------------------------------------------------- */ case H5Z_FILTER_SHUFFLE: -#ifndef H5_HAVE_FILTER_SHUFFLE - if (name) - print_warning(name,"shuffle"); - return 0; -#endif break; /*------------------------------------------------------------------------- * H5Z_FILTER_FLETCHER32 3 , fletcher32 checksum of EDC *------------------------------------------------------------------------- */ case H5Z_FILTER_FLETCHER32: -#ifndef H5_HAVE_FILTER_FLETCHER32 - if (name) - print_warning(name,"fletcher32"); - return 0; -#endif break; /*------------------------------------------------------------------------- * H5Z_FILTER_NBIT *------------------------------------------------------------------------- */ case H5Z_FILTER_NBIT: -#ifndef H5_HAVE_FILTER_NBIT - if (name) - print_warning(name,"nbit"); - return 0; -#endif break; /*------------------------------------------------------------------------- * H5Z_FILTER_SCALEOFFSET *------------------------------------------------------------------------- */ case H5Z_FILTER_SCALEOFFSET: -#ifndef H5_HAVE_FILTER_SCALEOFFSET - if (name) - print_warning(name,"scaleoffset"); - return 0; -#endif break; }/*switch*/ }/*for*/ @@ -211,24 +191,12 @@ int h5tools_can_encode(H5Z_filter_t filtn) { #endif break; case H5Z_FILTER_SHUFFLE: -#ifndef H5_HAVE_FILTER_SHUFFLE - return 0; -#endif break; case H5Z_FILTER_FLETCHER32: -#ifndef H5_HAVE_FILTER_FLETCHER32 - return 0; -#endif break; case H5Z_FILTER_NBIT: -#ifndef H5_HAVE_FILTER_NBIT - return 0; -#endif break; case H5Z_FILTER_SCALEOFFSET: -#ifndef H5_HAVE_FILTER_SCALEOFFSET - return 0; -#endif break; }/*switch*/ diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c index 8302c48..4381df8 100644 --- a/tools/lib/h5tools_str.c +++ b/tools/lib/h5tools_str.c @@ -155,11 +155,7 @@ h5tools_str_append(h5tools_str_t *str/*in,out*/, const char *fmt, ...) * to lack of buffer size, so try one more time after realloc more * buffer size before return NULL. */ - if (nchars < 0 -#ifndef H5_VSNPRINTF_WORKS - && (HDstrlen(str->s) < str->nalloc) -#endif - ) { + if (nchars < 0) { /* failure, such as bad format */ return NULL; } @@ -809,7 +805,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai float tempfloat; HDmemcpy(&tempfloat, vp, sizeof(float)); - h5tools_str_append(str, OPT(info->fmt_float, "%g"), tempfloat); + h5tools_str_append(str, OPT(info->fmt_float, "%g"), (double)tempfloat); } else if (sizeof(double) == nsize) { /* if (H5Tequal(type, H5T_NATIVE_DOUBLE)) */ diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c index d7c5adb..fc8cf1d 100644 --- a/tools/lib/h5tools_utils.c +++ b/tools/lib/h5tools_utils.c @@ -89,28 +89,11 @@ void parallel_print(const char* format, ...) HDvprintf(format, ap); else { if(overflow_file == NULL) /*no overflow has occurred yet */ { -#if 0 - printf("calling HDvsnprintf: OUTBUFF_SIZE=%ld, outBuffOffset=%ld, ", (long)OUTBUFF_SIZE, (long)outBuffOffset); -#endif bytes_written = HDvsnprintf(outBuff+outBuffOffset, OUTBUFF_SIZE-outBuffOffset, format, ap); -#if 0 - printf("bytes_written=%ld\n", (long)bytes_written); -#endif HDva_end(ap); HDva_start(ap, format); -#if 0 - printf("Result: bytes_written=%ld, OUTBUFF_SIZE-outBuffOffset=%ld\n", (long)bytes_written, (long)OUTBUFF_SIZE-outBuffOffset); -#endif - - if ((bytes_written < 0) || -#ifdef H5_VSNPRINTF_WORKS - (bytes_written >= (OUTBUFF_SIZE-outBuffOffset)) -#else - ((bytes_written+1) == (OUTBUFF_SIZE-outBuffOffset)) -#endif - ) - { + if((bytes_written < 0) || (bytes_written >= (OUTBUFF_SIZE - outBuffOffset))) { /* Terminate the outbuff at the end of the previous output */ outBuff[outBuffOffset] = '\0'; diff --git a/tools/lib/h5tools_utils.h b/tools/lib/h5tools_utils.h index 3285278..fd588b9 100644 --- a/tools/lib/h5tools_utils.h +++ b/tools/lib/h5tools_utils.h @@ -124,9 +124,9 @@ H5TOOLS_DLLVAR int h5tools_nCols; /*max number of columns for /* Definitions of useful routines */ H5TOOLS_DLL void indentation(int); H5TOOLS_DLL void print_version(const char *progname); -H5TOOLS_DLL void parallel_print(const char* format, ... ); -H5TOOLS_DLL void error_msg(const char *fmt, ...); -H5TOOLS_DLL void warn_msg(const char *fmt, ...); +H5TOOLS_DLL void parallel_print(const char* format, ... )__attribute__((format (printf, 1, 2))); +H5TOOLS_DLL void error_msg(const char *fmt, ...)__attribute__((format (printf, 1, 2))); +H5TOOLS_DLL void warn_msg(const char *fmt, ...)__attribute__((format (printf, 1, 2))); H5TOOLS_DLL void help_ref_msg(FILE *output); H5TOOLS_DLL void free_table(table_t *table); #ifdef H5DUMP_DEBUG diff --git a/tools/lib/h5trav.c b/tools/lib/h5trav.c index d0a4a76..90e6d3d 100644 --- a/tools/lib/h5trav.c +++ b/tools/lib/h5trav.c @@ -50,6 +50,10 @@ typedef struct { hid_t fid; /* File ID being traversed */ } trav_print_udata_t; +typedef struct trav_path_op_data_t { + const char *path; +} trav_path_op_data_t; + /* format for hsize_t */ #ifdef H5TRAV_PRINT_SPACE #define HSIZE_T_FORMAT "%" H5_PRINTF_LL_WIDTH "u" @@ -899,11 +903,11 @@ trav_attr(hid_t #ifndef H5TRAV_PRINT_SPACE UNUSED #endif /* H5TRAV_PRINT_SPACE */ -obj, const char *attr_name, const H5A_info_t UNUSED *ainfo, void *op_data) +obj, const char *attr_name, const H5A_info_t UNUSED *ainfo, void *_op_data) { - char *buf; + trav_path_op_data_t *op_data = (trav_path_op_data_t *)_op_data; + const char *buf = op_data->path; - buf = (char*)op_data; if((strlen(buf)==1) && (*buf=='/')) printf(" %-10s %s%s", "attribute", buf, attr_name); else @@ -1009,10 +1013,14 @@ trav_print_visit_obj(const char *path, const H5O_info_t *oinfo, /* Check if we've already seen this object */ if(NULL == already_visited) { + trav_path_op_data_t op_data; + + op_data.path = path; /* Finish printing line about object */ printf("\n"); if(trav_verbosity > 0) - H5Aiterate_by_name(print_udata->fid, path, trav_index_by, trav_index_order, NULL, trav_attr, (void *)path, H5P_DEFAULT); + H5Aiterate_by_name(print_udata->fid, path, trav_index_by, trav_index_order, + NULL, trav_attr, &op_data, H5P_DEFAULT); } else /* Print the link's original name */ diff --git a/tools/lib/io_timer.c b/tools/lib/io_timer.c index 78e7fe9..b8d44de 100644 --- a/tools/lib/io_timer.c +++ b/tools/lib/io_timer.c @@ -40,7 +40,7 @@ * The number to divide the tv_usec field with to get a nice decimal to add to * the number of seconds. */ -#define MICROSECOND 1000000.0 +#define MICROSECOND 1000000.0F /* global variables */ io_time_t *timer_g; /* timer: global for stub functions */ |