diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2010-08-19 19:55:48 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2010-08-19 19:55:48 (GMT) |
commit | 2f6e3cb5bee1abac0be573123439938cb5d3096e (patch) | |
tree | fac2c21a94dde6fc226321a0df5a775d31f04269 /tools/lib/h5diff_util.c | |
parent | e56b6f6c4019ad7dddf2325c91b134646fcb55e6 (diff) | |
download | hdf5-2f6e3cb5bee1abac0be573123439938cb5d3096e.zip hdf5-2f6e3cb5bee1abac0be573123439938cb5d3096e.tar.gz hdf5-2f6e3cb5bee1abac0be573123439938cb5d3096e.tar.bz2 |
[svn-r19252] Description:
Bring Coverity changes from branch to trunk:
r19161:
Fixed the part for matching the subset info with dataset
r19189:
BZ1646: h5dump does not check number of dimensions for subsetting parameters against the dataset
Changed subset_t structure from holding hsize_t pointers to holding new subset_d pointers, which hold the original hsize_t pointer + len. this len is then checked against dataset ndims in the handle_dataset function of h5dump.
Changed all references to use new data structure.
Added tests for each subset parameter.
r19190:
Added new h5dump ddl files
Tested on:
Mac OS X/32 10.6.4 (amazon) w/debug & production
(h5committested on branch)
Diffstat (limited to 'tools/lib/h5diff_util.c')
-rw-r--r-- | tools/lib/h5diff_util.c | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/tools/lib/h5diff_util.c b/tools/lib/h5diff_util.c index 721c3d7..5df94fa 100644 --- a/tools/lib/h5diff_util.c +++ b/tools/lib/h5diff_util.c @@ -21,76 +21,6 @@ /* global variables */ int g_nTasks = 1; -unsigned char g_Parallel = 0; /*0 for serial, 1 for parallel */ -char outBuff[OUTBUFF_SIZE]; -int outBuffOffset; -FILE* overflow_file = NULL; - -/*------------------------------------------------------------------------- - * Function: parallel_print - * - * Purpose: wrapper for printf for use in parallel mode. - * - * Programmer: Leon Arber - * - * Date: December 1, 2004 - * - *------------------------------------------------------------------------- - */ -void parallel_print(const char* format, ...) -{ - int bytes_written; - va_list ap; - - va_start(ap, format); - - if(!g_Parallel) - vprintf(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 - va_end(ap); - va_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 - ) - { - /* Terminate the outbuff at the end of the previous output */ - outBuff[outBuffOffset] = '\0'; - - overflow_file = HDtmpfile(); - if(overflow_file == NULL) - fprintf(stderr, "warning: could not create overflow file. Output may be truncated.\n"); - else - bytes_written = HDvfprintf(overflow_file, format, ap); - } - else - outBuffOffset += bytes_written; - } - else - bytes_written = HDvfprintf(overflow_file, format, ap); - - } - va_end(ap); -} /*------------------------------------------------------------------------- * Function: print_dimensions |