summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2019-08-15 21:46:00 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2019-08-15 21:46:15 (GMT)
commit64e6665b5442fc3f46cc7e2b00fe0a1b59f03b22 (patch)
tree138fc73e4863a87dee28574d4d827b2f5a403d84 /tools
parent3a504899eef1a66031c6f52623c24bb4e51ca51e (diff)
downloadhdf5-64e6665b5442fc3f46cc7e2b00fe0a1b59f03b22.zip
hdf5-64e6665b5442fc3f46cc7e2b00fe0a1b59f03b22.tar.gz
hdf5-64e6665b5442fc3f46cc7e2b00fe0a1b59f03b22.tar.bz2
Add HD prefix to tests
Diffstat (limited to 'tools')
-rw-r--r--tools/lib/h5diff.c10
-rw-r--r--tools/lib/h5tools_filters.c2
-rw-r--r--tools/lib/h5trav.c40
-rw-r--r--tools/libtest/h5tools_test_utils.c121
-rw-r--r--tools/src/h5copy/h5copy.c8
-rw-r--r--tools/src/h5diff/h5diff_common.c28
-rw-r--r--tools/src/h5diff/ph5diff_main.c26
-rw-r--r--tools/src/h5dump/h5dump_ddl.c4
-rw-r--r--tools/src/h5dump/h5dump_xml.c10
-rw-r--r--tools/src/h5repack/h5repack.c52
-rw-r--r--tools/src/h5repack/h5repack_copy.c38
-rw-r--r--tools/src/h5repack/h5repack_refs.c28
-rw-r--r--tools/src/h5stat/h5stat.c218
-rw-r--r--tools/src/misc/h5debug.c496
-rw-r--r--tools/src/misc/h5mkgrp.c6
-rw-r--r--tools/src/misc/h5repart.c601
-rw-r--r--tools/test/h5copy/h5copygentest.c110
-rw-r--r--tools/test/h5diff/h5diffgentest.c446
-rw-r--r--tools/test/h5dump/h5dumpgentest.c46
-rw-r--r--tools/test/h5import/h5importtest.c168
-rw-r--r--tools/test/h5jam/h5jamgentest.c6
-rw-r--r--tools/test/h5repack/h5repacktst.c120
-rw-r--r--tools/test/h5repack/testh5repack_detect_szip.c4
-rw-r--r--tools/test/h5stat/h5stat_gentest.c14
-rw-r--r--tools/test/misc/h5clear_gentest.c138
-rw-r--r--tools/test/misc/talign.c26
26 files changed, 1395 insertions, 1371 deletions
diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c
index 3ee5393..c2153e5 100644
--- a/tools/lib/h5diff.c
+++ b/tools/lib/h5diff.c
@@ -119,7 +119,7 @@ print_incoming_data(void)
HDmemset(data, 0, PRINT_DATA_MAX_SIZE+1);
MPI_Recv(data, PRINT_DATA_MAX_SIZE, MPI_CHAR, Status.MPI_SOURCE, MPI_TAG_PRINT_DATA, MPI_COMM_WORLD, &Status);
- printf("%s", data);
+ HDprintf("%s", data);
}
} while(incomingMessage);
}
@@ -1119,7 +1119,7 @@ diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1,
/*Set up args to pass to worker task. */
if(HDstrlen(obj1_fullpath) > 255 ||
HDstrlen(obj2_fullpath) > 255) {
- printf("The parallel diff only supports object names up to 255 characters\n");
+ HDprintf("The parallel diff only supports object names up to 255 characters\n");
MPI_Abort(MPI_COMM_WORLD, 0);
} /* end if */
@@ -1247,7 +1247,7 @@ diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1,
MPI_Send(&args, sizeof(args), MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_ARGS, MPI_COMM_WORLD);
} /* end else-if */
else {
- printf("ERROR: Invalid tag (%d) received \n", Status.MPI_TAG);
+ HDprintf("ERROR: Invalid tag (%d) received \n", Status.MPI_TAG);
MPI_Abort(MPI_COMM_WORLD, 0);
MPI_Finalize();
} /* end else */
@@ -1324,10 +1324,10 @@ diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1,
MPI_Recv(data, PRINT_DATA_MAX_SIZE, MPI_CHAR, Status.MPI_SOURCE, MPI_TAG_PRINT_DATA, MPI_COMM_WORLD, &Status);
- printf("%s", data);
+ HDprintf("%s", data);
} /* end else-if */
else {
- printf("ph5diff-manager: ERROR!! Invalid tag (%d) received \n", Status.MPI_TAG);
+ HDprintf("ph5diff-manager: ERROR!! Invalid tag (%d) received \n", Status.MPI_TAG);
MPI_Abort(MPI_COMM_WORLD, 0);
} /* end else */
} /* end while */
diff --git a/tools/lib/h5tools_filters.c b/tools/lib/h5tools_filters.c
index db61d51..cfe7422 100644
--- a/tools/lib/h5tools_filters.c
+++ b/tools/lib/h5tools_filters.c
@@ -20,7 +20,7 @@
*/
static void print_filter_warning(const char *dname, const char *fname)
{
- fprintf(stderr,
+ HDfprintf(stderr,
"Warning: dataset <%s> cannot be read, %s filter is not available\n",
dname, fname);
}
diff --git a/tools/lib/h5trav.c b/tools/lib/h5trav.c
index 78240db..eb7b56d 100644
--- a/tools/lib/h5trav.c
+++ b/tools/lib/h5trav.c
@@ -823,14 +823,14 @@ trav_attr(hid_t
const char *buf = op_data->path;
if((strlen(buf)==1) && (*buf=='/'))
- printf(" %-10s %s%s", "attribute", buf, attr_name);
+ HDprintf(" %-10s %s%s", "attribute", buf, attr_name);
else
- printf(" %-10s %s/%s", "attribute", buf, attr_name);
+ HDprintf(" %-10s %s/%s", "attribute", buf, attr_name);
#ifdef H5TRAV_PRINT_SPACE
if(trav_verbosity < 2) {
#endif
- printf("\n");
+ HDprintf("\n");
#ifdef H5TRAV_PRINT_SPACE
}
else {
@@ -850,26 +850,26 @@ trav_attr(hid_t
switch(space_type) {
case H5S_SCALAR:
/* scalar dataspace */
- printf(" scalar\n");
+ HDprintf(" scalar\n");
break;
case H5S_SIMPLE:
/* simple dataspace */
- printf(" {");
+ HDprintf(" {");
for (i = 0; i < ndims; i++) {
- printf("%s" HSIZE_T_FORMAT, i?", ":"", size[i]);
+ HDprintf("%s" HSIZE_T_FORMAT, i?", ":"", size[i]);
}
- printf("}\n");
+ HDprintf("}\n");
break;
case H5S_NULL:
/* null dataspace */
- printf(" null\n");
+ HDprintf(" null\n");
break;
default:
/* Unknown dataspace type */
- printf(" unknown\n");
+ HDprintf(" unknown\n");
break;
} /* end switch */
@@ -903,22 +903,22 @@ trav_print_visit_obj(const char *path, const H5O_info_t *oinfo,
*/
switch(oinfo->type) {
case H5O_TYPE_GROUP:
- printf(" %-10s %s", "group", path);
+ HDprintf(" %-10s %s", "group", path);
break;
case H5O_TYPE_DATASET:
- printf(" %-10s %s", "dataset", path);
+ HDprintf(" %-10s %s", "dataset", path);
break;
case H5O_TYPE_NAMED_DATATYPE:
- printf(" %-10s %s", "datatype", path);
+ HDprintf(" %-10s %s", "datatype", path);
break;
case H5O_TYPE_MAP:
case H5O_TYPE_UNKNOWN:
case H5O_TYPE_NTYPES:
default:
- printf(" %-10s %s", "unknown object type", path);
+ HDprintf(" %-10s %s", "unknown object type", path);
break;
} /* end switch */
@@ -928,14 +928,14 @@ trav_print_visit_obj(const char *path, const H5O_info_t *oinfo,
op_data.path = path;
/* Finish printing line about object */
- printf("\n");
+ HDprintf("\n");
if(trav_verbosity > 0)
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 */
- printf(" -> %s\n", already_visited);
+ HDprintf(" -> %s\n", already_visited);
return(0);
} /* end trav_print_visit_obj() */
@@ -963,12 +963,12 @@ trav_print_visit_lnk(const char *path, const H5L_info_t *linfo, void *udata)
if(targbuf) {
if(H5Lget_val(print_udata->fid, path, targbuf, linfo->u.val_size + 1, H5P_DEFAULT) < 0)
targbuf[0] = 0;
- printf(" %-10s %s -> %s\n", "link", path, targbuf);
+ HDprintf(" %-10s %s -> %s\n", "link", path, targbuf);
HDfree(targbuf);
}
} /* end if */
else
- printf(" %-10s %s ->\n", "link", path);
+ HDprintf(" %-10s %s ->\n", "link", path);
break;
case H5L_TYPE_EXTERNAL:
@@ -982,12 +982,12 @@ trav_print_visit_lnk(const char *path, const H5L_info_t *linfo, void *udata)
if(H5Lget_val(print_udata->fid, path, targbuf, linfo->u.val_size + 1, H5P_DEFAULT) < 0)
targbuf[0] = 0;
if(H5Lunpack_elink_val(targbuf, linfo->u.val_size, NULL, &filename, &objname) >= 0)
- printf(" %-10s %s -> %s %s\n", "ext link", path, filename, objname);
+ HDprintf(" %-10s %s -> %s %s\n", "ext link", path, filename, objname);
HDfree(targbuf);
}
} /* end if */
else
- printf(" %-10s %s ->\n", "ext link", path);
+ HDprintf(" %-10s %s ->\n", "ext link", path);
break;
case H5L_TYPE_HARD:
@@ -997,7 +997,7 @@ trav_print_visit_lnk(const char *path, const H5L_info_t *linfo, void *udata)
case H5L_TYPE_ERROR:
case H5L_TYPE_MAX:
default:
- printf(" %-10s %s -> ???\n", "unknown type of UD link", path);
+ HDprintf(" %-10s %s -> ???\n", "unknown type of UD link", path);
break;
} /* end switch() */
diff --git a/tools/libtest/h5tools_test_utils.c b/tools/libtest/h5tools_test_utils.c
index ac8e4c0..8d489e4 100644
--- a/tools/libtest/h5tools_test_utils.c
+++ b/tools/libtest/h5tools_test_utils.c
@@ -25,27 +25,27 @@
#ifndef _H5TEST_
-#define AT() fprintf(stdout, " at %s:%d in %s()...\n", \
+#define UTIL_AT() HDfprintf(stdout, " at %s:%d in %s()...\n", \
__FILE__, __LINE__, FUNC);
-#define FAILED(msg) { \
- fprintf(stdout, "*FAILED*"); AT() \
+#define UTIL_FAILED(msg) { \
+ HDfprintf(stdout, "*FAILED*"); AT() \
if (msg == NULL) { \
- fprintf(stdout,"(NULL)\n"); \
+ HDfprintf(stdout,"(NULL)\n"); \
} else { \
- fprintf(stdout, "%s\n", msg); \
+ HDfprintf(stdout, "%s\n", msg); \
} \
- fflush(stdout); \
+ HDfflush(stdout); \
}
-#define TESTING(msg) { \
- fprintf(stdout, "TESTING %-62s", (msg)); \
- fflush(stdout); \
+#define UTIL_TESTING(msg) { \
+ HDfprintf(stdout, "TESTING %-62s", (msg)); \
+ HDfflush(stdout); \
}
-#define PASSED() { \
- fprintf(stdout, " PASSED\n"); \
- fflush(stdout); \
+#define UTIL_PASSED() { \
+ HDfprintf(stdout, " PASSED\n"); \
+ HDfflush(stdout); \
}
#endif /* ifndef _H5TEST_ */
@@ -60,7 +60,7 @@
*
* Purpose:
*
- * 1. Upon test failure, goto-jump to single-location teardown in test
+ * 1. Upon test failure, goto-jump to single-location teardown in test
* function. E.g., `error:` (consistency with HDF corpus) or
* `failed:` (reflects purpose).
* >>> using "error", in part because `H5E_BEGIN_TRY` expects it.
@@ -69,22 +69,22 @@
* requires reading of entire line to know whether this if/call is
* part of the test setup, test operation, or a test unto itself.
* 3. Provide testing macros with optional user-supplied failure message;
- * if not supplied (NULL), generate comparison output in the spirit of
+ * if not supplied (NULL), generate comparison output in the spirit of
* test-driven development. E.g., "expected 5 but was -3"
* User messages clarify test's purpose in code, encouraging description
* without relying on comments.
* 4. Configurable expected-actual order in generated comparison strings.
- * Some prefer `VERIFY(expected, actual)`, others
+ * Some prefer `VERIFY(expected, actual)`, others
* `VERIFY(actual, expected)`. Provide preprocessor ifdef switch
* to satifsy both parties, assuming one paradigm per test file.
* (One could #undef and redefine the flag through the file as desired,
* but _why_.)
*
- * Provided as courtesy, per consideration for inclusion in the library
+ * Provided as courtesy, per consideration for inclusion in the library
* proper.
*
* Macros:
- *
+ *
* JSVERIFY_EXP_ACT - ifdef flag, configures comparison order
* FAIL_IF() - check condition
* FAIL_UNLESS() - check _not_ condition
@@ -97,19 +97,19 @@
*
*****************************************************************************/
-
+
/*----------------------------------------------------------------------------
*
* ifdef flag: JSVERIFY_EXP_ACT
- *
- * JSVERIFY macros accept arguments as (EXPECTED, ACTUAL[, reason])
+ *
+ * JSVERIFY macros accept arguments as (EXPECTED, ACTUAL[, reason])
* default, if this is undefined, is (ACTUAL, EXPECTED[, reason])
*
*----------------------------------------------------------------------------
*/
#define JSVERIFY_EXP_ACT 1L
-
+
/*----------------------------------------------------------------------------
*
* Macro: JSFAILED_AT()
@@ -130,15 +130,15 @@
HDprintf("*FAILED* at %s:%d in %s()...\n", __FILE__, __LINE__, FUNC); \
}
-
+
/*----------------------------------------------------------------------------
*
* Macro: FAIL_IF()
*
- * Purpose:
+ * Purpose:
*
* Make tests more accessible and less cluttered than
- * `if (thing == otherthing()) TEST_ERROR`
+ * `if (thing == otherthing()) TEST_ERROR`
* paradigm.
*
* The following lines are roughly equivalent:
@@ -160,7 +160,7 @@ if (condition) { \
goto error; \
}
-
+
/*----------------------------------------------------------------------------
*
* Macro: FAIL_UNLESS()
@@ -169,7 +169,7 @@ if (condition) { \
*
* TEST_ERROR wrapper to reduce cognitive overhead from "negative tests",
* e.g., "a != b".
- *
+ *
* Opposite of FAIL_IF; fails if the given condition is _not_ true.
*
* `FAIL_IF( 5 != my_op() )`
@@ -189,7 +189,7 @@ if (!(condition)) { \
goto error; \
}
-
+
/*----------------------------------------------------------------------------
*
* Macro: JSERR_LONG()
@@ -225,7 +225,7 @@ if (!(condition)) { \
} \
}
-
+
/*----------------------------------------------------------------------------
*
* Macro: JSERR_STR()
@@ -266,15 +266,15 @@ if (!(condition)) { \
#ifdef JSVERIFY_EXP_ACT
-
+
/*----------------------------------------------------------------------------
*
* Macro: JSVERIFY()
*
- * Purpose:
+ * Purpose:
*
* Verify that two long integers are equal.
- * If unequal, print failure message
+ * If unequal, print failure message
* (with `reason`, if not NULL; expected/actual if NULL)
* and jump to `error` at end of function
*
@@ -289,15 +289,15 @@ if ((long)(actual) != (long)(expected)) { \
goto error; \
} /* JSVERIFY */
-
+
/*----------------------------------------------------------------------------
*
* Macro: JSVERIFY_NOT()
*
- * Purpose:
+ * Purpose:
*
* Verify that two long integers are _not_ equal.
- * If equal, print failure message
+ * If equal, print failure message
* (with `reason`, if not NULL; expected/actual if NULL)
* and jump to `error` at end of function
*
@@ -312,15 +312,15 @@ if ((long)(actual) == (long)(expected)) { \
goto error; \
} /* JSVERIFY_NOT */
-
+
/*----------------------------------------------------------------------------
*
* Macro: JSVERIFY_STR()
*
- * Purpose:
+ * Purpose:
*
* Verify that two strings are equal.
- * If unequal, print failure message
+ * If unequal, print failure message
* (with `reason`, if not NULL; expected/actual if NULL)
* and jump to `error` at end of function
*
@@ -335,11 +335,11 @@ if (HDstrcmp((actual), (expected)) != 0) { \
goto error; \
} /* JSVERIFY_STR */
-
+
#else /* JSVERIFY_EXP_ACT not defined */
/* Repeats macros above, but with actual/expected parameters reversed. */
-
+
/*----------------------------------------------------------------------------
* Macro: JSVERIFY()
* See: JSVERIFY documentation above.
@@ -353,7 +353,7 @@ if ((long)(actual) != (long)(expected)) { \
goto error; \
} /* JSVERIFY */
-
+
/*----------------------------------------------------------------------------
* Macro: JSVERIFY_NOT()
* See: JSVERIFY_NOT documentation above.
@@ -367,7 +367,7 @@ if ((long)(actual) == (long)(expected)) { \
goto error; \
} /* JSVERIFY_NOT */
-
+
/*----------------------------------------------------------------------------
* Macro: JSVERIFY_STR()
* See: JSVERIFY_STR documentation above.
@@ -392,12 +392,12 @@ if (HDstrcmp((actual), (expected)) != 0) { \
/* TEST FUNCTIONS */
/******************/
-
+
/*----------------------------------------------------------------------------
*
* Function: test_parse_tuple()
*
- * Purpose:
+ * Purpose:
*
* Provide unit tests and specification for the `parse_tuple()` function.
*
@@ -548,7 +548,7 @@ test_parse_tuple(void)
- TESTING("arbitrary-count tuple parsing");
+ UTIL_TESTING("arbitrary-count tuple parsing");
#if H5TOOLS_UTILS_TEST_DEBUG > 0
show_progress = TRUE;
@@ -566,13 +566,12 @@ test_parse_tuple(void)
HDassert(cpy == NULL);
tc = cases[i];
if (show_progress == TRUE) {
- printf("testing %d: %s...\n", i, tc.test_msg);
+ HDprintf("testing %d: %s...\n", i, tc.test_msg);
}
/* VERIFY
*/
- success = parse_tuple(tc.in_str, tc.sep,
- &cpy, &count, &parsed);
+ success = parse_tuple(tc.in_str, tc.sep, &cpy, &count, &parsed);
JSVERIFY( tc.exp_ret, success, "function returned incorrect value" )
JSVERIFY( tc.exp_nelems, count, NULL )
@@ -584,9 +583,9 @@ test_parse_tuple(void)
/* TEARDOWN */
HDassert(parsed != NULL);
HDassert(cpy != NULL);
- free(parsed);
+ HDfree(parsed);
parsed = NULL;
- free(cpy);
+ HDfree(cpy);
cpy = NULL;
} else {
FAIL_IF( parsed != NULL )
@@ -602,14 +601,14 @@ error:
* CLEANUP *
***********/
- if (parsed != NULL) free(parsed);
- if (cpy != NULL) free(cpy);
+ if (parsed != NULL) HDfree(parsed);
+ if (cpy != NULL) HDfree(cpy);
return 1;
} /* test_parse_tuple */
-
+
/*----------------------------------------------------------------------------
*
* Function: test_populate_ros3_fa()
@@ -642,12 +641,12 @@ test_populate_ros3_fa(void)
int bad_version = 0xf87a; /* arbitrarily wrong version number */
#endif /* H5_HAVE_ROS3_VFD */
- TESTING("programmatic ros3 fapl population");
+ UTIL_TESTING("programmatic ros3 fapl population");
#ifndef H5_HAVE_ROS3_VFD
- puts(" -SKIP-");
- puts(" Read-Only S3 VFD not enabled");
- fflush(stdout);
+ HDputs(" -SKIP-");
+ HDputs(" Read-Only S3 VFD not enabled");
+ HDfflush(stdout);
return 0;
#else
#if H5TOOLS_UTILS_TEST_DEBUG > 0
@@ -687,7 +686,7 @@ test_populate_ros3_fa(void)
JSVERIFY_STR( "", fa.secret_key, NULL )
}
- /* all-empty values
+ /* all-empty values
* yields default fapl
*/
{
@@ -705,7 +704,7 @@ test_populate_ros3_fa(void)
JSVERIFY_STR( "", fa.secret_key, NULL )
}
- /* successfully set fapl with values
+ /* successfully set fapl with values
* excess value is ignored
*/
{
@@ -985,7 +984,7 @@ error :
} /* test_populate_ros3_fa */
-
+
/*----------------------------------------------------------------------------
*
* Function: test_set_configured_fapl()
@@ -1173,7 +1172,7 @@ test_set_configured_fapl(void)
n_cases += 5;
#endif /* H5_HAVE_LIBHDFS */
- TESTING("programmatic fapl set");
+ UTIL_TESTING("programmatic fapl set");
for (unsigned i = 0; i < n_cases; i++) {
int result;
@@ -1247,7 +1246,7 @@ error :
#undef UTIL_TEST_CREATE
} /* test_set_configured_fapl */
-
+
/*----------------------------------------------------------------------------
*
* Function: main()
diff --git a/tools/src/h5copy/h5copy.c b/tools/src/h5copy/h5copy.c
index 1800810..9490cd9 100644
--- a/tools/src/h5copy/h5copy.c
+++ b/tools/src/h5copy/h5copy.c
@@ -381,10 +381,10 @@ main (int argc, const char *argv[])
*-------------------------------------------------------------------------*/
if (verbose) {
- printf("Copying file <%s> and object <%s> to file <%s> and object <%s>\n",
+ HDprintf("Copying file <%s> and object <%s> to file <%s> and object <%s>\n",
fname_src, oname_src, fname_dst, oname_dst);
if (flag) {
- printf("Using %s flag\n", str_flag);
+ HDprintf("Using %s flag\n", str_flag);
}
}
@@ -419,7 +419,7 @@ main (int argc, const char *argv[])
/* Display some output if requested */
if(verbose)
- printf("%s: Creating parent groups\n", h5tools_getprogname());
+ HDprintf("%s: Creating parent groups\n", h5tools_getprogname());
} /* end if */
else {
/* error, if parent groups doesn't already exist in destination file */
@@ -490,7 +490,7 @@ main (int argc, const char *argv[])
leave(EXIT_SUCCESS);
done:
- printf("Error in copy...Exiting\n");
+ HDprintf("Error in copy...Exiting\n");
/* free link info path */
if (linkinfo.trg_path)
diff --git a/tools/src/h5diff/h5diff_common.c b/tools/src/h5diff/h5diff_common.c
index 0c1521e..362e3f2 100644
--- a/tools/src/h5diff/h5diff_common.c
+++ b/tools/src/h5diff/h5diff_common.c
@@ -62,9 +62,9 @@ static void check_options(diff_opt_t* opts)
* These options are mutually exclusive.
*/
if ((opts->d + opts->p + opts->use_system_epsilon) > 1) {
- printf("%s error: -d, -p and --use-system-epsilon options are mutually-exclusive;\n", PROGRAMNAME);
- printf("use no more than one.\n");
- printf("Try '-h' or '--help' option for more information or see the %s entry in the 'HDF5 Reference Manual'.\n", PROGRAMNAME);
+ HDprintf("%s error: -d, -p and --use-system-epsilon options are mutually-exclusive;\n", PROGRAMNAME);
+ HDprintf("use no more than one.\n");
+ HDprintf("Try '-h' or '--help' option for more information or see the %s entry in the 'HDF5 Reference Manual'.\n", PROGRAMNAME);
h5diff_exit(EXIT_FAILURE);
}
}
@@ -186,7 +186,7 @@ void parse_command_line(int argc,
/* create linked list of excluding objects */
if( (exclude_node = (struct exclude_path_list*) HDmalloc(sizeof(struct exclude_path_list))) == NULL) {
- printf("Error: lack of memory!\n");
+ HDprintf("Error: lack of memory!\n");
h5diff_exit(EXIT_FAILURE);
}
@@ -212,7 +212,7 @@ void parse_command_line(int argc,
opts->d=1;
if (check_d_input(opt_arg) == - 1) {
- printf("<-d %s> is not a valid option\n", opt_arg);
+ HDprintf("<-d %s> is not a valid option\n", opt_arg);
usage();
h5diff_exit(EXIT_FAILURE);
}
@@ -226,7 +226,7 @@ void parse_command_line(int argc,
case 'p':
opts->p=1;
if (check_p_input(opt_arg) == -1) {
- printf("<-p %s> is not a valid option\n", opt_arg);
+ HDprintf("<-p %s> is not a valid option\n", opt_arg);
usage();
h5diff_exit(EXIT_FAILURE);
}
@@ -240,7 +240,7 @@ void parse_command_line(int argc,
case 'n':
opts->n=1;
if ( check_n_input(opt_arg) == -1) {
- printf("<-n %s> is not a valid option\n", opt_arg);
+ HDprintf("<-n %s> is not a valid option\n", opt_arg);
usage();
h5diff_exit(EXIT_FAILURE);
}
@@ -309,20 +309,20 @@ void parse_command_line(int argc,
return;
if (opts->cmn_objs == 0) {
- printf("No common objects found. Files are not comparable.\n");
+ HDprintf("No common objects found. Files are not comparable.\n");
if (!opts->m_verbose)
- printf("Use -v for a list of objects.\n");
+ HDprintf("Use -v for a list of objects.\n");
}
if (opts->not_cmp == 1) {
if (opts->m_list_not_cmp == 0) {
- printf("--------------------------------\n");
- printf("Some objects are not comparable\n");
- printf("--------------------------------\n");
+ HDprintf("--------------------------------\n");
+ HDprintf("Some objects are not comparable\n");
+ HDprintf("--------------------------------\n");
if (opts->m_verbose)
- printf("Use -c for a list of objects without details of differences.\n");
+ HDprintf("Use -c for a list of objects without details of differences.\n");
else
- printf("Use -c for a list of objects.\n");
+ HDprintf("Use -c for a list of objects.\n");
}
}
}
diff --git a/tools/src/h5diff/ph5diff_main.c b/tools/src/h5diff/ph5diff_main.c
index 83240cb..380ab3b 100644
--- a/tools/src/h5diff/ph5diff_main.c
+++ b/tools/src/h5diff/ph5diff_main.c
@@ -68,7 +68,7 @@ int main(int argc, const char *argv[])
if(g_nTasks == 1)
{
- printf("Only 1 task available...doing serial diff\n");
+ HDprintf("Only 1 task available...doing serial diff\n");
g_Parallel = 0;
@@ -148,12 +148,12 @@ ph5diff_worker(int nID)
/* Open the files */
if ((file1_id = H5Fopen (filenames[0], H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
{
- printf ("h5diff Task [%d]: <%s>: unable to open file\n", nID, filenames[0]);
+ HDprintf("h5diff Task [%d]: <%s>: unable to open file\n", nID, filenames[0]);
MPI_Abort(MPI_COMM_WORLD, 0);
}
if ((file2_id = H5Fopen (filenames[1], H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
{
- printf ("h5diff Task [%d]: <%s>: unable to open file\n", nID, filenames[1]);
+ HDprintf("h5diff Task [%d]: <%s>: unable to open file\n", nID, filenames[1]);
MPI_Abort(MPI_COMM_WORLD, 0);
}
/* enable error reporting */
@@ -170,7 +170,7 @@ ph5diff_worker(int nID)
/* Make certain we've received the filenames and opened the files already */
if(file1_id < 0 || file2_id < 0)
{
- printf("ph5diff_worker: ERROR: work received before/without filenames\n");
+ HDprintf("ph5diff_worker: ERROR: work received before/without filenames\n");
break;
}
@@ -199,7 +199,7 @@ ph5diff_worker(int nID)
char out_data[PRINT_DATA_MAX_SIZE];
int tmp;
- memset(out_data, 0, PRINT_DATA_MAX_SIZE);
+ HDmemset(out_data, 0, PRINT_DATA_MAX_SIZE);
i=0;
rewind(overflow_file);
@@ -210,7 +210,7 @@ ph5diff_worker(int nID)
{
MPI_Send(out_data, PRINT_DATA_MAX_SIZE, MPI_BYTE, 0, MPI_TAG_PRINT_DATA, MPI_COMM_WORLD);
i=0;
- memset(out_data, 0, PRINT_DATA_MAX_SIZE);
+ HDmemset(out_data, 0, PRINT_DATA_MAX_SIZE);
}
}
@@ -221,8 +221,8 @@ ph5diff_worker(int nID)
overflow_file = NULL;
}
- fflush(stdout);
- memset(outBuff, 0, OUTBUFF_SIZE);
+ HDfflush(stdout);
+ HDmemset(outBuff, 0, OUTBUFF_SIZE);
outBuffOffset = 0;
MPI_Send(&diffs, sizeof(diffs), MPI_BYTE, 0, MPI_TAG_TOK_RETURN, MPI_COMM_WORLD);
@@ -238,7 +238,7 @@ ph5diff_worker(int nID)
}
else
{
- printf("ph5diff_worker: ERROR: invalid tag (%d) received\n", Status.MPI_TAG);
+ HDprintf("ph5diff_worker: ERROR: invalid tag (%d) received\n", Status.MPI_TAG);
break;
}
@@ -266,14 +266,14 @@ void print_manager_output(void)
/* If there was something we buffered, let's print it now */
if( (outBuffOffset>0) && g_Parallel)
{
- printf("%s", outBuff);
+ HDprintf("%s", outBuff);
if(overflow_file)
{
int tmp;
rewind(overflow_file);
- while((tmp = getc(overflow_file)) >= 0)
- putchar(tmp);
+ while((tmp = HDgetc(overflow_file)) >= 0)
+ HDputchar(tmp);
fclose(overflow_file);
overflow_file = NULL;
}
@@ -321,6 +321,6 @@ void h5diff_exit(int status)
/* Always exit(0), since MPI implementations do weird stuff when they
* receive a non-zero exit value. - QAK
*/
- exit(0);
+ HDexit(0);
}
diff --git a/tools/src/h5dump/h5dump_ddl.c b/tools/src/h5dump/h5dump_ddl.c
index 821d2c7..e66a1c5 100644
--- a/tools/src/h5dump/h5dump_ddl.c
+++ b/tools/src/h5dump/h5dump_ddl.c
@@ -865,7 +865,7 @@ dump_group(hid_t gid, const char *name)
if(!type_table->objs[u].recorded) {
dset = H5Dopen2(gid, type_table->objs[u].objname, H5P_DEFAULT);
type = H5Dget_type(dset);
- sprintf(type_name, "#"H5_PRINTF_HADDR_FMT, type_table->objs[u].objno);
+ HDsprintf(type_name, "#"H5_PRINTF_HADDR_FMT, type_table->objs[u].objno);
dump_function_table->dump_named_datatype_function(type, type_name);
H5Tclose(type);
H5Dclose(dset);
@@ -2024,7 +2024,7 @@ handle_datatypes(hid_t fid, const char *type, void H5_ATTR_UNUSED * data, int pe
if(!type_table->objs[idx].recorded) {
/* unamed datatype */
- sprintf(name, "/#"H5_PRINTF_HADDR_FMT, type_table->objs[idx].objno);
+ HDsprintf(name, "/#"H5_PRINTF_HADDR_FMT, type_table->objs[idx].objno);
if(!HDstrcmp(name, real_name))
break;
diff --git a/tools/src/h5dump/h5dump_xml.c b/tools/src/h5dump/h5dump_xml.c
index fc56433..c4fd948 100644
--- a/tools/src/h5dump/h5dump_xml.c
+++ b/tools/src/h5dump/h5dump_xml.c
@@ -588,7 +588,7 @@ xml_name_to_XID(const char *str , char *outstr, int outlen, int gen)
if (objno == HADDR_UNDEF) {
if (gen) {
objno = ref_path_table_gen_fake(str);
- sprintf(outstr, "xid_"H5_PRINTF_HADDR_FMT, objno);
+ HDsprintf(outstr, "xid_"H5_PRINTF_HADDR_FMT, objno);
return 0;
}
else {
@@ -599,7 +599,7 @@ xml_name_to_XID(const char *str , char *outstr, int outlen, int gen)
else {
if (gen) {
objno = ref_path_table_gen_fake(str);
- sprintf(outstr, "xid_"H5_PRINTF_HADDR_FMT, objno);
+ HDsprintf(outstr, "xid_"H5_PRINTF_HADDR_FMT, objno);
return 0;
}
else {
@@ -608,7 +608,7 @@ xml_name_to_XID(const char *str , char *outstr, int outlen, int gen)
}
}
- sprintf(outstr, "xid_"H5_PRINTF_HADDR_FMT, objno);
+ HDsprintf(outstr, "xid_"H5_PRINTF_HADDR_FMT, objno);
return(0);
}
@@ -2686,7 +2686,7 @@ xml_dump_group(hid_t gid, const char *name)
if(!type_table->objs[u].recorded) {
dset = H5Dopen2(gid, type_table->objs[u].objname, H5P_DEFAULT);
type = H5Dget_type(dset);
- sprintf(type_name, "#"H5_PRINTF_HADDR_FMT, type_table->objs[u].objno);
+ HDsprintf(type_name, "#"H5_PRINTF_HADDR_FMT, type_table->objs[u].objno);
dump_function_table->dump_named_datatype_function(type, type_name);
H5Tclose(type);
H5Dclose(dset);
@@ -2768,7 +2768,7 @@ xml_dump_group(hid_t gid, const char *name)
if(!type_table->objs[u].recorded) {
dset = H5Dopen2(gid, type_table->objs[u].objname, H5P_DEFAULT);
type = H5Dget_type(dset);
- sprintf(type_name, "#"H5_PRINTF_HADDR_FMT, type_table->objs[u].objno);
+ HDsprintf(type_name, "#"H5_PRINTF_HADDR_FMT, type_table->objs[u].objno);
dump_function_table->dump_named_datatype_function(type, type_name);
H5Tclose(type);
H5Dclose(dset);
diff --git a/tools/src/h5repack/h5repack.c b/tools/src/h5repack/h5repack.c
index e96dea5..c18df6c 100644
--- a/tools/src/h5repack/h5repack.c
+++ b/tools/src/h5repack/h5repack.c
@@ -483,7 +483,7 @@ copy_attr(hid_t loc_in, hid_t loc_out, named_dt_t **named_dt_head_p,
} /*H5T_REFERENCE*/
if (options->verbose)
- printf(FORMAT_OBJ_ATTR, "attr", name);
+ HDprintf(FORMAT_OBJ_ATTR, "attr", name);
/*-------------------------------------------------------------------------
* close
@@ -545,7 +545,7 @@ static int check_options(pack_opt_t *options) {
*/
if (options->verbose && have_request(options) /* only print if requested */) {
if (options->all_layout == 1) {
- printf("All objects to modify layout are...\n");
+ HDprintf("All objects to modify layout are...\n");
switch (options->layout_g) {
case H5D_COMPACT:
strcpy(slayout, "compact");
@@ -566,17 +566,17 @@ static int check_options(pack_opt_t *options) {
strcpy(slayout, "invalid layout\n");
HGOTO_DONE(FAIL);
}
- printf(" Apply %s layout to all", slayout);
+ HDprintf(" Apply %s layout to all", slayout);
if (H5D_CHUNKED == options->layout_g) {
- printf("with dimension [ ");
+ HDprintf("with dimension [ ");
for (j = 0; j < options->chunk_g.rank; j++)
- printf("%d ", (int) options->chunk_g.chunk_lengths[j]);
- printf("]");
+ HDprintf("%d ", (int) options->chunk_g.chunk_lengths[j]);
+ HDprintf("]");
}
- printf("\n");
+ HDprintf("\n");
}
else
- printf("No all objects to modify layout\n");
+ HDprintf("No all objects to modify layout\n");
}/* verbose */
for (i = 0; i < options->op_tbl->nelems; i++) {
@@ -584,16 +584,16 @@ static int check_options(pack_opt_t *options) {
if (options->op_tbl->objs[i].chunk.rank > 0) {
if (options->verbose) {
- printf(" <%s> with chunk size ", name);
+ HDprintf(" <%s> with chunk size ", name);
for (k = 0; k < options->op_tbl->objs[i].chunk.rank; k++)
- printf("%d ", (int) options->op_tbl->objs[i].chunk.chunk_lengths[k]);
- printf("\n");
+ HDprintf("%d ", (int) options->op_tbl->objs[i].chunk.chunk_lengths[k]);
+ HDprintf("\n");
}
has_ck = 1;
}
else if (options->op_tbl->objs[i].chunk.rank == -2) {
if (options->verbose)
- printf(" <%s> %s\n", name, "NONE (contiguous)");
+ HDprintf(" <%s> %s\n", name, "NONE (contiguous)");
has_ck = 1;
}
}
@@ -608,33 +608,33 @@ static int check_options(pack_opt_t *options) {
if (options->verbose && have_request(options) /* only print if requested */) {
if (options->all_filter == 1) {
- printf("All objects to apply filter are...\n");
+ HDprintf("All objects to apply filter are...\n");
for (k = 0; k < options->n_filter_g; k++) {
H5Z_filter_t filtn = options->filter_g[k].filtn;
if (filtn < 0) {
- printf(" Unknown\n");
+ HDprintf(" Unknown\n");
continue;
}
switch (filtn) {
case H5Z_FILTER_NONE:
- printf(" Uncompress all\n");
+ HDprintf(" Uncompress all\n");
break;
case H5Z_FILTER_SHUFFLE:
case H5Z_FILTER_FLETCHER32:
- printf(" All with %s\n", get_sfilter(filtn));
+ HDprintf(" All with %s\n", get_sfilter(filtn));
break;
case H5Z_FILTER_SZIP:
case H5Z_FILTER_DEFLATE:
- printf(" All with %s, parameter %d\n", get_sfilter(filtn), options->filter_g[k].cd_values[0]);
+ HDprintf(" All with %s, parameter %d\n", get_sfilter(filtn), options->filter_g[k].cd_values[0]);
break;
default:
- printf(" User Defined %d\n", filtn);
+ HDprintf(" User Defined %d\n", filtn);
break;
} /* k */
};
}
else
- printf("No all objects to apply filter\n");
+ HDprintf("No all objects to apply filter\n");
} /* verbose */
for (i = 0; i < options->op_tbl->nelems; i++) {
@@ -645,9 +645,9 @@ static int check_options(pack_opt_t *options) {
if (options->verbose) {
if(pack.filter[j].filtn >= 0) {
if(pack.filter[j].filtn > H5Z_FILTER_SCALEOFFSET)
- printf(" <%s> with %s filter %d\n", name, get_sfilter(pack.filter[j].filtn), pack.filter[j].filtn);
+ HDprintf(" <%s> with %s filter %d\n", name, get_sfilter(pack.filter[j].filtn), pack.filter[j].filtn);
else
- printf(" <%s> with %s filter\n", name, get_sfilter(pack.filter[j].filtn));
+ HDprintf(" <%s> with %s filter\n", name, get_sfilter(pack.filter[j].filtn));
}
}
has_cp = 1;
@@ -678,7 +678,7 @@ static int check_options(pack_opt_t *options) {
*/
if (options->ublock_filename != NULL && options->ublock_size == 0) {
if (options->verbose) {
- printf("Warning: user block size missing for file %s. Assigning a default size of 1024...\n", options->ublock_filename);
+ HDprintf("Warning: user block size missing for file %s. Assigning a default size of 1024...\n", options->ublock_filename);
options->ublock_size = 1024;
}
}
@@ -747,19 +747,19 @@ static int check_objects(const char* fname, pack_opt_t *options) {
*/
if (options->verbose)
- printf("Opening file. Searching %zu objects to modify ...\n", travt->nobjs);
+ HDprintf("Opening file. Searching %zu objects to modify ...\n", travt->nobjs);
for (i = 0; i < options->op_tbl->nelems; i++) {
char* name = options->op_tbl->objs[i].path;
if (options->verbose)
- printf(" <%s>", name);
+ HDprintf(" <%s>", name);
/* the input object names are present in the file and are valid */
if (h5trav_getindext(name, travt) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "%s Could not find <%s> in file <%s>. Exiting...\n",
(options->verbose ? "\n" : ""), name, fname);
if (options->verbose)
- printf("...Found\n");
+ HDprintf("...Found\n");
for (ifil = 0; ifil < options->op_tbl->objs[i].nfilters; ifil++) {
if (options->op_tbl->objs[i].filter[ifil].filtn < 0)
@@ -799,7 +799,7 @@ static int check_objects(const char* fname, pack_opt_t *options) {
}
if (csize < ppb) {
- printf(" <warning: SZIP settings, chunk size is smaller than pixels per block>\n");
+ HDprintf(" <warning: SZIP settings, chunk size is smaller than pixels per block>\n");
HGOTO_DONE(0);
}
}
diff --git a/tools/src/h5repack/h5repack_copy.c b/tools/src/h5repack/h5repack_copy.c
index 8122d6d..13adb7c 100644
--- a/tools/src/h5repack/h5repack_copy.c
+++ b/tools/src/h5repack/h5repack_copy.c
@@ -296,7 +296,7 @@ print_user_block(fnamein, fidin);
*-------------------------------------------------------------------------
*/
if (options->verbose)
- printf("Making new file ...\n");
+ HDprintf("Making new file ...\n");
if ((fidout = H5Fcreate(fnameout, H5F_ACC_TRUNC, fcpl, fapl)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Fcreate could not create file <%s>:", fnameout);
@@ -624,9 +624,9 @@ int do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt,
*/
if (options->verbose) {
- printf("-----------------------------------------\n");
- printf(" Type Filter (Compression) Name\n");
- printf("-----------------------------------------\n");
+ HDprintf("-----------------------------------------\n");
+ HDprintf(" Type Filter (Compression) Name\n");
+ HDprintf("-----------------------------------------\n");
}
if (travt->objs) {
@@ -645,7 +645,7 @@ int do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt,
*/
case H5TRAV_TYPE_GROUP:
if (options->verbose)
- printf(FORMAT_OBJ, "group", travt->objs[i].name);
+ HDprintf(FORMAT_OBJ, "group", travt->objs[i].name);
/* open input group */
if ((grp_in = H5Gopen2(fidin, travt->objs[i].name, H5P_DEFAULT)) < 0)
@@ -880,7 +880,7 @@ int do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt,
if (dset_out == FAIL) {
H5Epush2(H5tools_ERR_STACK_g, __FILE__, FUNC, __LINE__, H5tools_ERR_CLS_g, H5E_tools_g, H5E_tools_min_id_g, "H5Dcreate2 failed");
if (options->verbose)
- printf(" warning: could not create dataset <%s>. Applying original settings\n", travt->objs[i].name);
+ HDprintf(" warning: could not create dataset <%s>. Applying original settings\n", travt->objs[i].name);
if ((dset_out = H5Dcreate2(fidout, travt->objs[i].name, wtype_id, f_space_id, H5P_DEFAULT, dcpl_in, H5P_DEFAULT)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dcreate2 failed");
@@ -1043,10 +1043,10 @@ int do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt,
(in case there was a filter)
*/
if (has_filter && apply_s == 0)
- printf(" <warning: filter not applied to %s. dataset smaller than %d bytes>\n", travt->objs[i].name, (int) options->min_comp);
+ HDprintf(" <warning: filter not applied to %s. dataset smaller than %d bytes>\n", travt->objs[i].name, (int) options->min_comp);
if (has_filter && apply_f == 0)
- printf(" <warning: could not apply the filter to %s>\n", travt->objs[i].name);
+ HDprintf(" <warning: could not apply the filter to %s>\n", travt->objs[i].name);
} /* verbose */
/*-------------------------------------------------------------------------
@@ -1127,7 +1127,7 @@ int do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt,
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dclose failed");
if (options->verbose)
- printf(FORMAT_OBJ, "dset", travt->objs[i].name);
+ HDprintf(FORMAT_OBJ, "dset", travt->objs[i].name);
} /* end do we have request for filter/chunking */
break;
@@ -1138,7 +1138,7 @@ int do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt,
*/
case H5TRAV_TYPE_NAMED_DATATYPE:
if (options->verbose)
- printf(FORMAT_OBJ, "type", travt->objs[i].name);
+ HDprintf(FORMAT_OBJ, "type", travt->objs[i].name);
if ((type_in = H5Topen2(fidin, travt->objs[i].name, H5P_DEFAULT)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Topen2 failed");
@@ -1177,13 +1177,13 @@ int do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt,
case H5TRAV_TYPE_LINK:
case H5TRAV_TYPE_UDLINK:
if (options->verbose)
- printf(FORMAT_OBJ, "link", travt->objs[i].name);
+ HDprintf(FORMAT_OBJ, "link", travt->objs[i].name);
if (H5Lcopy(fidin, travt->objs[i].name, fidout, travt->objs[i].name, H5P_DEFAULT, H5P_DEFAULT) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Lcopy failed");
if (options->verbose)
- printf(FORMAT_OBJ, "link", travt->objs[i].name);
+ HDprintf(FORMAT_OBJ, "link", travt->objs[i].name);
break;
default:
@@ -1278,7 +1278,7 @@ print_dataset_info(hid_t dcpl_id, char *objname, double ratio, int pr)
{
unsigned level = cd_values[0];
- sprintf(temp,"(%d)", level);
+ HDsprintf(temp,"(%d)", level);
HDstrcat(strfilter, temp);
}
#endif
@@ -1292,7 +1292,7 @@ print_dataset_info(hid_t dcpl_id, char *objname, double ratio, int pr)
unsigned options_mask = cd_values[0]; /* from dcpl, not filt*/
unsigned ppb = cd_values[1];
- sprintf(temp,"(%d,", ppb);
+ HDsprintf(temp,"(%d,", ppb);
HDstrcat(strfilter, temp);
if (options_mask & H5_SZIP_EC_OPTION_MASK)
HDstrcpy(temp, "EC) ");
@@ -1326,15 +1326,15 @@ print_dataset_info(hid_t dcpl_id, char *objname, double ratio, int pr)
}/*i*/
if (!pr)
- printf(FORMAT_OBJ, "dset", objname);
+ HDprintf(FORMAT_OBJ, "dset", objname);
else {
char str[512], temp[512];
HDstrcpy(str, "dset ");
HDstrcat(str, strfilter);
- sprintf(temp, " (%.3f:1)", ratio);
+ HDsprintf(temp, " (%.3f:1)", ratio);
HDstrcat(str, temp);
- printf(FORMAT_OBJ, str, objname);
+ HDprintf(FORMAT_OBJ, str, objname);
}
}
@@ -1461,10 +1461,10 @@ print_user_block(const char *filename, hid_t fid)
for (i = 0; i < nread; i++) {
- printf("%c ", rbuf[i]);
+ HDprintf("%c ", rbuf[i]);
}
- printf("\n");
+ HDprintf("\n");
if (nread < 0) {
HGOTO_ERROR(H5E_tools_g, H5E_tools_min_id_g, "nread < 0");
diff --git a/tools/src/h5repack/h5repack_refs.c b/tools/src/h5repack/h5repack_refs.c
index f5846ba..7e8951f 100644
--- a/tools/src/h5repack/h5repack_refs.c
+++ b/tools/src/h5repack/h5repack_refs.c
@@ -158,7 +158,7 @@ int do_copy_refobjs(hid_t fidin,
if(nelmts) {
buf = (hobj_ref_t *)HDmalloc((unsigned)(nelmts * msize));
if(buf==NULL) {
- printf("cannot read into memory\n" );
+ HDprintf("cannot read into memory\n" );
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "HDmalloc failed");
} /* end if */
if(H5Dread(dset_in, mtype_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
@@ -166,7 +166,7 @@ int do_copy_refobjs(hid_t fidin,
refbuf = (hobj_ref_t*) HDcalloc((unsigned)nelmts, msize);
if(refbuf == NULL){
- printf("cannot allocate memory\n" );
+ HDprintf("cannot allocate memory\n" );
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "HDcalloc failed");
} /* end if */
for(u = 0; u < nelmts; u++) {
@@ -183,8 +183,8 @@ int do_copy_refobjs(hid_t fidin,
if(H5Rcreate(&refbuf[u], fidout, refname, H5R_OBJECT, (hid_t)-1) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Rcreate failed");
if(options->verbose) {
- printf(FORMAT_OBJ,"dset",travt->objs[i].name );
- printf("object <%s> object reference created to <%s>\n",
+ HDprintf(FORMAT_OBJ,"dset",travt->objs[i].name );
+ HDprintf("object <%s> object reference created to <%s>\n",
travt->objs[i].name,
refname);
}
@@ -234,7 +234,7 @@ int do_copy_refobjs(hid_t fidin,
if(nelmts) {
buf = (hdset_reg_ref_t *)HDmalloc((unsigned)(nelmts * msize));
if(buf == NULL) {
- printf("cannot read into memory\n");
+ HDprintf("cannot read into memory\n");
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "HDmalloc failed");
} /* end if */
if(H5Dread(dset_in, mtype_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
@@ -246,7 +246,7 @@ int do_copy_refobjs(hid_t fidin,
*/
refbuf = (hdset_reg_ref_t *)HDcalloc(sizeof(hdset_reg_ref_t), (size_t)nelmts); /*init to zero */
if(refbuf == NULL) {
- printf("cannot allocate memory\n");
+ HDprintf("cannot allocate memory\n");
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "HDcalloc failed");
} /* end if */
@@ -271,8 +271,8 @@ int do_copy_refobjs(hid_t fidin,
if(H5Sclose(region_id) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sclose failed");
if(options->verbose) {
- printf(FORMAT_OBJ,"dset",travt->objs[i].name );
- printf("object <%s> region reference created to <%s>\n",
+ HDprintf(FORMAT_OBJ,"dset",travt->objs[i].name );
+ HDprintf("object <%s> region reference created to <%s>\n",
travt->objs[i].name,
refname);
}
@@ -590,7 +590,7 @@ static int copy_refs_attr(hid_t loc_in,
if((is_ref || is_ref_array) && (H5R_OBJ_REF_BUF_SIZE==msize)) {
buf = (hobj_ref_t *)HDmalloc((unsigned)(nelmts * msize));
if(buf == NULL) {
- printf("cannot read into memory\n");
+ HDprintf("cannot read into memory\n");
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "HDmalloc failed");
} /* end if */
if(H5Aread(attr_id, mtype_id, buf) < 0)
@@ -598,7 +598,7 @@ static int copy_refs_attr(hid_t loc_in,
refbuf = (hobj_ref_t *)HDcalloc((unsigned)nelmts, msize);
if(refbuf == NULL) {
- printf("cannot allocate memory\n");
+ HDprintf("cannot allocate memory\n");
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "HDcalloc failed");
} /* end if */
@@ -611,7 +611,7 @@ static int copy_refs_attr(hid_t loc_in,
buf = (hdset_reg_ref_t *)HDmalloc((unsigned)(nelmts * msize));
if(buf == NULL) {
- printf( "cannot read into memory\n" );
+ HDprintf( "cannot read into memory\n" );
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "HDmalloc failed");
} /* end if */
if(H5Aread(attr_id, mtype_id, buf) < 0)
@@ -623,7 +623,7 @@ static int copy_refs_attr(hid_t loc_in,
*/
refbuf = (hdset_reg_ref_t *)HDcalloc(sizeof(hdset_reg_ref_t), (size_t)nelmts); /*init to zero */
if(refbuf == NULL) {
- printf( "cannot allocate memory\n" );
+ HDprintf( "cannot allocate memory\n" );
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "HDcalloc failed");
} /* end if */
@@ -638,7 +638,7 @@ static int copy_refs_attr(hid_t loc_in,
refbuf = buf; /* reuse the read buffer for write */
if(buf == NULL) {
- printf( "cannot read into memory\n" );
+ HDprintf( "cannot read into memory\n" );
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "HDmalloc failed");
} /* end if */
@@ -679,7 +679,7 @@ static int copy_refs_attr(hid_t loc_in,
refbuf = buf; /* reuse the read buffer for write */
if(buf == NULL) {
- printf( "cannot read into memory\n" );
+ HDprintf( "cannot read into memory\n" );
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "HDmalloc failed");
} /* end if */
diff --git a/tools/src/h5stat/h5stat.c b/tools/src/h5stat/h5stat.c
index 75d325a..9528d2c 100644
--- a/tools/src/h5stat/h5stat.c
+++ b/tools/src/h5stat/h5stat.c
@@ -396,12 +396,12 @@ attribute_stats(iter_t *iter, const H5O_info_t *oi)
/* Add attribute count to proper bin */
bin = ceil_log10((unsigned long)oi->num_attrs);
if((bin + 1) > iter->attr_nbins) {
- iter->attr_bins = (unsigned long *)HDrealloc(iter->attr_bins, (bin + 1) * sizeof(unsigned long));
+ iter->attr_bins = (unsigned long *)HDrealloc(iter->attr_bins, (bin + 1) * sizeof(unsigned long));
HDassert(iter->attr_bins);
/* Initialize counts for intermediate bins */
while(iter->attr_nbins < bin)
- iter->attr_bins[iter->attr_nbins++] = 0;
+ iter->attr_bins[iter->attr_nbins++] = 0;
iter->attr_nbins++;
/* Initialize count for new bin */
@@ -549,7 +549,7 @@ dataset_stats(iter_t *iter, const char *name, const H5O_info_t *oi)
/* Get storage info */
/* Failure 0 indistinguishable from no-data-stored 0 */
- storage = H5Dget_storage_size(did);
+ storage = H5Dget_storage_size(did);
/* Gather layout statistics */
if((dcpl = H5Dget_create_plist(did)) < 0)
@@ -574,7 +574,8 @@ dataset_stats(iter_t *iter, const char *name, const H5O_info_t *oi)
if(num_ext) {
iter->nexternal += (unsigned long)num_ext;
iter->dset_external_storage_size += (unsigned long)storage;
- } else
+ }
+ else
iter->dset_storage_size += storage;
/* Gather dataspace statistics */
@@ -971,7 +972,8 @@ parse_command_line(int argc, const char *argv[], struct handler_t **hand_ret)
error_msg("Invalid threshold for small groups\n");
goto error;
}
- } else
+ }
+ else
error_msg("Missing threshold for small groups\n");
break;
@@ -993,7 +995,8 @@ parse_command_line(int argc, const char *argv[], struct handler_t **hand_ret)
error_msg("Invalid threshold for small datasets\n");
goto error;
}
- } else
+ }
+ else
error_msg("Missing threshold for small datasets\n");
break;
@@ -1015,7 +1018,8 @@ parse_command_line(int argc, const char *argv[], struct handler_t **hand_ret)
error_msg("Invalid threshold for small # of attributes\n");
goto error;
}
- } else
+ }
+ else
error_msg("Missing threshold for small # of attributes\n");
break;
@@ -1066,8 +1070,7 @@ parse_command_line(int argc, const char *argv[], struct handler_t **hand_ret)
char **cred = NULL;
char const *ccred[3];
- if (FAIL == parse_tuple((const char *)opt_arg, ',',
- &cred_str, &nelems, &cred)) {
+ if (FAIL == parse_tuple((const char *)opt_arg, ',', &cred_str, &nelems, &cred)) {
error_msg("Unable to parse s3 credential\n");
goto error;
}
@@ -1078,9 +1081,7 @@ parse_command_line(int argc, const char *argv[], struct handler_t **hand_ret)
ccred[0] = (const char *)cred[0];
ccred[1] = (const char *)cred[1];
ccred[2] = (const char *)cred[2];
- if (0 ==
- h5tools_populate_ros3_fapl(&ros3_fa, ccred))
- {
+ if (0 == h5tools_populate_ros3_fapl(&ros3_fa, ccred)) {
error_msg("Unable to set ros3 fapl config\n");
goto error;
}
@@ -1101,13 +1102,8 @@ parse_command_line(int argc, const char *argv[], struct handler_t **hand_ret)
char *props_src = NULL;
char **props = NULL;
unsigned long k = 0;
- if (FAIL == parse_tuple(
- (const char *)opt_arg,
- ',',
- &props_src,
- &nelems,
- &props))
- {
+ if (FAIL == parse_tuple((const char *)opt_arg,
+ ',', &props_src, &nelems, &props)) {
error_msg("unable to parse hdfs properties tuple\n");
goto error;
}
@@ -1115,7 +1111,7 @@ parse_command_line(int argc, const char *argv[], struct handler_t **hand_ret)
*/
if (nelems != 5) {
char str[64] = "";
- sprintf(str,
+ HDsprintf(str,
"expected 5 elements in hdfs properties tuple "
"but found %u\n",
nelems);
@@ -1130,12 +1126,10 @@ parse_command_line(int argc, const char *argv[], struct handler_t **hand_ret)
* input strings... Silent overflow is possible,
* albeit unlikely.
*/
- if (strncmp(props[0], "", 1)) {
- HDstrncpy(hdfs_fa.namenode_name,
- (const char *)props[0],
- HDstrlen(props[0]));
+ if (HDstrncmp(props[0], "", 1)) {
+ HDstrncpy(hdfs_fa.namenode_name,(const char *)props[0], HDstrlen(props[0]));
}
- if (strncmp(props[1], "", 1)) {
+ if (HDstrncmp(props[1], "", 1)) {
k = strtoul((const char *)props[1], NULL, 0);
if (errno == ERANGE) {
error_msg("supposed port number wasn't.\n");
@@ -1143,18 +1137,14 @@ parse_command_line(int argc, const char *argv[], struct handler_t **hand_ret)
}
hdfs_fa.namenode_port = (int32_t)k;
}
- if (strncmp(props[2], "", 1)) {
- HDstrncpy(hdfs_fa.kerberos_ticket_cache,
- (const char *)props[2],
- HDstrlen(props[2]));
+ if (HDstrncmp(props[2], "", 1)) {
+ HDstrncpy(hdfs_fa.kerberos_ticket_cache, (const char *)props[2], HDstrlen(props[2]));
}
- if (strncmp(props[3], "", 1)) {
- HDstrncpy(hdfs_fa.user_name,
- (const char *)props[3],
- HDstrlen(props[3]));
+ if (HDstrncmp(props[3], "", 1)) {
+ HDstrncpy(hdfs_fa.user_name, (const char *)props[3], HDstrlen(props[3]));
}
if (strncmp(props[4], "", 1)) {
- k = strtoul((const char *)props[4], NULL, 0);
+ k = HDstrtoul((const char *)props[4], NULL, 0);
if (errno == ERANGE) {
error_msg("supposed buffersize number wasn't.\n");
goto error;
@@ -1279,13 +1269,13 @@ iter_free(iter_t *iter)
static herr_t
print_file_info(const iter_t *iter)
{
- printf("File information\n");
- printf("\t# of unique groups: %lu\n", iter->uniq_groups);
- printf("\t# of unique datasets: %lu\n", iter->uniq_dsets);
- printf("\t# of unique named datatypes: %lu\n", iter->uniq_dtypes);
- printf("\t# of unique links: %lu\n", iter->uniq_links);
- printf("\t# of unique other: %lu\n", iter->uniq_others);
- printf("\tMax. # of links to object: %lu\n", iter->max_links);
+ HDprintf("File information\n");
+ HDprintf("\t# of unique groups: %lu\n", iter->uniq_groups);
+ HDprintf("\t# of unique datasets: %lu\n", iter->uniq_dsets);
+ HDprintf("\t# of unique named datatypes: %lu\n", iter->uniq_dtypes);
+ HDprintf("\t# of unique links: %lu\n", iter->uniq_links);
+ HDprintf("\t# of unique other: %lu\n", iter->uniq_others);
+ HDprintf("\tMax. # of links to object: %lu\n", iter->max_links);
HDfprintf(stdout, "\tMax. # of objects in group: %Hu\n", iter->max_fanout);
return 0;
@@ -1315,15 +1305,12 @@ print_file_metadata(const iter_t *iter)
HDfprintf(stdout, "\tUser block: %Hu\n", iter->ublk_size);
HDfprintf(stdout, "\tObject headers: (total/unused)\n");
- HDfprintf(stdout, "\t\tGroups: %Hu/%Hu\n",
- iter->group_ohdr_info.total_size,
- iter->group_ohdr_info.free_size);
+ HDfprintf(stdout, "\t\tGroups: %Hu/%Hu\n", iter->group_ohdr_info.total_size,
+ iter->group_ohdr_info.free_size);
HDfprintf(stdout, "\t\tDatasets(exclude compact data): %Hu/%Hu\n",
- iter->dset_ohdr_info.total_size,
- iter->dset_ohdr_info.free_size);
- HDfprintf(stdout, "\t\tDatatypes: %Hu/%Hu\n",
- iter->dtype_ohdr_info.total_size,
- iter->dtype_ohdr_info.free_size);
+ iter->dset_ohdr_info.total_size, iter->dset_ohdr_info.free_size);
+ HDfprintf(stdout, "\t\tDatatypes: %Hu/%Hu\n", iter->dtype_ohdr_info.total_size,
+ iter->dtype_ohdr_info.free_size);
HDfprintf(stdout, "\tGroups:\n");
HDfprintf(stdout, "\t\tB-tree/List: %Hu\n", iter->groups_btree_storage_size);
@@ -1378,32 +1365,32 @@ print_group_info(const iter_t *iter)
unsigned long total; /* Total count for various statistics */
unsigned u; /* Local index variable */
- printf("Small groups (with 0 to %u links):\n", sgroups_threshold-1);
+ HDprintf("Small groups (with 0 to %u links):\n", sgroups_threshold-1);
total = 0;
for(u = 0; u < (unsigned)sgroups_threshold; u++) {
if(iter->num_small_groups[u] > 0) {
- printf("\t# of groups with %u link(s): %lu\n", u, iter->num_small_groups[u]);
+ HDprintf("\t# of groups with %u link(s): %lu\n", u, iter->num_small_groups[u]);
total += iter->num_small_groups[u];
} /* end if */
} /* end for */
- printf("\tTotal # of small groups: %lu\n", total);
+ HDprintf("\tTotal # of small groups: %lu\n", total);
- printf("Group bins:\n");
+ HDprintf("Group bins:\n");
total = 0;
if((iter->group_nbins > 0) && (iter->group_bins[0] > 0)) {
- printf("\t# of groups with 0 link: %lu\n", iter->group_bins[0]);
+ HDprintf("\t# of groups with 0 link: %lu\n", iter->group_bins[0]);
total = iter->group_bins[0];
} /* end if */
power = 1;
for(u = 1; u < iter->group_nbins; u++) {
if(iter->group_bins[u] > 0) {
- printf("\t# of groups with %lu - %lu links: %lu\n", power, (power * 10) - 1,
+ HDprintf("\t# of groups with %lu - %lu links: %lu\n", power, (power * 10) - 1,
iter->group_bins[u]);
total += iter->group_bins[u];
} /* end if */
power *= 10;
} /* end for */
- printf("\tTotal # of groups: %lu\n", total);
+ HDprintf("\tTotal # of groups: %lu\n", total);
return 0;
} /* print_group_info() */
@@ -1424,7 +1411,7 @@ print_group_info(const iter_t *iter)
static herr_t
print_group_metadata(const iter_t *iter)
{
- printf("File space information for groups' metadata (in bytes):\n");
+ HDprintf("File space information for groups' metadata (in bytes):\n");
HDfprintf(stdout, "\tObject headers (total/unused): %Hu/%Hu\n",
iter->group_ohdr_info.total_size, iter->group_ohdr_info.free_size);
@@ -1457,66 +1444,66 @@ print_dataset_info(const iter_t *iter)
unsigned u; /* Local index variable */
if(iter->uniq_dsets > 0) {
- printf("Dataset dimension information:\n");
- printf("\tMax. rank of datasets: %u\n", iter->max_dset_rank);
- printf("\tDataset ranks:\n");
+ HDprintf("Dataset dimension information:\n");
+ HDprintf("\tMax. rank of datasets: %u\n", iter->max_dset_rank);
+ HDprintf("\tDataset ranks:\n");
for(u = 0; u < H5S_MAX_RANK; u++)
if(iter->dset_rank_count[u] > 0)
- printf("\t\t# of dataset with rank %u: %lu\n", u, iter->dset_rank_count[u]);
+ HDprintf("\t\t# of dataset with rank %u: %lu\n", u, iter->dset_rank_count[u]);
- printf("1-D Dataset information:\n");
+ HDprintf("1-D Dataset information:\n");
HDfprintf(stdout, "\tMax. dimension size of 1-D datasets: %Hu\n", iter->max_dset_dims);
- printf("\tSmall 1-D datasets (with dimension sizes 0 to %u):\n", sdsets_threshold - 1);
+ HDprintf("\tSmall 1-D datasets (with dimension sizes 0 to %u):\n", sdsets_threshold - 1);
total = 0;
for(u = 0; u < (unsigned)sdsets_threshold; u++) {
if(iter->small_dset_dims[u] > 0) {
- printf("\t\t# of datasets with dimension sizes %u: %lu\n", u,
+ HDprintf("\t\t# of datasets with dimension sizes %u: %lu\n", u,
iter->small_dset_dims[u]);
total += iter->small_dset_dims[u];
} /* end if */
} /* end for */
- printf("\t\tTotal # of small datasets: %lu\n", total);
+ HDprintf("\t\tTotal # of small datasets: %lu\n", total);
/* Protect against no datasets in file */
if(iter->dset_dim_nbins > 0) {
- printf("\t1-D Dataset dimension bins:\n");
+ HDprintf("\t1-D Dataset dimension bins:\n");
total = 0;
if(iter->dset_dim_bins[0] > 0) {
- printf("\t\t# of datasets with dimension size 0: %lu\n", iter->dset_dim_bins[0]);
+ HDprintf("\t\t# of datasets with dimension size 0: %lu\n", iter->dset_dim_bins[0]);
total = iter->dset_dim_bins[0];
} /* end if */
power = 1;
for(u = 1; u < iter->dset_dim_nbins; u++) {
if(iter->dset_dim_bins[u] > 0) {
- printf("\t\t# of datasets with dimension size %lu - %lu: %lu\n", power, (power * 10) - 1,
+ HDprintf("\t\t# of datasets with dimension size %lu - %lu: %lu\n", power, (power * 10) - 1,
iter->dset_dim_bins[u]);
total += iter->dset_dim_bins[u];
} /* end if */
power *= 10;
} /* end for */
- printf("\t\tTotal # of datasets: %lu\n", total);
+ HDprintf("\t\tTotal # of datasets: %lu\n", total);
} /* end if */
- printf("Dataset storage information:\n");
+ HDprintf("Dataset storage information:\n");
HDfprintf(stdout, "\tTotal raw data size: %Hu\n", iter->dset_storage_size);
HDfprintf(stdout, "\tTotal external raw data size: %Hu\n", iter->dset_external_storage_size);
- printf("Dataset layout information:\n");
+ HDprintf("Dataset layout information:\n");
for(u = 0; u < H5D_NLAYOUTS; u++)
- printf("\tDataset layout counts[%s]: %lu\n", (u == H5D_COMPACT ? "COMPACT" :
+ HDprintf("\tDataset layout counts[%s]: %lu\n", (u == H5D_COMPACT ? "COMPACT" :
(u == H5D_CONTIGUOUS ? "CONTIG" : (u == H5D_CHUNKED ? "CHUNKED" : "VIRTUAL"))), iter->dset_layouts[u]);
- printf("\tNumber of external files : %lu\n", iter->nexternal);
-
- printf("Dataset filters information:\n");
- printf("\tNumber of datasets with:\n");
- printf("\t\tNO filter: %lu\n", iter->dset_comptype[H5Z_FILTER_ERROR+1]);
- printf("\t\tGZIP filter: %lu\n", iter->dset_comptype[H5Z_FILTER_DEFLATE]);
- printf("\t\tSHUFFLE filter: %lu\n", iter->dset_comptype[H5Z_FILTER_SHUFFLE]);
- printf("\t\tFLETCHER32 filter: %lu\n", iter->dset_comptype[H5Z_FILTER_FLETCHER32]);
- printf("\t\tSZIP filter: %lu\n", iter->dset_comptype[H5Z_FILTER_SZIP]);
- printf("\t\tNBIT filter: %lu\n", iter->dset_comptype[H5Z_FILTER_NBIT]);
- printf("\t\tSCALEOFFSET filter: %lu\n", iter->dset_comptype[H5Z_FILTER_SCALEOFFSET]);
- printf("\t\tUSER-DEFINED filter: %lu\n", iter->dset_comptype[H5_NFILTERS_IMPL-1]);
+ HDprintf("\tNumber of external files : %lu\n", iter->nexternal);
+
+ HDprintf("Dataset filters information:\n");
+ HDprintf("\tNumber of datasets with:\n");
+ HDprintf("\t\tNO filter: %lu\n", iter->dset_comptype[H5Z_FILTER_ERROR+1]);
+ HDprintf("\t\tGZIP filter: %lu\n", iter->dset_comptype[H5Z_FILTER_DEFLATE]);
+ HDprintf("\t\tSHUFFLE filter: %lu\n", iter->dset_comptype[H5Z_FILTER_SHUFFLE]);
+ HDprintf("\t\tFLETCHER32 filter: %lu\n", iter->dset_comptype[H5Z_FILTER_FLETCHER32]);
+ HDprintf("\t\tSZIP filter: %lu\n", iter->dset_comptype[H5Z_FILTER_SZIP]);
+ HDprintf("\t\tNBIT filter: %lu\n", iter->dset_comptype[H5Z_FILTER_NBIT]);
+ HDprintf("\t\tSCALEOFFSET filter: %lu\n", iter->dset_comptype[H5Z_FILTER_SCALEOFFSET]);
+ HDprintf("\t\tUSER-DEFINED filter: %lu\n", iter->dset_comptype[H5_NFILTERS_IMPL-1]);
} /* end if */
return 0;
@@ -1539,7 +1526,7 @@ print_dataset_info(const iter_t *iter)
static herr_t
print_dset_metadata(const iter_t *iter)
{
- printf("File space information for datasets' metadata (in bytes):\n");
+ HDprintf("File space information for datasets' metadata (in bytes):\n");
HDfprintf(stdout, "\tObject headers (total/unused): %Hu/%Hu\n",
iter->dset_ohdr_info.total_size, iter->dset_ohdr_info.free_size);
@@ -1573,20 +1560,20 @@ print_dset_dtype_meta(const iter_t *iter)
unsigned u; /* Local index variable */
if(iter->dset_ntypes) {
- printf("Dataset datatype information:\n");
- printf("\t# of unique datatypes used by datasets: %lu\n", iter->dset_ntypes);
+ HDprintf("Dataset datatype information:\n");
+ HDprintf("\t# of unique datatypes used by datasets: %lu\n", iter->dset_ntypes);
total = 0;
for(u = 0; u < iter->dset_ntypes; u++) {
H5Tencode(iter->dset_type_info[u].tid, NULL, &dtype_size);
- printf("\tDataset datatype #%u:\n", u);
- printf("\t\tCount (total/named) = (%lu/%lu)\n",
+ HDprintf("\tDataset datatype #%u:\n", u);
+ HDprintf("\t\tCount (total/named) = (%lu/%lu)\n",
iter->dset_type_info[u].count, iter->dset_type_info[u].named);
- printf("\t\tSize (desc./elmt) = (%lu/%lu)\n", (unsigned long)dtype_size,
+ HDprintf("\t\tSize (desc./elmt) = (%lu/%lu)\n", (unsigned long)dtype_size,
(unsigned long)H5Tget_size(iter->dset_type_info[u].tid));
H5Tclose(iter->dset_type_info[u].tid);
total += iter->dset_type_info[u].count;
} /* end for */
- printf("\tTotal dataset datatype count: %lu\n", total);
+ HDprintf("\tTotal dataset datatype count: %lu\n", total);
} /* end if */
return 0;
@@ -1614,29 +1601,29 @@ print_attr_info(const iter_t *iter)
unsigned long total; /* Total count for various statistics */
unsigned u; /* Local index variable */
- printf("Small # of attributes (objects with 1 to %u attributes):\n", sattrs_threshold);
+ HDprintf("Small # of attributes (objects with 1 to %u attributes):\n", sattrs_threshold);
total = 0;
for(u = 1; u <= (unsigned)sattrs_threshold; u++) {
if(iter->num_small_attrs[u] > 0) {
- printf("\t# of objects with %u attributes: %lu\n", u, iter->num_small_attrs[u]);
+ HDprintf("\t# of objects with %u attributes: %lu\n", u, iter->num_small_attrs[u]);
total += iter->num_small_attrs[u];
} /* end if */
} /* end for */
- printf("\tTotal # of objects with small # of attributes: %lu\n", total);
+ HDprintf("\tTotal # of objects with small # of attributes: %lu\n", total);
- printf("Attribute bins:\n");
+ HDprintf("Attribute bins:\n");
total = 0;
power = 1;
for(u = 1; u < iter->attr_nbins; u++) {
if(iter->attr_bins[u] > 0) {
- printf("\t# of objects with %lu - %lu attributes: %lu\n", power, (power * 10) - 1,
+ HDprintf("\t# of objects with %lu - %lu attributes: %lu\n", power, (power * 10) - 1,
iter->attr_bins[u]);
total += iter->attr_bins[u];
} /* end if */
power *= 10;
} /* end for */
- printf("\tTotal # of objects with attributes: %lu\n", total);
- printf("\tMax. # of attributes to objects: %lu\n", (unsigned long)iter->max_attrs);
+ HDprintf("\tTotal # of objects with attributes: %lu\n", total);
+ HDprintf("\tMax. # of attributes to objects: %lu\n", (unsigned long)iter->max_attrs);
return 0;
} /* print_attr_info() */
@@ -1664,29 +1651,29 @@ print_freespace_info(const iter_t *iter)
HDfprintf(stdout, "Free-space persist: %s\n", iter->fs_persist ? "TRUE" : "FALSE");
HDfprintf(stdout, "Free-space section threshold: %Hu bytes\n", iter->fs_threshold);
- printf("Small size free-space sections (< %u bytes):\n", (unsigned)SIZE_SMALL_SECTS);
+ HDprintf("Small size free-space sections (< %u bytes):\n", (unsigned)SIZE_SMALL_SECTS);
total = 0;
for(u = 0; u < SIZE_SMALL_SECTS; u++) {
if(iter->num_small_sects[u] > 0) {
- printf("\t# of sections of size %u: %lu\n", u, iter->num_small_sects[u]);
+ HDprintf("\t# of sections of size %u: %lu\n", u, iter->num_small_sects[u]);
total += iter->num_small_sects[u];
} /* end if */
} /* end for */
- printf("\tTotal # of small size sections: %lu\n", total);
+ HDprintf("\tTotal # of small size sections: %lu\n", total);
- printf("Free-space section bins:\n");
+ HDprintf("Free-space section bins:\n");
total = 0;
power = 1;
for(u = 1; u < iter->sect_nbins; u++) {
if(iter->sect_bins[u] > 0) {
- printf("\t# of sections of size %lu - %lu: %lu\n", power, (power * 10) - 1,
+ HDprintf("\t# of sections of size %lu - %lu: %lu\n", power, (power * 10) - 1,
iter->sect_bins[u]);
total += iter->sect_bins[u];
} /* end if */
power *= 10;
} /* end for */
- printf("\tTotal # of sections: %lu\n", total);
+ HDprintf("\tTotal # of sections: %lu\n", total);
return 0;
} /* print_freespace_info() */
@@ -1714,7 +1701,7 @@ print_storage_summary(const iter_t *iter)
HDfprintf(stdout, "File space management strategy: %s\n", FS_STRATEGY_NAME[iter->fs_strategy]);
HDfprintf(stdout, "File space page size: %Hu bytes\n", iter->fsp_size);
- printf("Summary of file space information:\n");
+ HDprintf("Summary of file space information:\n");
total_meta =
iter->super_size + iter->super_ext_size + iter->ublk_size +
iter->group_ohdr_info.total_size +
@@ -1822,7 +1809,7 @@ print_file_statistics(const iter_t *iter)
static void
print_object_statistics(const char *name)
{
- printf("Object name %s\n", name);
+ HDprintf("Object name %s\n", name);
} /* print_object_statistics() */
@@ -1905,7 +1892,8 @@ main(int argc, const char *argv[])
conf_fa = (void *)&ros3_fa;
#endif /* H5_HAVE_ROS3_VFD */
- } else if (!HDstrcmp(drivername, "hdfs")) {
+ }
+ else if (!HDstrcmp(drivername, "hdfs")) {
#ifndef H5_HAVE_LIBHDFS
error_msg("HDFS VFD not enabled.\n\n");
goto done;
@@ -1921,11 +1909,7 @@ main(int argc, const char *argv[])
error_msg("Unable to create fapl entry\n");
goto done;
}
- if (1 > h5tools_set_configured_fapl(
- fapl_id,
- drivername,
- conf_fa))
- {
+ if (1 > h5tools_set_configured_fapl(fapl_id, drivername, conf_fa)) {
error_msg("Unable to set fapl\n");
goto done;
}
@@ -1944,7 +1928,7 @@ main(int argc, const char *argv[])
hid_t fcpl;
H5F_info2_t finfo;
- printf("Filename: %s\n", fname);
+ HDprintf("Filename: %s\n", fname);
fid = H5Fopen(fname, H5F_ACC_RDONLY, fapl_id);
if(fid < 0) {
@@ -1979,7 +1963,7 @@ main(int argc, const char *argv[])
if(iter.num_small_groups == NULL || iter.num_small_attrs == NULL || iter.small_dset_dims == NULL) {
error_msg("Unable to allocate memory for tracking small groups/datasets/attributes\n");
- h5tools_setstatus(EXIT_FAILURE);
+ h5tools_setstatus(EXIT_FAILURE);
goto done;
}
@@ -2008,7 +1992,8 @@ main(int argc, const char *argv[])
if(h5trav_visit(fid, hand->obj[u], TRUE, TRUE, obj_stats, lnk_stats, &iter, H5O_INFO_ALL) < 0) {
error_msg("unable to traverse object \"%s\"\n", hand->obj[u]);
h5tools_setstatus(EXIT_FAILURE);
- } else
+ }
+ else
print_statistics(hand->obj[u], &iter);
} /* end for */
} /* end if */
@@ -2016,7 +2001,8 @@ main(int argc, const char *argv[])
if(h5trav_visit(fid, "/", TRUE, TRUE, obj_stats, lnk_stats, &iter, H5O_INFO_ALL) < 0) {
error_msg("unable to traverse objects/links in file \"%s\"\n", fname);
h5tools_setstatus(EXIT_FAILURE);
- } else
+ }
+ else
print_statistics("/", &iter);
} /* end else */
} /* end if */
diff --git a/tools/src/misc/h5debug.c b/tools/src/misc/h5debug.c
index 088e6e9..96d6b9f 100644
--- a/tools/src/misc/h5debug.c
+++ b/tools/src/misc/h5debug.c
@@ -21,19 +21,19 @@
*
*-------------------------------------------------------------------------
*/
-#define H5A_FRIEND /*suppress error about including H5Apkg */
-#define H5B2_FRIEND /*suppress error about including H5B2pkg */
-#define H5B2_TESTING /*suppress warning about H5B2 testing funcs*/
-#define H5D_FRIEND /*suppress error about including H5Dpkg */
-#define H5EA_FRIEND /*suppress error about including H5EApkg */
-#define H5EA_TESTING /*suppress warning about H5EA testing funcs*/
-#define H5FA_FRIEND /*suppress error about including H5FApkg */
-#define H5FA_TESTING /*suppress warning about H5FA testing funcs*/
-#define H5F_FRIEND /*suppress error about including H5Fpkg */
-#define H5G_FRIEND /*suppress error about including H5Gpkg */
-#define H5HF_FRIEND /*suppress error about including H5HFpkg */
-#define H5O_FRIEND /*suppress error about including H5Opkg */
-#define H5SM_FRIEND /*suppress error about including H5SMpkg */
+#define H5A_FRIEND /*suppress error about including H5Apkg */
+#define H5B2_FRIEND /*suppress error about including H5B2pkg */
+#define H5B2_TESTING /*suppress warning about H5B2 testing funcs*/
+#define H5D_FRIEND /*suppress error about including H5Dpkg */
+#define H5EA_FRIEND /*suppress error about including H5EApkg */
+#define H5EA_TESTING /*suppress warning about H5EA testing funcs*/
+#define H5FA_FRIEND /*suppress error about including H5FApkg */
+#define H5FA_TESTING /*suppress warning about H5FA testing funcs*/
+#define H5F_FRIEND /*suppress error about including H5Fpkg */
+#define H5G_FRIEND /*suppress error about including H5Gpkg */
+#define H5HF_FRIEND /*suppress error about including H5HFpkg */
+#define H5O_FRIEND /*suppress error about including H5Opkg */
+#define H5SM_FRIEND /*suppress error about including H5SMpkg */
#include "H5private.h" /* Generic Functions */
#include "H5Apkg.h" /* Attributes */
@@ -57,7 +57,7 @@
#define VCOL 50
-
+
/*-------------------------------------------------------------------------
* Function: get_H5B2_class
*
@@ -80,68 +80,68 @@ get_H5B2_class(const uint8_t *sig)
const H5B2_class_t *cls;
switch(subtype) {
- case H5B2_TEST_ID:
- cls = H5B2_TEST;
- break;
+ case H5B2_TEST_ID:
+ cls = H5B2_TEST;
+ break;
- case H5B2_FHEAP_HUGE_INDIR_ID:
- cls = H5HF_HUGE_BT2_INDIR;
- break;
+ case H5B2_FHEAP_HUGE_INDIR_ID:
+ cls = H5HF_HUGE_BT2_INDIR;
+ break;
- case H5B2_FHEAP_HUGE_FILT_INDIR_ID:
- cls = H5HF_HUGE_BT2_FILT_INDIR;
- break;
+ case H5B2_FHEAP_HUGE_FILT_INDIR_ID:
+ cls = H5HF_HUGE_BT2_FILT_INDIR;
+ break;
- case H5B2_FHEAP_HUGE_DIR_ID:
- cls = H5HF_HUGE_BT2_DIR;
- break;
+ case H5B2_FHEAP_HUGE_DIR_ID:
+ cls = H5HF_HUGE_BT2_DIR;
+ break;
- case H5B2_FHEAP_HUGE_FILT_DIR_ID:
- cls = H5HF_HUGE_BT2_FILT_DIR;
- break;
+ case H5B2_FHEAP_HUGE_FILT_DIR_ID:
+ cls = H5HF_HUGE_BT2_FILT_DIR;
+ break;
- case H5B2_GRP_DENSE_NAME_ID:
- cls = H5G_BT2_NAME;
- break;
+ case H5B2_GRP_DENSE_NAME_ID:
+ cls = H5G_BT2_NAME;
+ break;
- case H5B2_GRP_DENSE_CORDER_ID:
- cls = H5G_BT2_CORDER;
- break;
+ case H5B2_GRP_DENSE_CORDER_ID:
+ cls = H5G_BT2_CORDER;
+ break;
- case H5B2_SOHM_INDEX_ID:
- cls = H5SM_INDEX;
- break;
+ case H5B2_SOHM_INDEX_ID:
+ cls = H5SM_INDEX;
+ break;
- case H5B2_ATTR_DENSE_NAME_ID:
- cls = H5A_BT2_NAME;
- break;
+ case H5B2_ATTR_DENSE_NAME_ID:
+ cls = H5A_BT2_NAME;
+ break;
- case H5B2_ATTR_DENSE_CORDER_ID:
- cls = H5A_BT2_CORDER;
- break;
+ case H5B2_ATTR_DENSE_CORDER_ID:
+ cls = H5A_BT2_CORDER;
+ break;
- case H5B2_CDSET_ID:
- cls = H5D_BT2;
- break;
+ case H5B2_CDSET_ID:
+ cls = H5D_BT2;
+ break;
- case H5B2_CDSET_FILT_ID:
- cls = H5D_BT2_FILT;
- break;
+ case H5B2_CDSET_FILT_ID:
+ cls = H5D_BT2_FILT;
+ break;
- case H5B2_TEST2_ID:
- cls = H5B2_TEST2;
- break;
+ case H5B2_TEST2_ID:
+ cls = H5B2_TEST2;
+ break;
- case H5B2_NUM_BTREE_ID:
- default:
- HDfprintf(stderr, "Unknown v2 B-tree subtype %u\n", (unsigned)(subtype));
- HDexit(4);
+ case H5B2_NUM_BTREE_ID:
+ default:
+ HDfprintf(stderr, "Unknown v2 B-tree subtype %u\n", (unsigned)(subtype));
+ HDexit(4);
} /* end switch */
return(cls);
} /* end get_H5B2_class() */
-
+
/*-------------------------------------------------------------------------
* Function: get_H5EA_class
*
@@ -164,28 +164,28 @@ get_H5EA_class(const uint8_t *sig)
const H5EA_class_t *cls;
switch(clsid) {
- case H5EA_CLS_TEST_ID:
- cls = H5EA_CLS_TEST;
- break;
+ case H5EA_CLS_TEST_ID:
+ cls = H5EA_CLS_TEST;
+ break;
- case H5EA_CLS_CHUNK_ID:
- cls = H5EA_CLS_CHUNK;
- break;
+ case H5EA_CLS_CHUNK_ID:
+ cls = H5EA_CLS_CHUNK;
+ break;
- case H5EA_CLS_FILT_CHUNK_ID:
- cls = H5EA_CLS_FILT_CHUNK;
- break;
+ case H5EA_CLS_FILT_CHUNK_ID:
+ cls = H5EA_CLS_FILT_CHUNK;
+ break;
- case H5EA_NUM_CLS_ID:
- default:
- HDfprintf(stderr, "Unknown extensible array class %u\n", (unsigned)(clsid));
- HDexit(4);
+ case H5EA_NUM_CLS_ID:
+ default:
+ HDfprintf(stderr, "Unknown extensible array class %u\n", (unsigned)(clsid));
+ HDexit(4);
} /* end switch */
return(cls);
} /* end get_H5EA_class() */
-
+
/*-------------------------------------------------------------------------
* Function: get_H5FA_class
*
@@ -208,28 +208,28 @@ get_H5FA_class(const uint8_t *sig)
const H5FA_class_t *cls;
switch(clsid) {
- case H5FA_CLS_TEST_ID:
- cls = H5FA_CLS_TEST;
- break;
+ case H5FA_CLS_TEST_ID:
+ cls = H5FA_CLS_TEST;
+ break;
- case H5FA_CLS_CHUNK_ID:
- cls = H5FA_CLS_CHUNK;
- break;
+ case H5FA_CLS_CHUNK_ID:
+ cls = H5FA_CLS_CHUNK;
+ break;
- case H5FA_CLS_FILT_CHUNK_ID:
- cls = H5FA_CLS_FILT_CHUNK;
- break;
+ case H5FA_CLS_FILT_CHUNK_ID:
+ cls = H5FA_CLS_FILT_CHUNK;
+ break;
- case H5FA_NUM_CLS_ID:
- default:
- HDfprintf(stderr, "Unknown fixed array class %u\n", (unsigned)(clsid));
- HDexit(4);
+ case H5FA_NUM_CLS_ID:
+ default:
+ HDfprintf(stderr, "Unknown fixed array class %u\n", (unsigned)(clsid));
+ HDexit(4);
} /* end switch */
return(cls);
} /* end get_H5FA_class() */
-
+
/*-------------------------------------------------------------------------
* Function: main
*
@@ -254,13 +254,13 @@ main(int argc, char *argv[])
uint8_t sig[H5F_SIGNATURE_LEN];
size_t u;
H5E_auto2_t func;
- void *edata;
+ void *edata;
hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
herr_t status = SUCCEED;
if(argc == 1) {
- HDfprintf(stderr, "Usage: %s filename [signature-addr [extra]]\n", argv[0]);
- HDexit(1);
+ HDfprintf(stderr, "Usage: %s filename [signature-addr [extra]]\n", argv[0]);
+ HDexit(1);
} /* end if */
/* Initialize the library */
@@ -274,15 +274,15 @@ main(int argc, char *argv[])
H5Eset_auto2(H5E_DEFAULT, NULL, NULL);
/*
- * Open the file and get the file descriptor.
- */
+ * Open the file and get the file descriptor.
+ */
if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) {
HDfprintf(stderr, "cannot create file access property list\n");
HDexit(1);
} /* end if */
if(HDstrchr(argv[1], '%'))
if(H5Pset_fapl_family (fapl, (hsize_t)0, H5P_DEFAULT) < 0) {
- fprintf(stderr, "cannot set file access property list\n");
+ HDfprintf(stderr, "cannot set file access property list\n");
HDexit(1);
}
if((fid = H5Fopen(argv[1], H5F_ACC_RDONLY, fapl)) < 0) {
@@ -309,8 +309,8 @@ main(int argc, char *argv[])
}
/*
- * Parse command arguments.
- */
+ * Parse command arguments.
+ */
if(argc > 2)
addr = (haddr_t)HDstrtoll(argv[2], NULL, 0);
if(argc > 3)
@@ -323,8 +323,8 @@ main(int argc, char *argv[])
extra4 = (haddr_t)HDstrtoll(argv[6], NULL, 0);
/*
- * Read the signature at the specified file position.
- */
+ * Read the signature at the specified file position.
+ */
HDfprintf(stdout, "Reading signature at address %a (rel)\n", addr);
if(H5F_block_read(f, H5FD_MEM_SUPER, addr, sizeof(sig), sig) < 0) {
HDfprintf(stderr, "cannot read signature\n");
@@ -332,26 +332,28 @@ main(int argc, char *argv[])
}
if(!HDmemcmp(sig, H5F_SIGNATURE, (size_t)H5F_SIGNATURE_LEN)) {
/*
- * Debug the file's super block.
- */
+ * Debug the file's super block.
+ */
status = H5F_debug(f, stdout, 0, VCOL);
} else if(!HDmemcmp(sig, H5HL_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
- * Debug a local heap.
- */
+ * Debug a local heap.
+ */
status = H5HL_debug(f, addr, stdout, 0, VCOL);
- } else if(!HDmemcmp (sig, H5HG_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
- /*
- * Debug a global heap collection.
- */
- status = H5HG_debug(f, addr, stdout, 0, VCOL);
+ }
+ else if(!HDmemcmp (sig, H5HG_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ /*
+ * Debug a global heap collection.
+ */
+ status = H5HG_debug(f, addr, stdout, 0, VCOL);
- } else if(!HDmemcmp(sig, H5G_NODE_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ }
+ else if(!HDmemcmp(sig, H5G_NODE_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
- * Debug a symbol table node.
- */
+ * Debug a symbol table node.
+ */
/* Check for extra parameters */
if(extra == 0) {
@@ -362,107 +364,109 @@ main(int argc, char *argv[])
status = H5G_node_debug(f, addr, stdout, 0, VCOL, extra);
- } else if(!HDmemcmp(sig, H5B_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ }
+ else if(!HDmemcmp(sig, H5B_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
- * Debug a B-tree. B-trees are debugged through the B-tree
- * subclass. The subclass identifier is the byte immediately
- * after the B-tree signature.
- */
+ * Debug a B-tree. B-trees are debugged through the B-tree
+ * subclass. The subclass identifier is the byte immediately
+ * after the B-tree signature.
+ */
H5B_subid_t subtype = (H5B_subid_t)sig[H5_SIZEOF_MAGIC];
unsigned ndims;
uint32_t dim[H5O_LAYOUT_NDIMS];
switch(subtype) {
- case H5B_SNODE_ID:
- /* Check for extra parameters */
- if(extra == 0) {
- HDfprintf(stderr, "\nWarning: Providing the group's local heap address will give more information\n");
- HDfprintf(stderr, "B-tree symbol table node usage:\n");
- HDfprintf(stderr, "\th5debug <filename> <B-tree node address> <address of local heap>\n\n");
- HDexit(4);
- } /* end if */
+ case H5B_SNODE_ID:
+ /* Check for extra parameters */
+ if(extra == 0) {
+ HDfprintf(stderr, "\nWarning: Providing the group's local heap address will give more information\n");
+ HDfprintf(stderr, "B-tree symbol table node usage:\n");
+ HDfprintf(stderr, "\th5debug <filename> <B-tree node address> <address of local heap>\n\n");
+ HDexit(4);
+ } /* end if */
- status = H5G_node_debug(f, addr, stdout, 0, VCOL, extra);
- break;
+ status = H5G_node_debug(f, addr, stdout, 0, VCOL, extra);
+ break;
- case H5B_CHUNK_ID:
- /* Check for extra parameters */
- if(extra == 0) {
- HDfprintf(stderr, "ERROR: Need number of dimensions of chunk in order to dump chunk B-tree node\n");
+ case H5B_CHUNK_ID:
+ /* Check for extra parameters */
+ if(extra == 0) {
+ HDfprintf(stderr, "ERROR: Need number of dimensions of chunk in order to dump chunk B-tree node\n");
+ HDfprintf(stderr, "B-tree chunked storage node usage:\n");
+ HDfprintf(stderr, "\th5debug <filename> <B-tree node address> <# of dimensions> <slowest chunk dim>...<fastest chunk dim>\n");
+ HDexit(4);
+ } /* end if */
+
+ /* Build array of chunk dimensions */
+ ndims = (unsigned)extra;
+ dim[0] = (uint32_t)extra2;
+ if(ndims > 1)
+ dim[1] = (uint32_t)extra3;
+ if(ndims > 2)
+ dim[2] = (uint32_t)extra4;
+
+ /* Check for dimension error */
+ if(ndims > 3) {
+ HDfprintf(stderr, "ERROR: Only 3 dimensions support currently (fix h5debug)\n");
+ HDfprintf(stderr, "B-tree chunked storage node usage:\n");
+ HDfprintf(stderr, "\th5debug <filename> <B-tree node address> <# of dimensions> <slowest chunk dim>...<fastest chunk dim>\n");
+ HDexit(4);
+ } /* end for */
+ for(u = 0; u < ndims; u++)
+ if(0 == dim[u]) {
+ HDfprintf(stderr, "ERROR: Chunk dimensions should be >0\n");
HDfprintf(stderr, "B-tree chunked storage node usage:\n");
HDfprintf(stderr, "\th5debug <filename> <B-tree node address> <# of dimensions> <slowest chunk dim>...<fastest chunk dim>\n");
HDexit(4);
} /* end if */
- /* Build array of chunk dimensions */
- ndims = (unsigned)extra;
- dim[0] = (uint32_t)extra2;
- if(ndims > 1)
- dim[1] = (uint32_t)extra3;
- if(ndims > 2)
- dim[2] = (uint32_t)extra4;
-
- /* Check for dimension error */
- if(ndims > 3) {
- HDfprintf(stderr, "ERROR: Only 3 dimensions support currently (fix h5debug)\n");
- HDfprintf(stderr, "B-tree chunked storage node usage:\n");
- HDfprintf(stderr, "\th5debug <filename> <B-tree node address> <# of dimensions> <slowest chunk dim>...<fastest chunk dim>\n");
- HDexit(4);
- } /* end for */
- for(u = 0; u < ndims; u++)
- if(0 == dim[u]) {
- HDfprintf(stderr, "ERROR: Chunk dimensions should be >0\n");
- HDfprintf(stderr, "B-tree chunked storage node usage:\n");
- HDfprintf(stderr, "\th5debug <filename> <B-tree node address> <# of dimensions> <slowest chunk dim>...<fastest chunk dim>\n");
- HDexit(4);
- } /* end if */
-
- /* Set the last dimension (the element size) to zero */
- dim[ndims] = 0;
-
- status = H5D_btree_debug(f, addr, stdout, 0, VCOL, ndims, dim);
- break;
-
- case H5B_NUM_BTREE_ID:
- default:
- HDfprintf(stderr, "Unknown v1 B-tree subtype %u\n", (unsigned)(subtype));
- HDexit(4);
+ /* Set the last dimension (the element size) to zero */
+ dim[ndims] = 0;
+
+ status = H5D_btree_debug(f, addr, stdout, 0, VCOL, ndims, dim);
+ break;
+
+ case H5B_NUM_BTREE_ID:
+ default:
+ HDfprintf(stderr, "Unknown v1 B-tree subtype %u\n", (unsigned)(subtype));
+ HDexit(4);
}
- } else if(!HDmemcmp(sig, H5B2_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ }
+ else if(!HDmemcmp(sig, H5B2_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
- * Debug a v2 B-tree header.
- */
+ * Debug a v2 B-tree header.
+ */
const H5B2_class_t *cls = get_H5B2_class(sig);
HDassert(cls);
- if((cls == H5D_BT2 || cls == H5D_BT2_FILT) && extra == 0) {
+ if((cls == H5D_BT2 || cls == H5D_BT2_FILT) && extra == 0) {
HDfprintf(stderr, "ERROR: Need v2 B-tree header address and object header address containing the layout message in order to dump header\n");
HDfprintf(stderr, "v2 B-tree hdr usage:\n");
HDfprintf(stderr, "\th5debug <filename> <v2 B-tree header address> <object header address>\n");
HDexit(4);
- } /* end if */
+ } /* end if */
status = H5B2__hdr_debug(f, addr, stdout, 0, VCOL, cls, (haddr_t)extra);
- } else if(!HDmemcmp(sig, H5B2_INT_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ }
+ else if(!HDmemcmp(sig, H5B2_INT_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
- * Debug a v2 B-tree internal node.
- */
+ * Debug a v2 B-tree internal node.
+ */
const H5B2_class_t *cls = get_H5B2_class(sig);
HDassert(cls);
/* Check for enough valid parameters */
- if((cls == H5D_BT2 || cls == H5D_BT2_FILT) &&
- (extra == 0 || extra2 == 0 || extra3 == 0 || extra4 == 0)) {
-
- fprintf(stderr, "ERROR: Need v2 B-tree header address, the node's number of records, depth, and object header address containing the layout message in order to dump internal node\n");
- fprintf(stderr, "NOTE: Leaf nodes are depth 0, the internal nodes above them are depth 1, etc.\n");
- fprintf(stderr, "v2 B-tree internal node usage:\n");
- fprintf(stderr, "\th5debug <filename> <internal node address> <v2 B-tree header address> <number of records> <depth> <object header address>\n");
+ if((cls == H5D_BT2 || cls == H5D_BT2_FILT) && (extra == 0 || extra2 == 0 || extra3 == 0 || extra4 == 0)) {
+ HDfprintf(stderr, "ERROR: Need v2 B-tree header address, the node's number of records, depth, and object header address containing the layout message in order to dump internal node\n");
+ HDfprintf(stderr, "NOTE: Leaf nodes are depth 0, the internal nodes above them are depth 1, etc.\n");
+ HDfprintf(stderr, "v2 B-tree internal node usage:\n");
+ HDfprintf(stderr, "\th5debug <filename> <internal node address> <v2 B-tree header address> <number of records> <depth> <object header address>\n");
HDexit(4);
- } else if(extra == 0 || extra2 == 0 || extra3 == 0) {
+ }
+ else if(extra == 0 || extra2 == 0 || extra3 == 0) {
HDfprintf(stderr, "ERROR: Need v2 B-tree header address and the node's number of records and depth in order to dump internal node\n");
HDfprintf(stderr, "NOTE: Leaf nodes are depth 0, the internal nodes above them are depth 1, etc.\n");
HDfprintf(stderr, "v2 B-tree internal node usage:\n");
@@ -472,23 +476,24 @@ main(int argc, char *argv[])
status = H5B2__int_debug(f, addr, stdout, 0, VCOL, cls, extra, (unsigned)extra2, (unsigned)extra3, (haddr_t)extra4);
- } else if(!HDmemcmp(sig, H5B2_LEAF_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ }
+ else if(!HDmemcmp(sig, H5B2_LEAF_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
- * Debug a v2 B-tree leaf node.
- */
+ * Debug a v2 B-tree leaf node.
+ */
const H5B2_class_t *cls = get_H5B2_class(sig);
HDassert(cls);
/* Check for enough valid parameters */
- if((cls == H5D_BT2 || cls == H5D_BT2_FILT) &&
- (extra == 0 || extra2 == 0 || extra3 == 0 )) {
+ if((cls == H5D_BT2 || cls == H5D_BT2_FILT) && (extra == 0 || extra2 == 0 || extra3 == 0 )) {
- fprintf(stderr, "ERROR: Need v2 B-tree header address, number of records, and object header address containing the layout message in order to dump leaf node\n");
- fprintf(stderr, "v2 B-tree leaf node usage:\n");
- fprintf(stderr, "\th5debug <filename> <leaf node address> <v2 B-tree header address> <number of records> <object header address>\n");
+ HDfprintf(stderr, "ERROR: Need v2 B-tree header address, number of records, and object header address containing the layout message in order to dump leaf node\n");
+ HDfprintf(stderr, "v2 B-tree leaf node usage:\n");
+ HDfprintf(stderr, "\th5debug <filename> <leaf node address> <v2 B-tree header address> <number of records> <object header address>\n");
HDexit(4);
- } else if(extra == 0 || extra2 == 0) {
+ }
+ else if(extra == 0 || extra2 == 0) {
HDfprintf(stderr, "ERROR: Need v2 B-tree header address and number of records in order to dump leaf node\n");
HDfprintf(stderr, "v2 B-tree leaf node usage:\n");
HDfprintf(stderr, "\th5debug <filename> <leaf node address> <v2 B-tree header address> <number of records>\n");
@@ -497,16 +502,18 @@ main(int argc, char *argv[])
status = H5B2__leaf_debug(f, addr, stdout, 0, VCOL, cls, extra, (unsigned)extra2, (haddr_t)extra3);
- } else if(!HDmemcmp(sig, H5HF_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ }
+ else if(!HDmemcmp(sig, H5HF_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
- * Debug a fractal heap header.
- */
+ * Debug a fractal heap header.
+ */
status = H5HF_hdr_debug(f, addr, stdout, 0, VCOL);
- } else if(!HDmemcmp(sig, H5HF_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ }
+ else if(!HDmemcmp(sig, H5HF_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
- * Debug a fractal heap direct block.
- */
+ * Debug a fractal heap direct block.
+ */
/* Check for enough valid parameters */
if(extra == 0 || extra2 == 0) {
@@ -518,10 +525,11 @@ main(int argc, char *argv[])
status = H5HF_dblock_debug(f, addr, stdout, 0, VCOL, extra, (size_t)extra2);
- } else if(!HDmemcmp(sig, H5HF_IBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ }
+ else if(!HDmemcmp(sig, H5HF_IBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
- * Debug a fractal heap indirect block.
- */
+ * Debug a fractal heap indirect block.
+ */
/* Check for enough valid parameters */
if(extra == 0 || extra2 == 0) {
@@ -533,17 +541,19 @@ main(int argc, char *argv[])
status = H5HF_iblock_debug(f, addr, stdout, 0, VCOL, extra, (unsigned)extra2);
- } else if(!HDmemcmp(sig, H5FS_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ }
+ else if(!HDmemcmp(sig, H5FS_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
- * Debug a free space header.
- */
+ * Debug a free space header.
+ */
status = H5FS_debug(f, addr, stdout, 0, VCOL);
- } else if(!HDmemcmp(sig, H5FS_SINFO_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ }
+ else if(!HDmemcmp(sig, H5FS_SINFO_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
- * Debug free space serialized sections.
- */
+ * Debug free space serialized sections.
+ */
/* Check for enough valid parameters */
if(extra == 0 || extra2 == 0) {
@@ -555,17 +565,19 @@ main(int argc, char *argv[])
status = H5FS_sects_debug(f, addr, stdout, 0, VCOL, extra, extra2);
- } else if(!HDmemcmp(sig, H5SM_TABLE_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ }
+ else if(!HDmemcmp(sig, H5SM_TABLE_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
- * Debug shared message master table.
- */
+ * Debug shared message master table.
+ */
status = H5SM_table_debug(f, addr, stdout, 0, VCOL, (unsigned) UFAIL, (unsigned) UFAIL);
- } else if(!HDmemcmp(sig, H5SM_LIST_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ }
+ else if(!HDmemcmp(sig, H5SM_LIST_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
- * Debug shared message list index.
- */
+ * Debug shared message list index.
+ */
/* Check for enough valid parameters */
if(extra == 0) {
@@ -577,10 +589,11 @@ main(int argc, char *argv[])
status = H5SM_list_debug(f, addr, stdout, 0, VCOL, (haddr_t)extra);
- } else if(!HDmemcmp(sig, H5EA_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ }
+ else if(!HDmemcmp(sig, H5EA_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
- * Debug an extensible aray header.
- */
+ * Debug an extensible aray header.
+ */
const H5EA_class_t *cls = get_H5EA_class(sig);
HDassert(cls);
@@ -594,10 +607,11 @@ main(int argc, char *argv[])
status = H5EA__hdr_debug(f, addr, stdout, 0, VCOL, cls, extra);
- } else if(!HDmemcmp(sig, H5EA_IBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ }
+ else if(!HDmemcmp(sig, H5EA_IBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
- * Debug an extensible aray index block.
- */
+ * Debug an extensible aray index block.
+ */
const H5EA_class_t *cls = get_H5EA_class(sig);
HDassert(cls);
@@ -611,10 +625,11 @@ main(int argc, char *argv[])
status = H5EA__iblock_debug(f, addr, stdout, 0, VCOL, cls, extra, extra2);
- } else if(!HDmemcmp(sig, H5EA_SBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ }
+ else if(!HDmemcmp(sig, H5EA_SBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
- * Debug an extensible aray super block.
- */
+ * Debug an extensible aray super block.
+ */
const H5EA_class_t *cls = get_H5EA_class(sig);
HDassert(cls);
@@ -628,10 +643,11 @@ main(int argc, char *argv[])
status = H5EA__sblock_debug(f, addr, stdout, 0, VCOL, cls, extra, (unsigned)extra2, extra3);
- } else if(!HDmemcmp(sig, H5EA_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ }
+ else if(!HDmemcmp(sig, H5EA_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
- * Debug an extensible aray data block.
- */
+ * Debug an extensible aray data block.
+ */
const H5EA_class_t *cls = get_H5EA_class(sig);
HDassert(cls);
@@ -645,10 +661,11 @@ main(int argc, char *argv[])
status = H5EA__dblock_debug(f, addr, stdout, 0, VCOL, cls, extra, (size_t)extra2, extra3);
- } else if(!HDmemcmp(sig, H5FA_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ }
+ else if(!HDmemcmp(sig, H5FA_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
- * Debug a fixed array header.
- */
+ * Debug a fixed array header.
+ */
const H5FA_class_t *cls = get_H5FA_class(sig);
HDassert(cls);
@@ -662,10 +679,11 @@ main(int argc, char *argv[])
status = H5FA__hdr_debug(f, addr, stdout, 0, VCOL, cls, extra);
- } else if(!HDmemcmp(sig, H5FA_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ }
+ else if(!HDmemcmp(sig, H5FA_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
- * Debug a fixed array data block.
- */
+ * Debug a fixed array data block.
+ */
const H5FA_class_t *cls = get_H5FA_class(sig);
HDassert(cls);
@@ -679,33 +697,37 @@ main(int argc, char *argv[])
status = H5FA__dblock_debug(f, addr, stdout, 0, VCOL, cls, extra, extra2);
- } else if(!HDmemcmp(sig, H5O_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ }
+ else if(!HDmemcmp(sig, H5O_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
- * Debug v2 object header (which have signatures).
- */
+ * Debug v2 object header (which have signatures).
+ */
status = H5O_debug(f, addr, stdout, 0, VCOL);
- } else if(sig[0] == H5O_VERSION_1) {
+ }
+ else if(sig[0] == H5O_VERSION_1) {
/*
- * This could be a v1 object header. Since they don't have a signature
- * it's a somewhat "ify" detection.
- */
+ * This could be a v1 object header. Since they don't have a signature
+ * it's a somewhat "ify" detection.
+ */
status = H5O_debug(f, addr, stdout, 0, VCOL);
- } else {
+ }
+ else {
/*
- * Got some other unrecognized signature.
- */
- printf("%-*s ", VCOL, "Signature:");
+ * Got some other unrecognized signature.
+ */
+ HDprintf("%-*s ", VCOL, "Signature:");
for (u = 0; u < sizeof(sig); u++) {
if (sig[u] > ' ' && sig[u] <= '~' && '\\' != sig[u])
HDputchar(sig[u]);
else if ('\\' == sig[u]) {
HDputchar('\\');
HDputchar('\\');
- } else
- printf("\\%03o", sig[u]);
+ }
+ else
+ HDprintf("\\%03o", sig[u]);
}
HDputchar('\n');
diff --git a/tools/src/misc/h5mkgrp.c b/tools/src/misc/h5mkgrp.c
index b7ff73c..feb60d4 100644
--- a/tools/src/misc/h5mkgrp.c
+++ b/tools/src/misc/h5mkgrp.c
@@ -251,7 +251,7 @@ main(int argc, const char *argv[])
/* Display some output if requested */
if(params.verbose)
- printf("%s: Creating groups with latest version of the format\n", h5tools_getprogname());
+ HDprintf("%s: Creating groups with latest version of the format\n", h5tools_getprogname());
} /* end if */
/* Attempt to open an existing HDF5 file first */
@@ -284,7 +284,7 @@ main(int argc, const char *argv[])
/* Display some output if requested */
if(params.verbose)
- printf("%s: Creating parent groups\n", h5tools_getprogname());
+ HDprintf("%s: Creating parent groups\n", h5tools_getprogname());
} /* end if */
/* Loop over creating requested groups */
@@ -305,7 +305,7 @@ main(int argc, const char *argv[])
/* Display some output if requested */
if(params.verbose)
- printf("%s: created group '%s'\n", h5tools_getprogname(), params.groups[curr_group]);
+ HDprintf("%s: created group '%s'\n", h5tools_getprogname(), params.groups[curr_group]);
} /* end for */
/* Close link creation property list */
diff --git a/tools/src/misc/h5repart.c b/tools/src/misc/h5repart.c
index 2f4d93e..d516fa0 100644
--- a/tools/src/misc/h5repart.c
+++ b/tools/src/misc/h5repart.c
@@ -15,19 +15,19 @@
* Programmer: Robb Matzke <matzke@llnl.gov>
* Wednesday, May 13, 1998
*
- * Purpose: Repartitions a file family. This program can be used to
- * split a single file into a family of files, join a family of
- * files into a single file, or copy one family to another while
- * changing the size of the family members. It can also be used
- * to copy a single file to a single file with holes.
+ * Purpose: Repartitions a file family. This program can be used to
+ * split a single file into a family of files, join a family of
+ * files into a single file, or copy one family to another while
+ * changing the size of the family members. It can also be used
+ * to copy a single file to a single file with holes.
*/
/* See H5private.h for how to include system headers */
#include "hdf5.h"
#include "H5private.h"
-#define NAMELEN 4096
-#define GB *1024*1024*1024
+#define NAMELEN 4096
+#define GB *1024*1024*1024
/* Make these 2 private properties(defined in H5Fprivate.h) available to h5repart.
* The first one updates the member file size in the superblock. The second one
@@ -36,15 +36,15 @@
#define H5F_ACS_FAMILY_NEWSIZE_NAME "family_newsize"
#define H5F_ACS_FAMILY_TO_SINGLE_NAME "family_to_single"
-
+
/*-------------------------------------------------------------------------
- * Function: usage
+ * Function: usage
*
- * Purpose: Prints a usage message.
+ * Purpose: Prints a usage message.
*
- * Return: void
+ * Return: void
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, May 13, 1998
*
* Modifications:
@@ -54,98 +54,99 @@
static void
usage (const char *progname)
{
- fprintf(stderr, "usage: %s [-v] [-V] [-[b|m] N[g|m|k]] [-family_to_sec2|-family_to_single] SRC DST\n",
- progname);
- fprintf(stderr, " -v Produce verbose output\n");
- fprintf(stderr, " -V Print a version number and exit\n");
- fprintf(stderr, " -b N The I/O block size, defaults to 1kB\n");
- fprintf(stderr, " -m N The destination member size or 1GB\n");
- fprintf(stderr, " -family_to_sec2 Deprecated version of -family_to_single (below)\n");
- fprintf(stderr, " -family_to_single Change file driver from family to the default single-file VFD (windows or sec2)\n");
- fprintf(stderr, " SRC The name of the source file\n");
- fprintf(stderr, " DST The name of the destination files\n");
- fprintf(stderr, "Sizes may be suffixed with `g' for GB, `m' for MB or "
- "`k' for kB.\n");
- fprintf(stderr, "File family names include an integer printf "
- "format such as `%%d'\n");
- exit (EXIT_FAILURE);
+ HDfprintf(stderr, "usage: %s [-v] [-V] [-[b|m] N[g|m|k]] [-family_to_sec2|-family_to_single] SRC DST\n",
+ progname);
+ HDfprintf(stderr, " -v Produce verbose output\n");
+ HDfprintf(stderr, " -V Print a version number and exit\n");
+ HDfprintf(stderr, " -b N The I/O block size, defaults to 1kB\n");
+ HDfprintf(stderr, " -m N The destination member size or 1GB\n");
+ HDfprintf(stderr, " -family_to_sec2 Deprecated version of -family_to_single (below)\n");
+ HDfprintf(stderr, " -family_to_single Change file driver from family to the default single-file VFD (windows or sec2)\n");
+ HDfprintf(stderr, " SRC The name of the source file\n");
+ HDfprintf(stderr, " DST The name of the destination files\n");
+ HDfprintf(stderr, "Sizes may be suffixed with `g' for GB, `m' for MB or "
+ "`k' for kB.\n");
+ HDfprintf(stderr, "File family names include an integer printf "
+ "format such as `%%d'\n");
+ HDexit (EXIT_FAILURE);
}
-
+
/*-------------------------------------------------------------------------
- * Function: get_size
+ * Function: get_size
*
- * Purpose: Reads a size option of the form `-XNS' where `X' is any
- * letter, `N' is a multi-character positive decimal number, and
- * `S' is an optional suffix letter in the set [GgMmk]. The
- * option may also be split among two arguments as: `-X NS'.
- * The input value of ARGNO is the argument number for the
- * switch in the ARGV vector and ARGC is the number of entries
- * in that vector.
+ * Purpose: Reads a size option of the form `-XNS' where `X' is any
+ * letter, `N' is a multi-character positive decimal number, and
+ * `S' is an optional suffix letter in the set [GgMmk]. The
+ * option may also be split among two arguments as: `-X NS'.
+ * The input value of ARGNO is the argument number for the
+ * switch in the ARGV vector and ARGC is the number of entries
+ * in that vector.
*
- * Return: Success: The value N multiplied according to the
- * suffix S. On return ARGNO will be the number
- * of the next argument to process.
+ * Return: Success: The value N multiplied according to the
+ * suffix S. On return ARGNO will be the number
+ * of the next argument to process.
*
- * Failure: Calls usage() which exits with a non-zero
- * status.
+ * Failure: Calls usage() which exits with a non-zero
+ * status.
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, May 13, 1998
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static off_t
get_size (const char *progname, int *argno, int argc, char *argv[])
{
- off_t retval=-1;
- char *suffix;
+ off_t retval=-1;
+ char *suffix;
if (isdigit ((int)(argv[*argno][2]))) {
- retval = strtol (argv[*argno]+2, &suffix, 10);
- (*argno)++;
- } else if (argv[*argno][2] || *argno+1>=argc) {
- usage (progname);
- } else {
- retval = strtol (argv[*argno+1], &suffix, 0);
- if (suffix==argv[*argno+1]) usage (progname);
- *argno += 2;
+ retval = HDstrtol(argv[*argno]+2, &suffix, 10);
+ (*argno)++;
+ }
+ else if (argv[*argno][2] || *argno+1>=argc) {
+ usage (progname);
+ }
+ else {
+ retval = HDstrtol(argv[*argno+1], &suffix, 0);
+ if (suffix == argv[*argno+1])
+ usage (progname);
+ *argno += 2;
}
if (suffix && suffix[0] && !suffix[1]) {
- switch (*suffix) {
- case 'G':
- case 'g':
- retval *= 1024 * 1024 * 1024;
- break;
- case 'M':
- case 'm':
- retval *= 1024 * 1024;
- break;
- case 'k':
- retval *= 1024;
- break;
- default:
- usage (progname);
- }
- } else if (suffix && suffix[0]) {
- usage (progname);
+ switch (*suffix) {
+ case 'G':
+ case 'g':
+ retval *= 1024 * 1024 * 1024;
+ break;
+ case 'M':
+ case 'm':
+ retval *= 1024 * 1024;
+ break;
+ case 'k':
+ retval *= 1024;
+ break;
+ default:
+ usage(progname);
+ }
+ }
+ else if (suffix && suffix[0]) {
+ usage (progname);
}
return retval;
}
-
+
/*-------------------------------------------------------------------------
- * Function: main
+ * Function: main
*
- * Purpose: Split an hdf5 file
+ * Purpose: Split an hdf5 file
*
- * Return: Success:
+ * Return: Success:
*
- * Failure:
+ * Failure:
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, May 13, 1998
*
* Modifications:
@@ -155,36 +156,36 @@ get_size (const char *progname, int *argno, int argc, char *argv[])
int
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 */
- size_t n, i; /*counters */
- ssize_t nio; /*I/O return value */
- int argno=1; /*program argument number */
- int src, dst=-1; /*source & destination files */
- int need_seek=FALSE; /*destination needs to seek? */
- int need_write; /*data needs to be written? */
- h5_stat_t sb; /*temporary file stat buffer */
-
- int verbose=FALSE; /*display file names? */
-
- const char *src_gen_name; /*general source 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 */
- int dst_is_family; /*is dst name a family name? */
- int dst_membno=0; /*destination member number */
-
- off_t left_overs=0; /*amount of zeros left over */
- off_t src_offset=0; /*offset in source member */
- off_t dst_offset=0; /*offset in destination member */
- off_t src_size; /*source logical member size */
- off_t src_act_size; /*source actual member size */
- off_t dst_size=1 GB; /*destination logical memb size */
+ const char *prog_name; /*program name */
+ size_t blk_size=1024; /*size of each I/O block */
+ 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 */
+ int src, dst=-1; /*source & destination files */
+ int need_seek=FALSE; /*destination needs to seek? */
+ int need_write; /*data needs to be written? */
+ h5_stat_t sb; /*temporary file stat buffer */
+
+ int verbose=FALSE; /*display file names? */
+
+ const char *src_gen_name; /*general source 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 */
+ int dst_is_family; /*is dst name a family name? */
+ int dst_membno=0; /*destination member number */
+
+ off_t left_overs=0; /*amount of zeros left over */
+ off_t src_offset=0; /*offset in source member */
+ off_t dst_offset=0; /*offset in destination member */
+ off_t src_size; /*source logical member size */
+ off_t src_act_size; /*source actual member size */
+ off_t dst_size=1 GB; /*destination logical memb size */
hid_t fapl; /*file access property list */
hid_t file;
hsize_t hdsize; /*destination logical memb size */
@@ -193,48 +194,50 @@ main (int argc, char *argv[])
/*
* Get the program name from argv[0]. Use only the last component.
*/
- if ((prog_name=strrchr (argv[0], '/'))) prog_name++;
- else prog_name = argv[0];
+ if ((prog_name = HDstrrchr (argv[0], '/')))
+ prog_name++;
+ else
+ prog_name = argv[0];
/*
* Parse switches.
*/
- while (argno<argc && '-'==argv[argno][0]) {
- if (!strcmp (argv[argno], "-v")) {
+ while (argno < argc && '-' == argv[argno][0]) {
+ if (!HDstrcmp(argv[argno], "-v")) {
verbose = TRUE;
argno++;
- } else if (!strcmp(argv[argno], "-V")) {
- printf("This is %s version %u.%u release %u\n",
- prog_name, H5_VERS_MAJOR, H5_VERS_MINOR, H5_VERS_RELEASE);
- exit(EXIT_SUCCESS);
- } else if (!strcmp (argv[argno], "-family_to_sec2")) {
+ } else if (!HDstrcmp(argv[argno], "-V")) {
+ HDprintf("This is %s version %u.%u release %u\n", prog_name, H5_VERS_MAJOR, H5_VERS_MINOR, H5_VERS_RELEASE);
+ HDexit(EXIT_SUCCESS);
+ } else if (!HDstrcmp(argv[argno], "-family_to_sec2")) {
family_to_single = TRUE;
argno++;
- } else if (!strcmp (argv[argno], "-family_to_single")) {
+ } else if (!HDstrcmp(argv[argno], "-family_to_single")) {
family_to_single = TRUE;
argno++;
- } else if ('b'==argv[argno][1]) {
- blk_size = (size_t)get_size (prog_name, &argno, argc, argv);
- } else if ('m'==argv[argno][1]) {
- dst_size = get_size (prog_name, &argno, argc, argv);
+ } else if ('b' == argv[argno][1]) {
+ blk_size = (size_t) get_size(prog_name, &argno, argc, argv);
+ } else if ('m' == argv[argno][1]) {
+ dst_size = get_size(prog_name, &argno, argc, argv);
} else {
- usage (prog_name);
+ usage(prog_name);
} /* end if */
} /* end while */
/* allocate names */
if(NULL == (src_name = (char *)HDcalloc((size_t)NAMELEN, sizeof(char))))
- exit(EXIT_FAILURE);
+ HDexit(EXIT_FAILURE);
if(NULL == (dst_name = (char *)HDcalloc((size_t)NAMELEN, sizeof(char))))
- exit(EXIT_FAILURE);
+ HDexit(EXIT_FAILURE);
/*
* Get the name for the source file and open the first member. The size
* of the first member determines the logical size of all the members.
*/
- if (argno>=argc) usage (prog_name);
+ if (argno >= argc)
+ usage(prog_name);
src_gen_name = argv[argno++];
- sprintf (src_name, src_gen_name, src_membno);
+ HDsprintf(src_name, src_gen_name, src_membno);
src_is_family = strcmp (src_name, src_gen_name);
if ((src = HDopen(src_name, O_RDONLY)) < 0) {
@@ -242,157 +245,170 @@ main (int argc, char *argv[])
HDexit(EXIT_FAILURE);
}
- if (HDfstat(src, &sb)<0) {
- perror ("fstat");
- exit (EXIT_FAILURE);
+ if (HDfstat(src, &sb) < 0) {
+ HDperror("fstat");
+ HDexit(EXIT_FAILURE);
}
src_size = src_act_size = sb.st_size;
- if (verbose) fprintf (stderr, "< %s\n", src_name);
+ if (verbose)
+ HDfprintf(stderr, "< %s\n", src_name);
/*
* Get the name for the destination file and open the first member.
*/
- if (argno>=argc) usage (prog_name);
+ if (argno>=argc)
+ usage (prog_name);
dst_gen_name = argv[argno++];
- sprintf (dst_name, dst_gen_name, dst_membno);
- dst_is_family = strcmp (dst_name, dst_gen_name);
+ HDsprintf(dst_name, dst_gen_name, dst_membno);
+ dst_is_family = HDstrcmp(dst_name, dst_gen_name);
if ((dst = HDopen(dst_name, O_RDWR|O_CREAT|O_TRUNC, H5_POSIX_CREATE_MODE_RW)) < 0) {
HDperror(dst_name);
HDexit(EXIT_FAILURE);
}
- if (verbose) fprintf (stderr, "> %s\n", dst_name);
+ if (verbose)
+ HDfprintf(stderr, "> %s\n", dst_name);
/* No more arguments */
- if (argno<argc) usage (prog_name);
+ if (argno < argc)
+ usage (prog_name);
/* Now the real work, split the file */
buf = (char *)HDmalloc(blk_size);
while (src_offset<src_size) {
- /* Read a block. The amount to read is the minimum of:
- * 1. The I/O block size
- * 2. What's left to write in the destination member
- * 3. Left over zeros or what's left in the source member.
- */
- n = blk_size;
- if (dst_is_family) n = (size_t)MIN((off_t)n, dst_size-dst_offset);
- if (left_overs) {
- n = (size_t)MIN ((off_t)n, left_overs);
- left_overs = left_overs - (off_t)n;
- need_write = FALSE;
- } else if (src_offset<src_act_size) {
- n = (size_t)MIN ((off_t)n, src_act_size-src_offset);
- if ((nio=HDread (src, buf, n))<0) {
- perror ("read");
- exit (EXIT_FAILURE);
- } else if ((size_t)nio!=n) {
- fprintf (stderr, "%s: short read\n", src_name);
- exit (EXIT_FAILURE);
- }
- for (i=0; i<n; i++) {
- if (buf[i]) break;
- }
- need_write = (i<n);
- } else {
- n = 0;
- left_overs = src_size - src_act_size;
- need_write = FALSE;
- }
-
- /*
- * If the block contains non-zero data then write it to the
- * destination, otherwise just remember that we'll have to do a seek
- * later in the destination when we finally get non-zero data.
- */
- if (need_write) {
- if (need_seek && HDlseek (dst, dst_offset, SEEK_SET)<0) {
- perror ("HDlseek");
- exit (EXIT_FAILURE);
- }
- if ((nio=HDwrite (dst, buf, n))<0) {
- perror ("write");
- exit (EXIT_FAILURE);
- } else if ((size_t)nio!=n) {
- fprintf (stderr, "%s: short write\n", dst_name);
- exit (EXIT_FAILURE);
- }
- need_seek = FALSE;
- } else {
- need_seek = TRUE;
- }
-
- /*
- * Update the source offset and open the next source family member if
- * necessary. The source stream ends at the first member which
- * cannot be opened because it doesn't exist. At the end of the
- * source stream, update the destination offset and break out of the
- * loop. The destination offset must be updated so we can fix
- * trailing holes.
- */
- src_offset = src_offset + (off_t)n;
- if (src_offset==src_act_size) {
- HDclose (src);
- if (!src_is_family) {
- dst_offset = dst_offset + (off_t)n;
- break;
- }
- sprintf (src_name, src_gen_name, ++src_membno);
- if ((src = HDopen(src_name, O_RDONLY)) < 0 && ENOENT == errno) {
- dst_offset = dst_offset + (off_t)n;
- break;
- } else if (src<0) {
- perror (src_name);
- exit (EXIT_FAILURE);
- }
- if (HDfstat (src, &sb)<0) {
- perror ("fstat");
- exit (EXIT_FAILURE);
- }
- src_act_size = sb.st_size;
- if (src_act_size>src_size) {
- fprintf (stderr, "%s: member truncated to %lu bytes\n",
- src_name, (unsigned long)src_size);
- }
- src_offset = 0;
- if (verbose) fprintf (stderr, "< %s\n", src_name);
- }
-
- /*
- * Update the destination offset, opening a new member if one will be
- * needed. The first member is extended to the logical member size
- * but other members might be smaller if they end with a hole.
- */
- dst_offset = dst_offset + (off_t)n;
- if (dst_is_family && dst_offset==dst_size) {
- if (0==dst_membno) {
- if (HDlseek (dst, dst_size-1, SEEK_SET)<0) {
- perror ("HDHDlseek");
- exit (EXIT_FAILURE);
- }
- if (HDread (dst, buf, 1)<0) {
- perror ("read");
- exit (EXIT_FAILURE);
- }
- if (HDlseek (dst, dst_size-1, SEEK_SET)<0) {
- perror ("HDlseek");
- exit (EXIT_FAILURE);
- }
- if (HDwrite (dst, buf, 1)<0) {
- perror ("write");
- exit (EXIT_FAILURE);
- }
- }
- HDclose (dst);
- sprintf (dst_name, dst_gen_name, ++dst_membno);
- if ((dst = HDopen(dst_name, O_RDWR|O_CREAT|O_TRUNC, H5_POSIX_CREATE_MODE_RW)) < 0) {
- HDperror(dst_name);
- HDexit(EXIT_FAILURE);
- }
- dst_offset = 0;
- need_seek = FALSE;
- if (verbose) fprintf (stderr, "> %s\n", dst_name);
- }
+ /* Read a block. The amount to read is the minimum of:
+ * 1. The I/O block size
+ * 2. What's left to write in the destination member
+ * 3. Left over zeros or what's left in the source member.
+ */
+ n = blk_size;
+ if (dst_is_family)
+ n = (size_t)MIN((off_t)n, dst_size-dst_offset);
+ if (left_overs) {
+ n = (size_t)MIN((off_t)n, left_overs);
+ left_overs = left_overs - (off_t) n;
+ need_write = FALSE;
+ }
+ else if (src_offset < src_act_size) {
+ n = (size_t)MIN((off_t)n, src_act_size-src_offset);
+ if ((nio = HDread(src, buf, n)) < 0) {
+ HDperror("read");
+ HDexit(EXIT_FAILURE);
+ }
+ else if ((size_t) nio != n) {
+ HDfprintf(stderr, "%s: short read\n", src_name);
+ HDexit(EXIT_FAILURE);
+ }
+ for (i = 0; i < n; i++) {
+ if (buf[i])
+ break;
+ }
+ need_write = (i < n);
+ }
+ else {
+ n = 0;
+ left_overs = src_size - src_act_size;
+ need_write = FALSE;
+ }
+
+ /*
+ * If the block contains non-zero data then write it to the
+ * destination, otherwise just remember that we'll have to do a seek
+ * later in the destination when we finally get non-zero data.
+ */
+ if (need_write) {
+ if (need_seek && HDlseek (dst, dst_offset, SEEK_SET) < 0) {
+ HDperror("HDlseek");
+ HDexit(EXIT_FAILURE);
+ }
+ if ((nio = HDwrite(dst, buf, n)) < 0) {
+ HDperror("write");
+ HDexit(EXIT_FAILURE);
+ }
+ else if ((size_t) nio != n) {
+ HDfprintf(stderr, "%s: short write\n", dst_name);
+ HDexit(EXIT_FAILURE);
+ }
+ need_seek = FALSE;
+ }
+ else {
+ need_seek = TRUE;
+ }
+
+ /*
+ * Update the source offset and open the next source family member if
+ * necessary. The source stream ends at the first member which
+ * cannot be opened because it doesn't exist. At the end of the
+ * source stream, update the destination offset and break out of the
+ * loop. The destination offset must be updated so we can fix
+ * trailing holes.
+ */
+ src_offset = src_offset + (off_t) n;
+ if (src_offset == src_act_size) {
+ HDclose(src);
+ if (!src_is_family) {
+ dst_offset = dst_offset + (off_t) n;
+ break;
+ }
+ HDsprintf(src_name, src_gen_name, ++src_membno);
+ if ((src = HDopen(src_name, O_RDONLY)) < 0 && ENOENT == errno) {
+ dst_offset = dst_offset + (off_t) n;
+ break;
+ }
+ else if (src < 0) {
+ HDperror(src_name);
+ HDexit(EXIT_FAILURE);
+ }
+ if (HDfstat (src, &sb) < 0) {
+ HDperror("fstat");
+ HDexit(EXIT_FAILURE);
+ }
+ src_act_size = sb.st_size;
+ if (src_act_size > src_size) {
+ HDfprintf(stderr, "%s: member truncated to %lu bytes\n", src_name, (unsigned long) src_size);
+ }
+ src_offset = 0;
+ if (verbose)
+ HDfprintf(stderr, "< %s\n", src_name);
+ }
+
+ /*
+ * Update the destination offset, opening a new member if one will be
+ * needed. The first member is extended to the logical member size
+ * but other members might be smaller if they end with a hole.
+ */
+ dst_offset = dst_offset + (off_t) n;
+ if (dst_is_family && dst_offset == dst_size) {
+ if (0 == dst_membno) {
+ if (HDlseek (dst, dst_size-1, SEEK_SET) < 0) {
+ HDperror("HDHDlseek");
+ HDexit(EXIT_FAILURE);
+ }
+ if (HDread (dst, buf, 1) < 0) {
+ HDperror("read");
+ HDexit(EXIT_FAILURE);
+ }
+ if (HDlseek (dst, dst_size-1, SEEK_SET) < 0) {
+ HDperror("HDlseek");
+ HDexit(EXIT_FAILURE);
+ }
+ if (HDwrite (dst, buf, 1) < 0) {
+ HDperror("write");
+ HDexit(EXIT_FAILURE);
+ }
+ }
+ HDclose(dst);
+ HDsprintf(dst_name, dst_gen_name, ++dst_membno);
+ if ((dst = HDopen(dst_name, O_RDWR | O_CREAT | O_TRUNC, H5_POSIX_CREATE_MODE_RW)) < 0) {
+ HDperror(dst_name);
+ HDexit(EXIT_FAILURE);
+ }
+ dst_offset = 0;
+ need_seek = FALSE;
+ if (verbose)
+ HDfprintf(stderr, "> %s\n", dst_name);
+ }
}
/*
@@ -401,30 +417,30 @@ main (int argc, char *argv[])
* family has been truncated.
*/
if (need_seek) {
- if (HDlseek (dst, dst_offset-1, SEEK_SET)<0) {
- perror ("HDlseek");
- exit (EXIT_FAILURE);
- }
- if (HDread (dst, buf, 1)<0) {
- perror ("read");
- exit (EXIT_FAILURE);
- }
- if (HDlseek (dst, dst_offset-1, SEEK_SET)<0) {
- perror ("HDlseek");
- exit (EXIT_FAILURE);
- }
- if (HDwrite (dst, buf, 1)<0) {
- perror ("write");
- exit (EXIT_FAILURE);
- }
+ if (HDlseek (dst, dst_offset-1, SEEK_SET)<0) {
+ HDperror ("HDlseek");
+ HDexit (EXIT_FAILURE);
+ }
+ if (HDread (dst, buf, 1)<0) {
+ HDperror ("read");
+ HDexit (EXIT_FAILURE);
+ }
+ if (HDlseek (dst, dst_offset-1, SEEK_SET)<0) {
+ HDperror ("HDlseek");
+ HDexit (EXIT_FAILURE);
+ }
+ if (HDwrite (dst, buf, 1)<0) {
+ HDperror ("write");
+ HDexit (EXIT_FAILURE);
+ }
}
HDclose (dst);
/* Modify family driver information saved in superblock through private property.
* These private properties are for this tool only. */
- if ((fapl=H5Pcreate(H5P_FILE_ACCESS))<0) {
- perror ("H5Pcreate");
- exit (EXIT_FAILURE);
+ if ((fapl=H5Pcreate(H5P_FILE_ACCESS)) < 0) {
+ HDperror ("H5Pcreate");
+ HDexit (EXIT_FAILURE);
}
if(family_to_single) {
@@ -433,23 +449,24 @@ main (int argc, char *argv[])
* the library to ignore the family driver information saved in the superblock.
*/
if(H5Pset(fapl, H5F_ACS_FAMILY_TO_SINGLE_NAME, &family_to_single) < 0) {
- perror ("H5Pset");
- exit (EXIT_FAILURE);
+ HDperror ("H5Pset");
+ HDexit (EXIT_FAILURE);
}
- } else {
+ }
+ else {
/* Modify family size saved in superblock through private property. It signals
* library to save the new member size(specified in command line) in superblock.
* This private property is for this tool only. */
if(H5Pset_fapl_family(fapl, H5F_FAMILY_DEFAULT, H5P_DEFAULT) < 0) {
- perror ("H5Pset_fapl_family");
- exit (EXIT_FAILURE);
+ HDperror ("H5Pset_fapl_family");
+ HDexit (EXIT_FAILURE);
}
/* Set the property of the new member size as hsize_t */
hdsize = (hsize_t)dst_size;
if(H5Pset(fapl, H5F_ACS_FAMILY_NEWSIZE_NAME, &hdsize) < 0) {
- perror ("H5Pset");
- exit (EXIT_FAILURE);
+ HDperror ("H5Pset");
+ HDexit (EXIT_FAILURE);
}
}
@@ -465,16 +482,16 @@ main (int argc, char *argv[])
file = H5Fopen(dst_gen_name, H5F_ACC_RDWR, fapl);
} H5E_END_TRY;
- if(file>=0) {
- if(H5Fclose(file)<0) {
- perror ("H5Fclose");
- exit (EXIT_FAILURE);
+ if(file >= 0) {
+ if(H5Fclose(file) < 0) {
+ HDperror("H5Fclose");
+ HDexit(EXIT_FAILURE);
} /* end if */
} /* end if */
- if(H5Pclose(fapl)<0) {
- perror ("H5Pclose");
- exit (EXIT_FAILURE);
+ if(H5Pclose(fapl) < 0) {
+ HDperror("H5Pclose");
+ HDexit(EXIT_FAILURE);
} /* end if */
/* Free resources and return */
diff --git a/tools/test/h5copy/h5copygentest.c b/tools/test/h5copy/h5copygentest.c
index 9f5d916..f6aa72f 100644
--- a/tools/test/h5copy/h5copygentest.c
+++ b/tools/test/h5copy/h5copygentest.c
@@ -326,7 +326,7 @@ static void gent_nested_vl(hid_t loc_id)
* Function: gent_att_compound_vlstr
*
* Purpose: Generate a dataset and a group.
- * Both has an attribute with a compound datatype consisting
+ * Both has an attribute with a compound datatype consisting
* of a variable length string
*
*-------------------------------------------------------------------------
@@ -337,15 +337,15 @@ static void gent_att_compound_vlstr(hid_t loc_id)
int i;
const char *v;
} s1;
- hsize_t dim[1] = {1}; /* Dimension size */
- hid_t sid = -1; /* Dataspace ID */
- hid_t tid = -1; /* Datatype ID */
- hid_t aid = -1; /* Attribute ID */
- hid_t did = -1; /* Dataset ID */
- hid_t gid = -1; /* Group ID */
- hid_t vl_str_tid = -1; /* Variable length datatype ID */
- hid_t cmpd_tid = -1; /* Compound datatype ID */
- hid_t null_sid = -1; /* Null dataspace ID */
+ hsize_t dim[1] = {1}; /* Dimension size */
+ hid_t sid = -1; /* Dataspace ID */
+ hid_t tid = -1; /* Datatype ID */
+ hid_t aid = -1; /* Attribute ID */
+ hid_t did = -1; /* Dataset ID */
+ hid_t gid = -1; /* Group ID */
+ hid_t vl_str_tid = -1; /* Variable length datatype ID */
+ hid_t cmpd_tid = -1; /* Compound datatype ID */
+ hid_t null_sid = -1; /* Null dataspace ID */
s1 buf; /* Buffer */
buf.i = 9;
@@ -509,7 +509,7 @@ static herr_t gen_obj_ref(hid_t loc_id)
sid = H5Screate_simple(1, dims1, NULL);
if (sid < 0)
{
- fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -517,7 +517,7 @@ static herr_t gen_obj_ref(hid_t loc_id)
oid = H5Dcreate2 (loc_id, OBJ_REF_DS, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (oid < 0)
{
- fprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -525,7 +525,7 @@ static herr_t gen_obj_ref(hid_t loc_id)
status = H5Dwrite(oid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -538,7 +538,7 @@ static herr_t gen_obj_ref(hid_t loc_id)
oid = H5Gcreate2 (loc_id, OBJ_REF_GRP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (oid < 0)
{
- fprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -547,14 +547,14 @@ static herr_t gen_obj_ref(hid_t loc_id)
status = H5Rcreate (&or_data[0], loc_id, OBJ_REF_DS, H5R_OBJECT, (hid_t)-1);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
status = H5Rcreate (&or_data[1], loc_id, OBJ_REF_GRP, H5R_OBJECT, (hid_t)-1);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -562,7 +562,7 @@ static herr_t gen_obj_ref(hid_t loc_id)
sid = H5Screate_simple (1, dims2, NULL);
if (sid < 0)
{
- fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -570,7 +570,7 @@ static herr_t gen_obj_ref(hid_t loc_id)
oid = H5Dcreate2 (loc_id, "Dset_OBJREF", H5T_STD_REF_OBJ, sid, H5P_DEFAULT,H5P_DEFAULT,H5P_DEFAULT);
if (oid < 0)
{
- fprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -578,7 +578,7 @@ static herr_t gen_obj_ref(hid_t loc_id)
status = H5Dwrite(oid, H5T_STD_REF_OBJ, H5S_ALL, H5S_ALL, H5P_DEFAULT, or_data);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -618,7 +618,7 @@ static herr_t gen_region_ref(hid_t loc_id)
sid = H5Screate_simple (2, dims2, NULL);
if (sid < 0)
{
- fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -627,7 +627,7 @@ static herr_t gen_region_ref(hid_t loc_id)
oid2 = H5Dcreate2 (loc_id, REG_REF_DS2, H5T_STD_I8LE, sid, H5P_DEFAULT,H5P_DEFAULT,H5P_DEFAULT);
if (oid2 < 0)
{
- fprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -636,7 +636,7 @@ static herr_t gen_region_ref(hid_t loc_id)
status = H5Dwrite (oid2, H5T_NATIVE_CHAR, H5S_ALL, H5S_ALL, H5P_DEFAULT, data);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -645,7 +645,7 @@ static herr_t gen_region_ref(hid_t loc_id)
status = H5Sselect_elements (sid, H5S_SELECT_SET, 4, coords[0]);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -654,7 +654,7 @@ static herr_t gen_region_ref(hid_t loc_id)
status = H5Rcreate (&rr_data[0], loc_id, REG_REF_DS2, H5R_DATASET_REGION, sid);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -663,7 +663,7 @@ static herr_t gen_region_ref(hid_t loc_id)
status = H5Sselect_hyperslab (sid, H5S_SELECT_SET, start, stride, count, block);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Sselect_hyperslab failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Sselect_hyperslab failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -672,7 +672,7 @@ static herr_t gen_region_ref(hid_t loc_id)
status = H5Rcreate (&rr_data[1], loc_id, REG_REF_DS2, H5R_DATASET_REGION, sid);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -683,7 +683,7 @@ static herr_t gen_region_ref(hid_t loc_id)
sid = H5Screate_simple (1, dims1, NULL);
if (sid < 0)
{
- fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -692,7 +692,7 @@ static herr_t gen_region_ref(hid_t loc_id)
oid1 = H5Dcreate2 (loc_id, REG_REF_DS1, H5T_STD_REF_DSETREG, sid, H5P_DEFAULT,H5P_DEFAULT,H5P_DEFAULT);
if (oid1 < 0)
{
- fprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -701,7 +701,7 @@ static herr_t gen_region_ref(hid_t loc_id)
status = H5Dwrite (oid1, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, rr_data);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -725,30 +725,30 @@ out:
*------------------------------------------------------------------------*/
static void Test_Obj_Copy(void)
{
- hid_t fid = -1; /* File id */
- hid_t fapl_new = (-1); /* File access property id */
- unsigned new_format; /* New format or old format */
+ hid_t fid = -1; /* File id */
+ hid_t fapl_new = (-1); /* File access property id */
+ unsigned new_format; /* New format or old format */
if((fapl_new = H5Pcreate(H5P_FILE_ACCESS)) < 0) {
- fprintf(stderr, "Error: H5Pcreate failed.\n");
+ HDfprintf(stderr, "Error: H5Pcreate failed.\n");
goto out;
}
if(H5Pset_libver_bounds(fapl_new, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0) {
- fprintf(stderr, "Error: H5Pset_libver_bounds failed.\n");
+ HDfprintf(stderr, "Error: H5Pset_libver_bounds failed.\n");
goto out;
}
/* Test with old & new format groups */
for(new_format = FALSE; new_format <= TRUE; new_format++) {
-
+
/* Set the FAPL for the type of format */
/* Create source file */
if(new_format)
- fid = H5Fcreate(HDF_FILE1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_new);
- else
- fid = H5Fcreate(HDF_FILE1_NEW, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ fid = H5Fcreate(HDF_FILE1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_new);
+ else
+ fid = H5Fcreate(HDF_FILE1_NEW, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if(fid < 0) {
- fprintf(stderr, "Error: H5Fcreate failed.\n");
+ HDfprintf(stderr, "Error: H5Fcreate failed.\n");
goto out;
}
@@ -756,7 +756,7 @@ static void Test_Obj_Copy(void)
gent_empty_group(fid);
gent_nested_datasets(fid);
gent_nested_group(fid);
- gent_att_compound_vlstr(fid);
+ gent_att_compound_vlstr(fid);
H5Fclose(fid);
fid = (-1);
@@ -786,19 +786,19 @@ static void Test_Ref_Copy(void)
fid = H5Fcreate (HDF_FILE2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid < 0)
{
- fprintf(stderr, "Error: %s> H5Fcreate failed.\n", HDF_FILE2);
+ HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", HDF_FILE2);
goto out;
}
/* add object reference */
status = gen_obj_ref(fid);
if (status < 0)
- fprintf(stderr, "Failed to generate object reference.\n");
+ HDfprintf(stderr, "Failed to generate object reference.\n");
/* add region reference */
status = gen_region_ref(fid);
if (status < 0)
- fprintf(stderr, "Failed to generate region reference.\n");
+ HDfprintf(stderr, "Failed to generate region reference.\n");
out:
/*-----------------------------------------------------------------------
@@ -829,7 +829,7 @@ static herr_t gen_extlink_trg(hid_t loc_id)
gid = H5Gcreate2(loc_id, "group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid < 0)
{
- fprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -845,7 +845,7 @@ static herr_t gen_extlink_trg(hid_t loc_id)
status = H5Tcommit2(loc_id, "datatype", tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Tcommit2 failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Tcommit2 failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -878,7 +878,7 @@ static herr_t gen_extlink_src(hid_t loc_id)
gid = H5Gcreate2(loc_id, "/group_ext", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid < 0)
{
- fprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -890,7 +890,7 @@ static herr_t gen_extlink_src(hid_t loc_id)
status = H5Lcreate_external(HDF_EXT_TRG_FILE, "/simple", gid, "extlink_dset", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -899,7 +899,7 @@ static herr_t gen_extlink_src(hid_t loc_id)
status = H5Lcreate_external(HDF_EXT_TRG_FILE, "/group", gid, "extlink_grp", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -908,7 +908,7 @@ static herr_t gen_extlink_src(hid_t loc_id)
status = H5Lcreate_external(HDF_EXT_TRG_FILE, "/datatype", gid, "extlink_datatype", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -917,7 +917,7 @@ static herr_t gen_extlink_src(hid_t loc_id)
status = H5Lcreate_external(HDF_EXT_TRG_FILE, "notyet", gid, "extlink_notyet1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -926,7 +926,7 @@ static herr_t gen_extlink_src(hid_t loc_id)
status = H5Lcreate_external("notyet_file.h5", "notyet", gid, "extlink_notyet2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -953,26 +953,26 @@ static void Test_Extlink_Copy(void)
fid1 = H5Fcreate (HDF_EXT_SRC_FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid1 < 0)
{
- fprintf(stderr, "Error: %s> H5Fcreate failed.\n", HDF_EXT_SRC_FILE);
+ HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", HDF_EXT_SRC_FILE);
goto out;
}
fid2 = H5Fcreate (HDF_EXT_TRG_FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid2 < 0)
{
- fprintf(stderr, "Error: %s> H5Fcreate failed.\n", HDF_EXT_TRG_FILE);
+ HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", HDF_EXT_TRG_FILE);
goto out;
}
/* add links to source external link file */
status = gen_extlink_src(fid1);
if (status < 0)
- fprintf(stderr, "Error: %s> gen_extlink_src failed.\n", HDF_EXT_SRC_FILE);
+ HDfprintf(stderr, "Error: %s> gen_extlink_src failed.\n", HDF_EXT_SRC_FILE);
/* add objs to target external link file */
status = gen_extlink_trg(fid2);
if (status < 0)
- fprintf(stderr, "Error: %s> gen_extlink_trg failed.\n", HDF_EXT_TRG_FILE);
+ HDfprintf(stderr, "Error: %s> gen_extlink_trg failed.\n", HDF_EXT_TRG_FILE);
out:
/*-----------------------------------------------------------------------
diff --git a/tools/test/h5diff/h5diffgentest.c b/tools/test/h5diff/h5diffgentest.c
index 4f92cae..d60e393 100644
--- a/tools/test/h5diff/h5diffgentest.c
+++ b/tools/test/h5diff/h5diffgentest.c
@@ -310,11 +310,11 @@ int test_basic(const char *fname1, const char *fname2, const char *fname3)
/* create the empty file */
if ((fid1 = H5Fcreate(fname3, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
- fprintf(stderr, "empty file (%s) creation failed.\n", fname3);
+ HDfprintf(stderr, "empty file (%s) creation failed.\n", fname3);
goto out;
}
if (H5Fclose(fid1) < 0) {
- fprintf(stderr, "empty file (%s) close failed.\n", fname3);
+ HDfprintf(stderr, "empty file (%s) close failed.\n", fname3);
goto out;
}
@@ -1065,7 +1065,7 @@ static int test_attributes_verbose_level(const char *fname1, const char *fname2)
* Create file1
*-----------------------------------------------------------------------*/
if ((fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
- fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -1075,28 +1075,28 @@ static int test_attributes_verbose_level(const char *fname1, const char *fname2)
*/
f1_gid = H5Gcreate2(fid1, "g", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (f1_gid < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
status = FAIL;
goto out;
}
f1_gid2 = H5Gcreate2(fid1, "g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (f1_gid2 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
status = FAIL;
goto out;
}
f1_gid3 = H5Gcreate2(fid1, "g3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (f1_gid3 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
status = FAIL;
goto out;
}
f1_gid4 = H5Gcreate2(fid1, "g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (f1_gid4 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -1107,13 +1107,13 @@ static int test_attributes_verbose_level(const char *fname1, const char *fname2)
f1_sid = H5Screate_simple(1, dset_dims, NULL);
f1_did = H5Dcreate2(fid1, "dset", H5T_NATIVE_INT, f1_sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (f1_did == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = H5Dwrite(f1_did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset_data);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -1124,7 +1124,7 @@ static int test_attributes_verbose_level(const char *fname1, const char *fname2)
f1_tid = H5Tcopy(H5T_NATIVE_INT);
status = H5Tcommit2(fid1, "ntype", f1_tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Tcommit2 failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Tcommit2 failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -1133,7 +1133,7 @@ static int test_attributes_verbose_level(const char *fname1, const char *fname2)
* Create file2
*-----------------------------------------------------------------------*/
if ((fid2 = H5Fcreate(fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
- fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -1143,28 +1143,28 @@ static int test_attributes_verbose_level(const char *fname1, const char *fname2)
*/
f2_gid = H5Gcreate2(fid2, "g", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (f2_gid < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
status = FAIL;
goto out;
}
f2_gid2 = H5Gcreate2(fid2, "g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (f2_gid2 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
status = FAIL;
goto out;
}
f2_gid3 = H5Gcreate2(fid2, "g3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (f2_gid3 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
status = FAIL;
goto out;
}
f2_gid4 = H5Gcreate2(fid2, "g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (f2_gid4 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -1175,13 +1175,13 @@ static int test_attributes_verbose_level(const char *fname1, const char *fname2)
f2_sid = H5Screate_simple(1, dset_dims, NULL);
f2_did = H5Dcreate2(fid2, "dset", H5T_NATIVE_INT, f2_sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (f2_did == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
status = H5Dwrite(f2_did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset_data);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -1192,7 +1192,7 @@ static int test_attributes_verbose_level(const char *fname1, const char *fname2)
f2_tid = H5Tcopy(H5T_NATIVE_INT);
status = H5Tcommit2(fid2, "ntype", f2_tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Tcommit2 failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Tcommit2 failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -1423,7 +1423,7 @@ static int test_link_name(const char *fname1)
*------------------------------------------------------------------------*/
fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid1 < 0) {
- fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -1433,7 +1433,7 @@ static int test_link_name(const char *fname1)
*------------------------------------------------------------------------*/
gid1 = H5Gcreate2(fid1, "group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid1 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -1441,7 +1441,7 @@ static int test_link_name(const char *fname1)
H5P_DEFAULT);
if (gid2 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -1451,14 +1451,14 @@ static int test_link_name(const char *fname1)
*------------------------------------------------------------------------*/
status = H5Lcreate_soft("group", fid1, "link_g1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("group_longname", fid1, "link_g2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -1498,7 +1498,7 @@ static int test_soft_links(const char *fname1)
*------------------------------------------------------------------------*/
fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid1 < 0) {
- fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -1508,7 +1508,7 @@ static int test_soft_links(const char *fname1)
*------------------------------------------------------------------------*/
gid1 = H5Gcreate2(fid1, "target_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid1 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -1519,21 +1519,21 @@ static int test_soft_links(const char *fname1)
/* file1 */
status = write_dset(fid1, 2, dims2, "target_dset1", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = write_dset(fid1, 2, dims2, "target_dset2", H5T_NATIVE_INT, data2);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = write_dset(gid1, 2, dims2, "dset", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
@@ -1544,42 +1544,42 @@ static int test_soft_links(const char *fname1)
/* file 1 */
status = H5Lcreate_soft("/target_dset1", fid1, "softlink_dset1_1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("/target_dset1", fid1, "softlink_dset1_2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("/target_dset2", fid1, "softlink_dset2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("/target_group", fid1, "softlink_group1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("/target_group", fid1, "softlink_group2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("/no_obj", fid1, "softlink_noexist", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -1619,7 +1619,7 @@ static int test_linked_softlinks(const char *fname1)
*------------------------------------------------------------------------*/
fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid1 < 0) {
- fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -1629,21 +1629,21 @@ static int test_linked_softlinks(const char *fname1)
*------------------------------------------------------------------------*/
gid1 = H5Gcreate2(fid1, "target_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid1 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
status = FAIL;
goto out;
}
gid2 = H5Gcreate2(fid1, "target_group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid2 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
status = FAIL;
goto out;
}
gid3 = H5Gcreate2(fid1, "target_group2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid3 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -1654,20 +1654,20 @@ static int test_linked_softlinks(const char *fname1)
/* file1 */
status = write_dset(fid1, 2, dims2, "target_dset1", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = write_dset(fid1, 2, dims2, "target_dset2", H5T_NATIVE_INT, data2);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = write_dset(gid1, 2, dims2, "dset", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
@@ -1679,84 +1679,84 @@ static int test_linked_softlinks(const char *fname1)
* file 1 */
status = H5Lcreate_soft("/target_dset1", fid1, "softlink1_to_dset1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("softlink1_to_dset1", fid1, "softlink1_to_slink1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("softlink1_to_slink1", fid1, "softlink1_to_slink2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("/target_dset2", fid1, "softlink2_to_dset2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("softlink2_to_dset2", fid1, "softlink2_to_slink1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("softlink2_to_slink1", fid1, "softlink2_to_slink2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("target_group1", fid1, "softlink3_to_group1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("softlink3_to_group1", fid1, "softlink3_to_slink1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("softlink3_to_slink1", fid1, "softlink3_to_slink2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("target_group2", fid1, "softlink4_to_group2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("softlink4_to_group2", fid1, "softlink4_to_slink1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("softlink4_to_slink1", fid1, "softlink4_to_slink2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -1801,7 +1801,7 @@ static int test_external_links(const char *fname1, const char *fname2)
/* source file */
fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid1 < 0) {
- fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -1809,7 +1809,7 @@ static int test_external_links(const char *fname1, const char *fname2)
/* target file */
fid2 = H5Fcreate(fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid2 < 0) {
- fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -1821,14 +1821,14 @@ static int test_external_links(const char *fname1, const char *fname2)
* target file */
gid1 = H5Gcreate2(fid2, "target_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid1 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
status = FAIL;
goto out;
}
gid2 = H5Gcreate2(fid2, "target_group2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid2 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -1839,21 +1839,21 @@ static int test_external_links(const char *fname1, const char *fname2)
* target file */
status = write_dset(fid2, 2, dims2, "target_dset1", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
status = write_dset(gid1, 2, dims2, "x_dset", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
status = write_dset(gid2, 2, dims2, "x_dset", H5T_NATIVE_INT, data2);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
@@ -1865,42 +1865,42 @@ static int test_external_links(const char *fname1, const char *fname2)
/* source file */
status = H5Lcreate_external(fname2, "/target_group/x_dset", fid1, "ext_link_dset1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_external(fname2, "/target_group2/x_dset", fid1, "ext_link_dset2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_external(fname2, "/target_group", fid1, "/ext_link_grp1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_external(fname2, "/target_group2", fid1, "/ext_link_grp2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_external(fname2, "no_obj", fid1, "ext_link_noexist1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_external("no_file.h5", "no_obj", fid1, "ext_link_noexist2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -1945,7 +1945,7 @@ static int test_ext2soft_links(const char *fname1, const char *fname2)
/* source file */
fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid1 < 0) {
- fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -1953,7 +1953,7 @@ static int test_ext2soft_links(const char *fname1, const char *fname2)
/* target file */
fid2 = H5Fcreate(fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid2 < 0) {
- fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -1964,7 +1964,7 @@ static int test_ext2soft_links(const char *fname1, const char *fname2)
/* target file */
gid2 = H5Gcreate2(fid2, "target_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid2 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -1976,14 +1976,14 @@ static int test_ext2soft_links(const char *fname1, const char *fname2)
* target file */
status = write_dset(fid2, 2, dims2, "dset1", H5T_NATIVE_INT, data2);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
status = write_dset(fid2, 2, dims2, "dset2", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
@@ -1995,14 +1995,14 @@ static int test_ext2soft_links(const char *fname1, const char *fname2)
* target file */
status = H5Lcreate_soft("/dset1", fid2, "softlink_to_dset1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("/dset2", fid2, "softlink_to_dset2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -2014,21 +2014,21 @@ static int test_ext2soft_links(const char *fname1, const char *fname2)
* source file */
status = H5Lcreate_external(fname2, "/target_group", fid1, "ext_link", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_external(fname2, "/softlink_to_dset1", fid1, "ext_link_to_slink1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_external(fname2, "/softlink_to_dset2", fid1, "ext_link_to_slink2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -2158,14 +2158,14 @@ static int test_dangle_links(const char *fname1, const char *fname2)
*------------------------------------------------------------------------*/
fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid1 < 0) {
- fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
status = FAIL;
goto out;
}
fid2 = H5Fcreate(fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid2 < 0) {
- fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -2176,14 +2176,14 @@ static int test_dangle_links(const char *fname1, const char *fname2)
/* file1 */
status = write_dset(fid1, 2, dims2, "dset1", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = write_dset(fid1, 2, dims2, "dset2", H5T_NATIVE_INT, data2);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
@@ -2191,14 +2191,14 @@ static int test_dangle_links(const char *fname1, const char *fname2)
/* file2 */
status = write_dset(fid2, 2, dims2, "dset1", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
status = write_dset(fid2, 2, dims2, "dset2", H5T_NATIVE_INT, data2);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
@@ -2209,28 +2209,28 @@ static int test_dangle_links(const char *fname1, const char *fname2)
/* file 1 */
status = H5Lcreate_soft("no_obj", fid1, "soft_link1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("/dset1", fid1, "soft_link2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("no_obj", fid1, "soft_link3", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("no_obj1", fid1, "soft_link4", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -2238,28 +2238,28 @@ static int test_dangle_links(const char *fname1, const char *fname2)
/* file 2 */
status = H5Lcreate_soft("no_obj", fid2, "soft_link1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("no_obj", fid2, "soft_link2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("/dset2", fid2, "soft_link3", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("no_obj2", fid2, "soft_link4", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -2270,28 +2270,28 @@ static int test_dangle_links(const char *fname1, const char *fname2)
/* file1 */
status = H5Lcreate_external(fname2, "no_obj", fid1, "ext_link1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_external(fname2, "/dset1", fid1, "ext_link2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_external(fname2, "no_obj", fid1, "ext_link3", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_external("no_file.h5", "no_obj", fid1, "ext_link4", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -2299,28 +2299,28 @@ static int test_dangle_links(const char *fname1, const char *fname2)
/* file2 */
status = H5Lcreate_external(fname1, "no_obj", fid2, "ext_link1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2);
status = FAIL;
goto out;
}
status = H5Lcreate_external(fname1, "no_obj", fid2, "ext_link2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2);
status = FAIL;
goto out;
}
status = H5Lcreate_external(fname1, "/dset2", fid2, "ext_link3", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2);
status = FAIL;
goto out;
}
status = H5Lcreate_external("no_file.h5", "no_obj", fid2, "ext_link4", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -2361,14 +2361,14 @@ static int test_group_recurse(const char *fname1, const char *fname2)
*------------------------------------------------------------------------*/
fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid1 < 0) {
- fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
status = FAIL;
goto out;
}
fid2 = H5Fcreate(fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid2 < 0) {
- fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -2379,28 +2379,28 @@ static int test_group_recurse(const char *fname1, const char *fname2)
/* file1 */
gid1_f1 = H5Gcreate2(fid1, "/grp1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid1_f1 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
status = FAIL;
goto out;
}
gid2_f1 = H5Gcreate2(fid1, "/grp1/grp2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid2_f1 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
status = FAIL;
goto out;
}
gid3_f1 = H5Gcreate2(fid1, "/grp1/grp2/grp3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid3_f1 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
status = FAIL;
goto out;
}
gid10_f1 = H5Gcreate2(fid1, "/grp10", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid10_f1 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -2408,28 +2408,28 @@ static int test_group_recurse(const char *fname1, const char *fname2)
/* file2 */
gid1_f2 = H5Gcreate2(fid2, "/grp1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid1_f2 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
status = FAIL;
goto out;
}
gid2_f2 = H5Gcreate2(fid2, "/grp1/grp2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid2_f2 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
status = FAIL;
goto out;
}
gid3_f2 = H5Gcreate2(fid2, "/grp1/grp2/grp3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid3_f2 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
status = FAIL;
goto out;
}
gid11_f2 = H5Gcreate2(fid2, "/grp11", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid11_f2 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -2440,21 +2440,21 @@ static int test_group_recurse(const char *fname1, const char *fname2)
/* file1 */
status = write_dset(fid1, 2, dims2, "dset1", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = write_dset(fid1, 2, dims2, "dset2", H5T_NATIVE_INT, data2);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = write_dset(fid1, 2, dims2, "dset3", H5T_NATIVE_INT, data3);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
@@ -2462,21 +2462,21 @@ static int test_group_recurse(const char *fname1, const char *fname2)
/* file2 */
status = write_dset(fid2, 2, dims2, "dset1", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
status = write_dset(fid2, 2, dims2, "dset2", H5T_NATIVE_INT, data2);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
status = write_dset(fid2, 2, dims2, "dset3", H5T_NATIVE_INT, data3);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
@@ -2487,54 +2487,54 @@ static int test_group_recurse(const char *fname1, const char *fname2)
/* file1 */
status = write_dset(gid1_f1, 2, dims2, "dset1", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = write_dset(gid2_f1, 2, dims2, "dset1", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = write_dset(gid2_f1, 2, dims2, "dset2", H5T_NATIVE_INT, data2);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = write_dset(gid3_f1, 2, dims2, "dset1", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = write_dset(gid3_f1, 2, dims2, "dset2", H5T_NATIVE_INT, data2);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = write_dset(gid3_f1, 2, dims2, "dset3", H5T_NATIVE_INT, data3);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = write_dset(gid10_f1, 2, dims2, "dset4", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = write_dset(gid10_f1, 2, dims2, "dset5", H5T_NATIVE_INT, data3);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
@@ -2542,54 +2542,54 @@ static int test_group_recurse(const char *fname1, const char *fname2)
/* file2 */
status = write_dset(gid1_f2, 2, dims2, "dset1", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
status = write_dset(gid2_f2, 2, dims2, "dset1", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
status = write_dset(gid2_f2, 2, dims2, "dset2", H5T_NATIVE_INT, data2);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
status = write_dset(gid3_f2, 2, dims2, "dset1", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
status = write_dset(gid3_f2, 2, dims2, "dset2", H5T_NATIVE_INT, data2);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
status = write_dset(gid3_f2, 2, dims2, "dset3", H5T_NATIVE_INT, data3);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
status = write_dset(gid11_f2, 2, dims2, "dset4", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
status = write_dset(gid11_f2, 2, dims2, "dset5", H5T_NATIVE_INT, data2);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
@@ -2600,28 +2600,28 @@ static int test_group_recurse(const char *fname1, const char *fname2)
/* file 1 */
status = H5Lcreate_soft("/grp1", fid1, "slink_grp1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("/grp1/grp2", fid1, "slink_grp2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("/grp1/grp2/grp3", fid1, "slink_grp3", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("/grp10", fid1, "slink_grp10", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -2629,28 +2629,28 @@ static int test_group_recurse(const char *fname1, const char *fname2)
/* file 2 */
status = H5Lcreate_soft("/grp1", fid2, "slink_grp1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("/grp1/grp2", fid2, "slink_grp2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("/grp1/grp2/grp3", fid2, "slink_grp3", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
status = FAIL;
goto out;
}
status = H5Lcreate_soft("/grp11", fid2, "slink_grp11", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -2661,21 +2661,21 @@ static int test_group_recurse(const char *fname1, const char *fname2)
/* file1 */
status = H5Lcreate_external(fname2, "/grp1", fid1, "elink_grp1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_external(fname2, "/grp1/grp2", fid1, "elink_grp2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
status = FAIL;
goto out;
}
status = H5Lcreate_external(fname2, "/grp1/grp2/grp3", fid1, "elink_grp3", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -2683,21 +2683,21 @@ static int test_group_recurse(const char *fname1, const char *fname2)
/* file2 */
status = H5Lcreate_external(fname1, "/grp1", fid2, "elink_grp1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2);
status = FAIL;
goto out;
}
status = H5Lcreate_external(fname1, "/grp1/grp2", fid2, "elink_grp2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2);
status = FAIL;
goto out;
}
status = H5Lcreate_external(fname1, "/grp1/grp2/grp3", fid2, "elink_grp3", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -2709,14 +2709,14 @@ static int test_group_recurse(const char *fname1, const char *fname2)
/* file1 */
status = H5Lcreate_external(fname2, "/grp11", gid10_f1, "elink_grp_circle", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
status = FAIL;
goto out;
}
/* file2 */
status = H5Lcreate_external(fname1, "/grp10", gid11_f2, "elink_grp_circle", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -2790,28 +2790,28 @@ static int test_group_recurse2(void)
*------------------------------------------------------------------------*/
grp1 = H5Gcreate2(fileid1, "/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (grp1 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE1_EXT);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE1_EXT);
status = FAIL;
goto out;
}
grp2 = H5Gcreate2(grp1, "g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (grp2 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE1_EXT);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE1_EXT);
status = FAIL;
goto out;
}
grp3 = H5Gcreate2(grp2, "g3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (grp3 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE1_EXT);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE1_EXT);
status = FAIL;
goto out;
}
grp4 = H5Gcreate2(grp3, "g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (grp4 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE1_EXT);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE1_EXT);
status = FAIL;
goto out;
}
@@ -2886,7 +2886,7 @@ static int test_group_recurse2(void)
/* link to dset1 */
status = H5Lcreate_soft(GRP_R_DSETNAME1, fileid1, "soft_dset1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", GRP_RECURSE1_EXT);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", GRP_RECURSE1_EXT);
status = FAIL;
goto out;
}
@@ -2910,7 +2910,7 @@ static int test_group_recurse2(void)
*/
grp4 = H5Gcreate2(fileid4, "/g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (grp4 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE2_EXT3);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE2_EXT3);
status = FAIL;
goto out;
}
@@ -2944,14 +2944,14 @@ static int test_group_recurse2(void)
*/
grp2 = H5Gcreate2(fileid3, "g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (grp2 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE2_EXT2);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE2_EXT2);
status = FAIL;
goto out;
}
grp3 = H5Gcreate2(grp2, "g3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (grp3 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE2_EXT2);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE2_EXT2);
status = FAIL;
goto out;
}
@@ -2975,7 +2975,7 @@ static int test_group_recurse2(void)
*/
status = H5Lcreate_external(GRP_RECURSE2_EXT3, "/g4", fileid3, "/g2/g3/g4", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", GRP_RECURSE2_EXT2);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", GRP_RECURSE2_EXT2);
status = FAIL;
goto out;
}
@@ -2996,7 +2996,7 @@ static int test_group_recurse2(void)
*/
grp1 = H5Gcreate2(fileid2, "g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (grp1 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE1_EXT);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE1_EXT);
status = FAIL;
goto out;
}
@@ -3020,7 +3020,7 @@ static int test_group_recurse2(void)
/* link to dset1 */
status = H5Lcreate_soft(GRP_R_DSETNAME1, fileid2, "soft_dset1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", GRP_RECURSE2_EXT1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", GRP_RECURSE2_EXT1);
status = FAIL;
goto out;
}
@@ -3030,7 +3030,7 @@ static int test_group_recurse2(void)
*/
status = H5Lcreate_external(GRP_RECURSE2_EXT2, "/g2", fileid2, "/g1/g2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", GRP_RECURSE2_EXT1);
+ HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", GRP_RECURSE2_EXT1);
status = FAIL;
goto out;
}
@@ -3083,14 +3083,14 @@ static int test_exclude_obj1(const char *fname1, const char *fname2)
*------------------------------------------------------------------------*/
fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid1 < 0) {
- fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
status = FAIL;
goto out;
}
fid2 = H5Fcreate(fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid2 < 0) {
- fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -3101,7 +3101,7 @@ static int test_exclude_obj1(const char *fname1, const char *fname2)
/* file1 */
gid1 = H5Gcreate2(fid1, "group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid1 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -3110,7 +3110,7 @@ static int test_exclude_obj1(const char *fname1, const char *fname2)
gid2 = H5Gcreate2(fid2, "group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid2 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -3121,21 +3121,21 @@ static int test_exclude_obj1(const char *fname1, const char *fname2)
/* file1 */
status = write_dset(fid1, 2, dims2, "dset1", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = write_dset(gid1, 2, dims2, "dset2", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = write_dset(gid1, 2, dims2, "dset3", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
@@ -3143,21 +3143,21 @@ static int test_exclude_obj1(const char *fname1, const char *fname2)
/* file2 */
status = write_dset(fid2, 2, dims2, "dset1", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
status = write_dset(gid2, 2, dims2, "dset2", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
status = write_dset(gid2, 2, dims2, "dset3", H5T_NATIVE_INT, data2);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
@@ -3204,14 +3204,14 @@ static int test_exclude_obj2(const char *fname1, const char *fname2)
*------------------------------------------------------------------------*/
fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid1 < 0) {
- fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
status = FAIL;
goto out;
}
fid2 = H5Fcreate(fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid2 < 0) {
- fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -3222,7 +3222,7 @@ static int test_exclude_obj2(const char *fname1, const char *fname2)
/* file1 */
gid1 = H5Gcreate2(fid1, "group10", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid1 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -3230,7 +3230,7 @@ static int test_exclude_obj2(const char *fname1, const char *fname2)
/* file2 */
gid2 = H5Gcreate2(fid2, "group10", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid2 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -3239,7 +3239,7 @@ static int test_exclude_obj2(const char *fname1, const char *fname2)
gid3 = H5Gcreate2(fid2, "group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid3 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -3250,21 +3250,21 @@ static int test_exclude_obj2(const char *fname1, const char *fname2)
/* file1 */
status = write_dset(fid1, 2, dims2, "dset10", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = write_dset(fid1, 2, dims2, "dset1", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = write_dset(gid1, 2, dims2, "dset2", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
@@ -3272,21 +3272,21 @@ static int test_exclude_obj2(const char *fname1, const char *fname2)
/* file2 */
status = write_dset(fid2, 2, dims2, "dset10", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
status = write_dset(gid2, 2, dims2, "dset2", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
status = write_dset(gid3, 2, dims2, "dset3", H5T_NATIVE_INT, data2);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
@@ -3332,14 +3332,14 @@ static int test_exclude_obj3(const char *fname1, const char *fname2)
*------------------------------------------------------------------------*/
fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid1 < 0) {
- fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
status = FAIL;
goto out;
}
fid2 = H5Fcreate(fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid2 < 0) {
- fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2);
status = FAIL;
goto out;
}
@@ -3350,7 +3350,7 @@ static int test_exclude_obj3(const char *fname1, const char *fname2)
/* file1 */
gid1 = H5Gcreate2(fid1, "group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid1 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -3361,14 +3361,14 @@ static int test_exclude_obj3(const char *fname1, const char *fname2)
/* file1 */
status = write_dset(fid1, 2, dims2, "dset1", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
status = write_dset(gid1, 2, dims2, "dset", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1);
status = FAIL;
goto out;
}
@@ -3376,7 +3376,7 @@ static int test_exclude_obj3(const char *fname1, const char *fname2)
/* file2 */
status = write_dset(fid2, 2, dims2, "dset1", H5T_NATIVE_INT, data1);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2);
status = FAIL;
goto out;
}
@@ -3698,7 +3698,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
if (is_file_new == 1) {
fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid1 < 0) {
- fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -3706,7 +3706,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
else {
fid1 = H5Fopen(fname1, H5F_ACC_RDWR, H5P_DEFAULT);
if (fid1 < 0) {
- fprintf(stderr, "Error: %s> H5Fopen failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Fopen failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -3717,7 +3717,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
*------------------------------------------------------------------------*/
gid = H5Gcreate2(fid1, grp_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -3727,7 +3727,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
*------------------------------------------------------------------------*/
sid_vlen_str = H5Screate_simple(STR_RANK, dims_vlen_str, NULL);
if (sid_vlen_str < 0) {
- fprintf(stderr, "Error: %s> H5Screate_simple failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Screate_simple failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -3735,7 +3735,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
tid_vlen_str = H5Tcopy(H5T_C_S1);
status = H5Tset_size(tid_vlen_str, H5T_VARIABLE);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Tset_size failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Tset_size failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -3745,7 +3745,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
*------------------------------------------------------------------------*/
sid_fixlen_str = H5Screate_simple(STR_RANK, dims_fixlen_str, NULL);
if (sid_fixlen_str < 0) {
- fprintf(stderr, "Error: %s> H5Screate_simple failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Screate_simple failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -3753,7 +3753,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
tid_fixlen_str = H5Tcopy(H5T_C_S1);
status = H5Tset_size(tid_fixlen_str, FIXLEN_STR_SIZE);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Tset_size failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Tset_size failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -3763,7 +3763,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
*------------------------------------------------------------------------*/
sid_vlen_str_array = H5Screate_simple(STR_RANK, dims_vlen_str_array, NULL);
if (sid_vlen_str_array < 0) {
- fprintf(stderr, "Error: %s> H5Screate_simple failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Screate_simple failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -3771,7 +3771,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
tid_vlen_str_array_pre = H5Tcopy(H5T_C_S1);
status = H5Tset_size(tid_vlen_str_array_pre, H5T_VARIABLE);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Tset_size failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Tset_size failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -3779,7 +3779,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
/* Create the array data type for the string array */
tid_vlen_str_array = H5Tarray_create2(tid_vlen_str_array_pre, COMP_RANK, dims_vlen_str_array);
if (tid_vlen_str_array < 0) {
- fprintf(stderr, "Error: %s> H5Tarray_create2 failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Tarray_create2 failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -3789,7 +3789,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
*------------------------------------------------------------------------*/
sid_fixlen_str_array = H5Screate_simple(STR_RANK, dims_fixlen_str_array, NULL);
if (sid_fixlen_str_array < 0) {
- fprintf(stderr, "Error: %s> H5Screate_simple failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Screate_simple failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -3797,14 +3797,14 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
tid_fixlen_str_array_pre = H5Tcopy(H5T_C_S1);
status = H5Tset_size(tid_fixlen_str_array_pre, FIXLEN_STR_ARRY_SIZE);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Tset_size failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Tset_size failed.\n", fname1);
status = FAIL;
goto out;
}
/* Create the array data type for the string array */
tid_fixlen_str_array = H5Tarray_create2(tid_fixlen_str_array_pre, COMP_RANK, dims_fixlen_str_array);
if (tid_fixlen_str_array < 0) {
- fprintf(stderr, "Error: %s> H5Tarray_create2 failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Tarray_create2 failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -3814,7 +3814,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
*------------------------------------------------------------------------*/
sid_comp = H5Screate_simple(COMP_RANK, dims_comp, NULL);
if (sid_comp < 0) {
- fprintf(stderr, "Error: %s> H5Screate_simple failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Screate_simple failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -3928,7 +3928,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
did_comp = H5Dcreate2(gid, "Compound_dset1", tid1_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
status = H5Dwrite(did_comp, tid1_comp, H5S_ALL, H5S_ALL, H5P_DEFAULT, &comp1_buf);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -3938,7 +3938,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
did_comp = H5Dcreate2(gid, "Compound_dset2", tid2_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
status = H5Dwrite(did_comp, tid2_comp, H5S_ALL, H5S_ALL, H5P_DEFAULT, &comp2_buf);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -3948,7 +3948,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
did_comp = H5Dcreate2(gid, "Compound_dset3", tid3_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
status = H5Dwrite(did_comp, tid3_comp, H5S_ALL, H5S_ALL, H5P_DEFAULT, &comp3_buf);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -3958,7 +3958,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
did_comp = H5Dcreate2(gid, "Compound_dset4", tid4_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
status = H5Dwrite(did_comp, tid4_comp, H5S_ALL, H5S_ALL, H5P_DEFAULT, &comp4_buf);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -3968,7 +3968,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
did_comp = H5Dcreate2(gid, "Compound_dset5", tid5_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
status = H5Dwrite(did_comp, tid5_comp, H5S_ALL, H5S_ALL, H5P_DEFAULT, &comp5_buf);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -3978,7 +3978,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
did_comp = H5Dcreate2(gid, "Compound_dset6", tid6_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
status = H5Dwrite(did_comp, tid6_comp, H5S_ALL, H5S_ALL, H5P_DEFAULT, &comp6_buf);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -3988,7 +3988,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
did_comp = H5Dcreate2(gid, "Compound_dset7", tid7_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
status = H5Dwrite(did_comp, tid7_comp, H5S_ALL, H5S_ALL, H5P_DEFAULT, &comp7_buf);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -3998,7 +3998,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
did_comp = H5Dcreate2(gid, "Compound_dset8", tid8_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
status = H5Dwrite(did_comp, tid8_comp, H5S_ALL, H5S_ALL, H5P_DEFAULT, &comp8_buf);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -4014,7 +4014,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
status = H5Dwrite(did_comp, tid9_comp, H5S_ALL, H5S_ALL, H5P_DEFAULT, &comp9_buf);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -4136,14 +4136,14 @@ static int test_enums(const char *fname)
enum_val = 0;
status = H5Tenum_insert(tid, "YIN", &enum_val);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Tenum_insert failed.\n", fname);
+ HDfprintf(stderr, "Error: %s> H5Tenum_insert failed.\n", fname);
status = FAIL;
goto out;
}
enum_val = 1;
status = H5Tenum_insert(tid, "YANG", &enum_val);
if (status < 0) {
- fprintf(stderr, "Error: %s> H5Tenum_insert failed.\n", fname);
+ HDfprintf(stderr, "Error: %s> H5Tenum_insert failed.\n", fname);
status = FAIL;
goto out;
}
@@ -4154,13 +4154,13 @@ static int test_enums(const char *fname)
status = write_dset(fid, 1, &dims, "dset1", tid, data1);
if (status < 0) {
- fprintf(stderr, "Error: %s> write_dset failed.\n", fname);
+ HDfprintf(stderr, "Error: %s> write_dset failed.\n", fname);
status = FAIL;
goto out;
}
status = write_dset(fid, 1, &dims, "dset2", tid, data2);
if (status < 0) {
- fprintf(stderr, "Error: %s> write_dset failed.\n", fname);
+ HDfprintf(stderr, "Error: %s> write_dset failed.\n", fname);
status = FAIL;
goto out;
}
@@ -4794,7 +4794,7 @@ static void test_data_nocomparables(const char * fname, int make_diffs)
*------------------------------------------------------------------------*/
fid = H5Fcreate(fname, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid < 0) {
- fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname);
+ HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname);
status = FAIL;
goto out;
}
@@ -4804,14 +4804,14 @@ static void test_data_nocomparables(const char * fname, int make_diffs)
*------------------------------------------------------------------------*/
gid1 = H5Gcreate2(fid, "g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid1 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname);
status = FAIL;
goto out;
}
gid2 = H5Gcreate2(fid, "g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid2 < 0) {
- fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname);
+ HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname);
status = FAIL;
goto out;
}
@@ -4824,13 +4824,13 @@ static void test_data_nocomparables(const char * fname, int make_diffs)
/* dset1 */
if ((did1 = H5Dcreate2(gid1, "dset1", tid_dset1, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
- fprintf(stderr, "Error: %s> H5Dcreate2 failed.\n", "dset1");
+ HDfprintf(stderr, "Error: %s> H5Dcreate2 failed.\n", "dset1");
status = FAIL;
goto out;
}
if (H5Dwrite(did1, tid_dset1, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset_data_ptr1) < 0) {
- fprintf(stderr, "Error: %s> H5Dwrite failed.\n", "dset1");
+ HDfprintf(stderr, "Error: %s> H5Dwrite failed.\n", "dset1");
status = FAIL;
goto out;
}
@@ -4839,7 +4839,7 @@ static void test_data_nocomparables(const char * fname, int make_diffs)
/* dset2 */
status = write_dset(gid1, 1, dims1_1, "dset2", H5T_NATIVE_INT, dset_data_ptr2);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname);
goto out;
}
@@ -4849,13 +4849,13 @@ static void test_data_nocomparables(const char * fname, int make_diffs)
/* ---------
* dset1 */
if ((did2 = H5Dcreate2(gid2, "dset1", H5T_NATIVE_INT, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
- fprintf(stderr, "Error: %s> H5Dcreate2 failed.\n", "dset1");
+ HDfprintf(stderr, "Error: %s> H5Dcreate2 failed.\n", "dset1");
status = FAIL;
goto out;
}
if (H5Dwrite(did2, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset_data_ptr3) < 0) {
- fprintf(stderr, "Error: %s> H5Dwrite failed.\n", "dset1");
+ HDfprintf(stderr, "Error: %s> H5Dwrite failed.\n", "dset1");
status = FAIL;
goto out;
}
@@ -4875,7 +4875,7 @@ static void test_data_nocomparables(const char * fname, int make_diffs)
* dset2 */
status = write_dset(gid2, 1, dims1_1, "dset2", H5T_NATIVE_INT, dset_data_ptr3);
if (status == FAIL) {
- fprintf(stderr, "Error: %s> write_dset failed\n", fname);
+ HDfprintf(stderr, "Error: %s> write_dset failed\n", fname);
goto out;
}
@@ -5085,14 +5085,14 @@ static void test_objs_strings(const char *fname1, const char *fname2)
/* file1 */
fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid1 < 0) {
- fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
+ HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
goto out;
}
/* file2 */
fid2 = H5Fcreate(fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fid2 < 0) {
- fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2);
+ HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2);
goto out;
}
diff --git a/tools/test/h5dump/h5dumpgentest.c b/tools/test/h5dump/h5dumpgentest.c
index 699a226..35c3e3c 100644
--- a/tools/test/h5dump/h5dumpgentest.c
+++ b/tools/test/h5dump/h5dumpgentest.c
@@ -563,7 +563,7 @@ gent_attribute(void)
dims[0] = 24;
space = H5Screate_simple(1, dims, NULL);
attr = H5Acreate2(root, "/attr1", H5T_STD_I8BE, space, H5P_DEFAULT, H5P_DEFAULT);
- sprintf(buf, "attribute of root group");
+ HDsprintf(buf, "attribute of root group");
H5Awrite(attr, H5T_NATIVE_SCHAR, buf);
H5Sclose(space);
H5Aclose(attr);
@@ -1373,7 +1373,7 @@ static void gent_all(void)
dims[0] = 10;
space = H5Screate_simple(1, dims, NULL);
attr = H5Acreate2(group, "attr1", H5T_STD_I8BE, space, H5P_DEFAULT, H5P_DEFAULT);
- sprintf(buf, "abcdefghi");
+ HDsprintf(buf, "abcdefghi");
H5Awrite(attr, H5T_NATIVE_SCHAR, buf);
H5Sclose(space);
H5Aclose(attr);
@@ -1404,7 +1404,7 @@ static void gent_all(void)
dims[0] = 27;
space = H5Screate_simple(1, dims, NULL);
attr = H5Acreate2(dataset, "attr1", H5T_STD_I8BE, space, H5P_DEFAULT, H5P_DEFAULT);
- sprintf(buf, "1st attribute of dset1.1.1");
+ HDsprintf(buf, "1st attribute of dset1.1.1");
H5Awrite(attr, H5T_NATIVE_SCHAR, buf);
H5Sclose(space);
H5Aclose(attr);
@@ -1412,7 +1412,7 @@ static void gent_all(void)
dims[0] = 27;
space = H5Screate_simple(1, dims, NULL);
attr = H5Acreate2(dataset, "attr2", H5T_STD_I8BE, space, H5P_DEFAULT, H5P_DEFAULT);
- sprintf(buf, "2nd attribute of dset1.1.1");
+ HDsprintf(buf, "2nd attribute of dset1.1.1");
H5Awrite(attr, H5T_NATIVE_SCHAR, buf);
H5Sclose(space);
H5Aclose(attr);
@@ -1608,7 +1608,7 @@ gent_many(void)
dims[0] = 10;
space2 = H5Screate_simple(1, dims, NULL);
attr = H5Acreate2(dataset, "attr1", H5T_STD_I8BE, space2, H5P_DEFAULT, H5P_DEFAULT);
- sprintf(buf, "abcdefghi");
+ HDsprintf(buf, "abcdefghi");
H5Awrite(attr, H5T_NATIVE_CHAR, buf);
H5Sclose(space2);
H5Aclose(attr);
@@ -1927,9 +1927,9 @@ static void gent_str2(void)
dims[0] = 3;
space2 = H5Screate_simple(1, dims, NULL);
attr = H5Acreate2(dataset, "attr1", fxdlenstr2, space2, H5P_DEFAULT, H5P_DEFAULT);
- sprintf(&(buf2[0*LENSTR2]), "0123456789");
- sprintf(&(buf2[1*LENSTR2]), "abcdefghij");
- sprintf(&(buf2[2*LENSTR2]), "ABCDEFGHIJ");
+ HDsprintf(&(buf2[0*LENSTR2]), "0123456789");
+ HDsprintf(&(buf2[1*LENSTR2]), "abcdefghij");
+ HDsprintf(&(buf2[2*LENSTR2]), "ABCDEFGHIJ");
H5Awrite(attr, fxdlenstr2, buf2);
H5Sclose(space2);
H5Tclose(fxdlenstr2);
@@ -1941,7 +1941,7 @@ static void gent_str2(void)
for(i = 0; (hsize_t)i < sdim; i++) {
start[0] = (hsize_t)i;
- sprintf(buf, "This is row %1d of type H5T_STR_NULLTERM of", i);
+ HDsprintf(buf, "This is row %1d of type H5T_STR_NULLTERM of", i);
H5Tset_size(memtype, HDstrlen(buf)+1);
H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block);
H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf);
@@ -1954,7 +1954,7 @@ static void gent_str2(void)
for(i = 0; (hsize_t)i < sdim; i++) {
start[0] = (hsize_t)i;
- sprintf(buf, "This is row %1d of type H5T_STR_NULLTERM of string array", i);
+ HDsprintf(buf, "This is row %1d of type H5T_STR_NULLTERM of string array", i);
H5Tset_size(memtype, HDstrlen(buf)+1);
H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block);
H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf);
@@ -1974,7 +1974,7 @@ static void gent_str2(void)
for(i = 0;(hsize_t) i < sdim; i++) {
start[0] = (hsize_t)i;
- sprintf(buf, "This is row %1d of type H5T_STR_NULLPAD of", i);
+ HDsprintf(buf, "This is row %1d of type H5T_STR_NULLPAD of", i);
H5Tset_size(memtype, HDstrlen(buf)+1);
H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block);
H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf);
@@ -1988,7 +1988,7 @@ static void gent_str2(void)
for(i = 0; (hsize_t)i < sdim; i++) {
start[0] = (hsize_t)i;
- sprintf(buf, "This is row %1d of type H5T_STR_NULLPAD of string array", i);
+ HDsprintf(buf, "This is row %1d of type H5T_STR_NULLPAD of string array", i);
H5Tset_size(memtype, HDstrlen(buf)+1);
H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block);
H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf);
@@ -2007,7 +2007,7 @@ static void gent_str2(void)
for(i = 0; (hsize_t)i < sdim; i++) {
start[0] = (hsize_t)i;
- sprintf(buf, "This is row %1d of type H5T_STR_SPACEPAD of", i);
+ HDsprintf(buf, "This is row %1d of type H5T_STR_SPACEPAD of", i);
H5Tset_size(memtype, HDstrlen(buf) + 1);
H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block);
H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf);
@@ -2021,7 +2021,7 @@ static void gent_str2(void)
for(i = 0; (hsize_t)i < sdim; i++) {
start[0] = (hsize_t)i;
- sprintf(buf, "This is row %1d of type H5T_STR_SPACEPAD of string array", i);
+ HDsprintf(buf, "This is row %1d of type H5T_STR_SPACEPAD of string array", i);
H5Tset_size(memtype, HDstrlen(buf) + 1);
H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block);
H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf);
@@ -2704,14 +2704,14 @@ gent_vldatatypes2(void)
for(i = 0; i < SPACE1_DIM1; i++) {
wdata[i].p = (hvl_t *)HDmalloc((i + 1) * sizeof(hvl_t));
if(wdata[i].p == NULL) {
- printf("Cannot allocate memory for VL data! i=%u\n", i);
+ HDprintf("Cannot allocate memory for VL data! i=%u\n", i);
return;
} /* end if */
wdata[i].len = i + 1;
for(t1 = (hvl_t *)wdata[i].p, j = 0; j < (i + 1); j++, t1++) {
t1->p = (unsigned *)HDmalloc((j + 1) * sizeof(unsigned));
if(t1->p == NULL) {
- printf("Cannot allocate memory for VL data! i=%u, j=%u\n",i,j);
+ HDprintf("Cannot allocate memory for VL data! i=%u, j=%u\n",i,j);
return;
} /* end if */
t1->len=j+1;
@@ -3763,9 +3763,9 @@ void gent_multi(void)
for(mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t,mt)) {
memb_fapl[mt] = H5P_DEFAULT;
memb_map[mt] = mt;
- sprintf(sv[mt], "%%s-%c.h5", multi_letters[mt]);
+ HDsprintf(sv[mt], "%%s-%c.h5", multi_letters[mt]);
memb_name[mt] = sv[mt];
- /*printf("memb_name[%d]=%s, memb_map[%d]=%d; ", mt, memb_name[mt], mt, memb_map[mt]);*/
+ /*HDprintf("memb_name[%d]=%s, memb_map[%d]=%d; ", mt, memb_name[mt], mt, memb_map[mt]);*/
memb_addr[mt] = (haddr_t)MAX(mt - 1, 0) * (HADDR_MAX / 10);
}
memb_map[H5FD_MEM_DEFAULT] = H5FD_MEM_SUPER;
@@ -3804,7 +3804,7 @@ static void gent_large_objname(void)
group = H5Gcreate2(fid, "this_is_a_large_group_name", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
for(i = 0; i < 50; ++i) {
- sprintf(grp_name, "this_is_a_large_group_name%d", i);
+ HDsprintf(grp_name, "this_is_a_large_group_name%d", i);
group2 = H5Gcreate2(group, grp_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gclose(group2);
}
@@ -6275,7 +6275,7 @@ static int gent_ldouble(void)
return 0;
error:
- printf("error !\n");
+ HDprintf("error !\n");
return -1;
}
@@ -6438,7 +6438,7 @@ gent_bigdims(void)
return;
out:
- printf("Error.....\n");
+ HDprintf("Error.....\n");
H5E_BEGIN_TRY {
H5Pclose(dcpl);
H5Sclose(f_sid);
@@ -6630,7 +6630,7 @@ gent_group_creation_order(void)
return;
out:
- printf("Error.....\n");
+ HDprintf("Error.....\n");
H5E_BEGIN_TRY {
H5Gclose(gid);
H5Pclose(gcpl_id);
@@ -6899,7 +6899,7 @@ gent_attr_creation_order(void)
return;
out:
- printf("Error.....\n");
+ HDprintf("Error.....\n");
H5E_BEGIN_TRY {
H5Gclose(gid);
H5Dclose(did);
diff --git a/tools/test/h5import/h5importtest.c b/tools/test/h5import/h5importtest.c
index bbb67b6..560f1b3 100644
--- a/tools/test/h5import/h5importtest.c
+++ b/tools/test/h5import/h5importtest.c
@@ -183,8 +183,8 @@ main(void)
for (i = 0; i < nrow; i++)
{
for (j = 0; j < ncol; j++)
- (void) fprintf(sp, "%10u", b8i3[k][i][j]);
- (void) fprintf(sp, "\n");
+ (void) HDfprintf(sp, "%10u", b8i3[k][i][j]);
+ (void) HDfprintf(sp, "\n");
}
}
(void) HDfclose(sp);
@@ -200,8 +200,8 @@ main(void)
for (i = 0; i < nrow; i++)
{
for (j = 0; j < ncol; j++)
- (void) fprintf(sp, "%10u", b16i3[k][i][j]);
- (void) fprintf(sp, "\n");
+ (void) HDfprintf(sp, "%10u", b16i3[k][i][j]);
+ (void) HDfprintf(sp, "\n");
}
}
(void) HDfclose(sp);
@@ -217,8 +217,8 @@ main(void)
for (i = 0; i < nrow; i++)
{
for (j = 0; j < ncol; j++)
- (void) fprintf(sp, "%10d", b32i3[k][i][j]);
- (void) fprintf(sp, "\n");
+ (void) HDfprintf(sp, "%10d", b32i3[k][i][j]);
+ (void) HDfprintf(sp, "\n");
}
}
(void) HDfclose(sp);
@@ -243,16 +243,16 @@ main(void)
(void) HDfclose(sp);
sp = HDfopen("binin32.conf", "w");
- (void) fprintf(sp, "PATH /int/bin/32-bit\n");
- (void) fprintf(sp, "INPUT-CLASS IN\n");
- (void) fprintf(sp, "INPUT-SIZE 32\n");
- (void) fprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order);
- (void) fprintf(sp, "RANK 3\n");
- (void) fprintf(sp, "OUTPUT-ARCHITECTURE STD\n");
- (void) fprintf(sp, "OUTPUT-BYTE-ORDER BE\n");
- (void) fprintf(sp, "DIMENSION-SIZES 5 3 4\n");
- (void) fprintf(sp, "CHUNKED-DIMENSION-SIZES 1 2 1\n");
- (void) fprintf(sp, "\n");
+ (void) HDfprintf(sp, "PATH /int/bin/32-bit\n");
+ (void) HDfprintf(sp, "INPUT-CLASS IN\n");
+ (void) HDfprintf(sp, "INPUT-SIZE 32\n");
+ (void) HDfprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order);
+ (void) HDfprintf(sp, "RANK 3\n");
+ (void) HDfprintf(sp, "OUTPUT-ARCHITECTURE STD\n");
+ (void) HDfprintf(sp, "OUTPUT-BYTE-ORDER BE\n");
+ (void) HDfprintf(sp, "DIMENSION-SIZES 5 3 4\n");
+ (void) HDfprintf(sp, "CHUNKED-DIMENSION-SIZES 1 2 1\n");
+ (void) HDfprintf(sp, "\n");
(void) HDfclose(sp);
/*-------------------------------------------------------------------------
@@ -274,15 +274,15 @@ main(void)
(void) HDfclose(sp);
sp = HDfopen("binuin32.conf", "w");
- (void) fprintf(sp, "PATH /int/buin/32-bit\n");
- (void) fprintf(sp, "INPUT-CLASS UIN\n");
- (void) fprintf(sp, "INPUT-SIZE 32\n");
- (void) fprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order);
- (void) fprintf(sp, "RANK 3\n");
- (void) fprintf(sp, "OUTPUT-ARCHITECTURE STD\n");
- (void) fprintf(sp, "OUTPUT-BYTE-ORDER LE\n");
- (void) fprintf(sp, "DIMENSION-SIZES 5 3 4\n");
- (void) fprintf(sp, "\n");
+ (void) HDfprintf(sp, "PATH /int/buin/32-bit\n");
+ (void) HDfprintf(sp, "INPUT-CLASS UIN\n");
+ (void) HDfprintf(sp, "INPUT-SIZE 32\n");
+ (void) HDfprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order);
+ (void) HDfprintf(sp, "RANK 3\n");
+ (void) HDfprintf(sp, "OUTPUT-ARCHITECTURE STD\n");
+ (void) HDfprintf(sp, "OUTPUT-BYTE-ORDER LE\n");
+ (void) HDfprintf(sp, "DIMENSION-SIZES 5 3 4\n");
+ (void) HDfprintf(sp, "\n");
(void) HDfclose(sp);
/*-------------------------------------------------------------------------
@@ -304,17 +304,17 @@ main(void)
(void) HDfclose(sp);
sp = HDfopen("binin16.conf", "w");
- (void) fprintf(sp, "PATH /int/bin/16-bit\n");
- (void) fprintf(sp, "INPUT-CLASS IN\n");
- (void) fprintf(sp, "INPUT-SIZE 16\n");
- (void) fprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order);
- (void) fprintf(sp, "RANK 3\n");
- (void) fprintf(sp, "OUTPUT-ARCHITECTURE STD\n");
- (void) fprintf(sp, "OUTPUT-BYTE-ORDER LE\n");
- (void) fprintf(sp, "DIMENSION-SIZES 2 3 4\n");
- (void) fprintf(sp, "CHUNKED-DIMENSION-SIZES 2 2 2\n");
- (void) fprintf(sp, "MAXIMUM-DIMENSIONS -1 -1 8\n");
- (void) fprintf(sp, "\n");
+ (void) HDfprintf(sp, "PATH /int/bin/16-bit\n");
+ (void) HDfprintf(sp, "INPUT-CLASS IN\n");
+ (void) HDfprintf(sp, "INPUT-SIZE 16\n");
+ (void) HDfprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order);
+ (void) HDfprintf(sp, "RANK 3\n");
+ (void) HDfprintf(sp, "OUTPUT-ARCHITECTURE STD\n");
+ (void) HDfprintf(sp, "OUTPUT-BYTE-ORDER LE\n");
+ (void) HDfprintf(sp, "DIMENSION-SIZES 2 3 4\n");
+ (void) HDfprintf(sp, "CHUNKED-DIMENSION-SIZES 2 2 2\n");
+ (void) HDfprintf(sp, "MAXIMUM-DIMENSIONS -1 -1 8\n");
+ (void) HDfprintf(sp, "\n");
(void) HDfclose(sp);
/*-------------------------------------------------------------------------
@@ -335,17 +335,17 @@ main(void)
(void) HDfclose(sp);
sp = HDfopen("binuin16.conf", "w");
- (void) fprintf(sp, "PATH /int/buin/16-bit\n");
- (void) fprintf(sp, "INPUT-CLASS UIN\n");
- (void) fprintf(sp, "INPUT-SIZE 16\n");
- (void) fprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order);
- (void) fprintf(sp, "RANK 3\n");
- (void) fprintf(sp, "OUTPUT-ARCHITECTURE STD\n");
- (void) fprintf(sp, "OUTPUT-BYTE-ORDER BE\n");
- (void) fprintf(sp, "DIMENSION-SIZES 2 3 4\n");
- (void) fprintf(sp, "CHUNKED-DIMENSION-SIZES 2 2 2\n");
- (void) fprintf(sp, "MAXIMUM-DIMENSIONS -1 -1 8\n");
- (void) fprintf(sp, "\n");
+ (void) HDfprintf(sp, "PATH /int/buin/16-bit\n");
+ (void) HDfprintf(sp, "INPUT-CLASS UIN\n");
+ (void) HDfprintf(sp, "INPUT-SIZE 16\n");
+ (void) HDfprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order);
+ (void) HDfprintf(sp, "RANK 3\n");
+ (void) HDfprintf(sp, "OUTPUT-ARCHITECTURE STD\n");
+ (void) HDfprintf(sp, "OUTPUT-BYTE-ORDER BE\n");
+ (void) HDfprintf(sp, "DIMENSION-SIZES 2 3 4\n");
+ (void) HDfprintf(sp, "CHUNKED-DIMENSION-SIZES 2 2 2\n");
+ (void) HDfprintf(sp, "MAXIMUM-DIMENSIONS -1 -1 8\n");
+ (void) HDfprintf(sp, "\n");
(void) HDfclose(sp);
/*-------------------------------------------------------------------------
@@ -367,20 +367,20 @@ main(void)
(void) HDfclose(sp);
sp = HDfopen("binin8.conf", "w");
- (void) fprintf(sp, "PATH /int/bin/8-bit\n");
- (void) fprintf(sp, "INPUT-CLASS IN\n");
- (void) fprintf(sp, "INPUT-SIZE 8\n");
- (void) fprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order);
- (void) fprintf(sp, "RANK 3\n");
- (void) fprintf(sp, "OUTPUT-CLASS IN\n");
- (void) fprintf(sp, "OUTPUT-SIZE 16\n");
- (void) fprintf(sp, "OUTPUT-ARCHITECTURE STD\n");
- (void) fprintf(sp, "OUTPUT-BYTE-ORDER LE\n");
- (void) fprintf(sp, "DIMENSION-SIZES 5 3 4\n");
- (void) fprintf(sp, "CHUNKED-DIMENSION-SIZES 2 2 2\n");
- (void) fprintf(sp, "MAXIMUM-DIMENSIONS -1 -1 -1\n");
- (void) fprintf(sp, "COMPRESSION-PARAM 3\n");
- (void) fprintf(sp, "\n");
+ (void) HDfprintf(sp, "PATH /int/bin/8-bit\n");
+ (void) HDfprintf(sp, "INPUT-CLASS IN\n");
+ (void) HDfprintf(sp, "INPUT-SIZE 8\n");
+ (void) HDfprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order);
+ (void) HDfprintf(sp, "RANK 3\n");
+ (void) HDfprintf(sp, "OUTPUT-CLASS IN\n");
+ (void) HDfprintf(sp, "OUTPUT-SIZE 16\n");
+ (void) HDfprintf(sp, "OUTPUT-ARCHITECTURE STD\n");
+ (void) HDfprintf(sp, "OUTPUT-BYTE-ORDER LE\n");
+ (void) HDfprintf(sp, "DIMENSION-SIZES 5 3 4\n");
+ (void) HDfprintf(sp, "CHUNKED-DIMENSION-SIZES 2 2 2\n");
+ (void) HDfprintf(sp, "MAXIMUM-DIMENSIONS -1 -1 -1\n");
+ (void) HDfprintf(sp, "COMPRESSION-PARAM 3\n");
+ (void) HDfprintf(sp, "\n");
(void) HDfclose(sp);
#endif /* UNICOS */
@@ -408,18 +408,18 @@ main(void)
(void) HDfclose(sp);
sp = HDfopen("binfp64.conf", "w");
- (void) fprintf(sp, "PATH /fp/bin/64-bit\n");
- (void) fprintf(sp, "INPUT-CLASS FP\n");
- (void) fprintf(sp, "INPUT-SIZE 64\n");
- (void) fprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order);
- (void) fprintf(sp, "RANK 3\n");
- (void) fprintf(sp, "OUTPUT-ARCHITECTURE IEEE\n");
- (void) fprintf(sp, "OUTPUT-BYTE-ORDER LE\n");
- (void) fprintf(sp, "DIMENSION-SIZES 5 3 4\n");
- (void) fprintf(sp, "CHUNKED-DIMENSION-SIZES 2 2 2\n");
- (void) fprintf(sp, "MAXIMUM-DIMENSIONS -1 6 7\n");
- (void) fprintf(sp, "COMPRESSION-PARAM 8\n");
- (void) fprintf(sp, "\n");
+ (void) HDfprintf(sp, "PATH /fp/bin/64-bit\n");
+ (void) HDfprintf(sp, "INPUT-CLASS FP\n");
+ (void) HDfprintf(sp, "INPUT-SIZE 64\n");
+ (void) HDfprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order);
+ (void) HDfprintf(sp, "RANK 3\n");
+ (void) HDfprintf(sp, "OUTPUT-ARCHITECTURE IEEE\n");
+ (void) HDfprintf(sp, "OUTPUT-BYTE-ORDER LE\n");
+ (void) HDfprintf(sp, "DIMENSION-SIZES 5 3 4\n");
+ (void) HDfprintf(sp, "CHUNKED-DIMENSION-SIZES 2 2 2\n");
+ (void) HDfprintf(sp, "MAXIMUM-DIMENSIONS -1 6 7\n");
+ (void) HDfprintf(sp, "COMPRESSION-PARAM 8\n");
+ (void) HDfprintf(sp, "\n");
(void) HDfclose(sp);
/*-------------------------------------------------------------------------
@@ -436,21 +436,21 @@ main(void)
{
char c = bin8w[i];
if ( HDfwrite( &c, sizeof(char), 1, sp) != 1 )
- printf("error writing file\n");
+ HDprintf("error writing file\n");
}
HDfclose(sp);
sp = HDfopen("binin8w.conf", "w");
- (void) fprintf(sp, "INPUT-CLASS IN\n");
- (void) fprintf(sp, "INPUT-SIZE 8\n");
- (void) fprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order);
- (void) fprintf(sp, "RANK 1\n");
- (void) fprintf(sp, "OUTPUT-CLASS IN\n");
- (void) fprintf(sp, "OUTPUT-SIZE 8\n");
- (void) fprintf(sp, "OUTPUT-ARCHITECTURE STD\n");
- (void) fprintf(sp, "OUTPUT-BYTE-ORDER LE\n");
- (void) fprintf(sp, "DIMENSION-SIZES 4\n");
- (void) fprintf(sp, "\n");
+ (void) HDfprintf(sp, "INPUT-CLASS IN\n");
+ (void) HDfprintf(sp, "INPUT-SIZE 8\n");
+ (void) HDfprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order);
+ (void) HDfprintf(sp, "RANK 1\n");
+ (void) HDfprintf(sp, "OUTPUT-CLASS IN\n");
+ (void) HDfprintf(sp, "OUTPUT-SIZE 8\n");
+ (void) HDfprintf(sp, "OUTPUT-ARCHITECTURE STD\n");
+ (void) HDfprintf(sp, "OUTPUT-BYTE-ORDER LE\n");
+ (void) HDfprintf(sp, "DIMENSION-SIZES 4\n");
+ (void) HDfprintf(sp, "\n");
(void) HDfclose(sp);
}
diff --git a/tools/test/h5jam/h5jamgentest.c b/tools/test/h5jam/h5jamgentest.c
index 1644440..56b4ead 100644
--- a/tools/test/h5jam/h5jamgentest.c
+++ b/tools/test/h5jam/h5jamgentest.c
@@ -172,7 +172,7 @@ gent_ub(const char * filename, size_t ub_size, size_t ub_fill)
dims[0] = 10;
space = H5Screate_simple(1, dims, NULL);
attr = H5Acreate2(group, "attr1", H5T_STD_I8BE, space, H5P_DEFAULT, H5P_DEFAULT);
- sprintf(buf, "abcdefghi");
+ HDsprintf(buf, "abcdefghi");
H5Awrite(attr, H5T_NATIVE_SCHAR, buf);
H5Sclose(space);
H5Aclose(attr);
@@ -203,7 +203,7 @@ gent_ub(const char * filename, size_t ub_size, size_t ub_fill)
dims[0] = 27;
space = H5Screate_simple(1, dims, NULL);
attr = H5Acreate2(dataset, "attr1", H5T_STD_I8BE, space, H5P_DEFAULT, H5P_DEFAULT);
- sprintf(buf, "1st attribute of dset1.1.1");
+ HDsprintf(buf, "1st attribute of dset1.1.1");
H5Awrite(attr, H5T_NATIVE_SCHAR, buf);
H5Sclose(space);
H5Aclose(attr);
@@ -211,7 +211,7 @@ gent_ub(const char * filename, size_t ub_size, size_t ub_fill)
dims[0] = 27;
space = H5Screate_simple(1, dims, NULL);
attr = H5Acreate2(dataset, "attr2", H5T_STD_I8BE, space, H5P_DEFAULT, H5P_DEFAULT);
- sprintf(buf, "2nd attribute of dset1.1.1");
+ HDsprintf(buf, "2nd attribute of dset1.1.1");
H5Awrite(attr, H5T_NATIVE_SCHAR, buf);
H5Sclose(space);
H5Aclose(attr);
diff --git a/tools/test/h5repack/h5repacktst.c b/tools/test/h5repack/h5repacktst.c
index a89bf10..057cbbd 100644
--- a/tools/test/h5repack/h5repacktst.c
+++ b/tools/test/h5repack/h5repacktst.c
@@ -3108,7 +3108,7 @@ int make_early(void)
goto out;
if ((tid = H5Tcopy(H5T_NATIVE_DOUBLE)) < 0)
goto out;
- sprintf(name, "%d", i);
+ HDsprintf(name, "%d", i);
if ((H5Tcommit2(fid, name, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
if (H5Tclose(tid) < 0)
@@ -3133,7 +3133,7 @@ int make_early(void)
{
if ((tid = H5Tcopy(H5T_NATIVE_DOUBLE)) < 0)
goto out;
- sprintf(name, "%d", i);
+ HDsprintf(name, "%d", i);
if ((H5Tcommit2(fid, name, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
if (H5Tclose(tid) < 0)
@@ -3195,7 +3195,7 @@ int make_layout(hid_t loc_id)
*/
for (i=0; i<4; i++)
{
- sprintf(name,"dset%d",i+1);
+ HDsprintf(name,"dset%d",i+1);
if (write_dset(loc_id,RANK,dims,name,H5T_NATIVE_INT,buf) < 0)
return -1;
}
@@ -6182,7 +6182,7 @@ static herr_t add_attr_with_objref(hid_t file_id, hid_t obj_id)
status = H5Rcreate(&data_attr_objref[0],file_id,NAME_OBJ_DS1,H5R_OBJECT,(hid_t)-1);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6191,7 +6191,7 @@ static herr_t add_attr_with_objref(hid_t file_id, hid_t obj_id)
status = H5Rcreate(&data_attr_objref[1],file_id,NAME_OBJ_GRP,H5R_OBJECT,(hid_t)-1);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6200,7 +6200,7 @@ static herr_t add_attr_with_objref(hid_t file_id, hid_t obj_id)
status = H5Rcreate(&data_attr_objref[2],file_id,NAME_OBJ_NDTYPE,H5R_OBJECT,(hid_t)-1);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6209,7 +6209,7 @@ static herr_t add_attr_with_objref(hid_t file_id, hid_t obj_id)
status = make_attr(obj_id,1,dim_attr_objref,"Attr_OBJREF",H5T_STD_REF_OBJ,data_attr_objref);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> make_attr failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> make_attr failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6251,7 +6251,7 @@ static herr_t add_attr_with_regref(hid_t file_id, hid_t obj_id)
sid_regrefed_dset = H5Screate_simple (2, dim_regrefed_dset, NULL);
if (sid_regrefed_dset < 0)
{
- fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6260,7 +6260,7 @@ static herr_t add_attr_with_regref(hid_t file_id, hid_t obj_id)
status = H5Sselect_elements (sid_regrefed_dset, H5S_SELECT_SET, (size_t)3, coords_regrefed_dset[0]);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6269,7 +6269,7 @@ static herr_t add_attr_with_regref(hid_t file_id, hid_t obj_id)
status = H5Rcreate (&data_attr_regref[0], file_id, NAME_OBJ_DS2, H5R_DATASET_REGION, sid_regrefed_dset);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6278,7 +6278,7 @@ static herr_t add_attr_with_regref(hid_t file_id, hid_t obj_id)
status = make_attr(obj_id,1,dim_attr_regref,"Attr_REGREF",H5T_STD_REF_DSETREG,data_attr_regref);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> make_attr failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> make_attr failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6324,7 +6324,7 @@ static herr_t gen_refered_objs(hid_t loc_id)
sid = H5Screate_simple(1, dims1, NULL);
if (sid < 0)
{
- fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6332,7 +6332,7 @@ static herr_t gen_refered_objs(hid_t loc_id)
did1 = H5Dcreate2 (loc_id, NAME_OBJ_DS1, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (did1 < 0)
{
- fprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6340,7 +6340,7 @@ static herr_t gen_refered_objs(hid_t loc_id)
status = H5Dwrite(did1, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6352,7 +6352,7 @@ static herr_t gen_refered_objs(hid_t loc_id)
gid = H5Gcreate2 (loc_id, NAME_OBJ_GRP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid < 0)
{
- fprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6365,7 +6365,7 @@ static herr_t gen_refered_objs(hid_t loc_id)
status = H5Tcommit2(loc_id, NAME_OBJ_NDTYPE, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Tcommit2 failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Tcommit2 failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6378,7 +6378,7 @@ static herr_t gen_refered_objs(hid_t loc_id)
sid2 = H5Screate_simple (2, dims2, NULL);
if (sid2 < 0)
{
- fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6387,7 +6387,7 @@ static herr_t gen_refered_objs(hid_t loc_id)
did2 = H5Dcreate2 (loc_id, NAME_OBJ_DS2, H5T_STD_I8LE, sid2, H5P_DEFAULT,H5P_DEFAULT,H5P_DEFAULT);
if (did2 < 0)
{
- fprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6396,7 +6396,7 @@ static herr_t gen_refered_objs(hid_t loc_id)
status = H5Dwrite (did2, H5T_NATIVE_CHAR, H5S_ALL, H5S_ALL, H5P_DEFAULT, data2);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6453,7 +6453,7 @@ static herr_t gen_obj_ref(hid_t loc_id)
status = H5Rcreate (&objref_buf[0], loc_id, NAME_OBJ_DS1, H5R_OBJECT, (hid_t)-1);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6462,7 +6462,7 @@ static herr_t gen_obj_ref(hid_t loc_id)
status = H5Rcreate (&objref_buf[1], loc_id, NAME_OBJ_GRP, H5R_OBJECT, (hid_t)-1);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6471,7 +6471,7 @@ static herr_t gen_obj_ref(hid_t loc_id)
status = H5Rcreate (&objref_buf[2], loc_id, NAME_OBJ_NDTYPE, H5R_OBJECT, (hid_t)-1);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6482,7 +6482,7 @@ static herr_t gen_obj_ref(hid_t loc_id)
sid = H5Screate_simple (1, dims_dset_objref, NULL);
if (sid < 0)
{
- fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6490,7 +6490,7 @@ static herr_t gen_obj_ref(hid_t loc_id)
oid = H5Dcreate2 (loc_id, "Dset_OBJREF", H5T_STD_REF_OBJ, sid, H5P_DEFAULT,H5P_DEFAULT,H5P_DEFAULT);
if (oid < 0)
{
- fprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6498,7 +6498,7 @@ static herr_t gen_obj_ref(hid_t loc_id)
status = H5Dwrite(oid, H5T_STD_REF_OBJ, H5S_ALL, H5S_ALL, H5P_DEFAULT, objref_buf);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6511,7 +6511,7 @@ static herr_t gen_obj_ref(hid_t loc_id)
status = add_attr_with_objref(loc_id, oid);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> add_attr_with_objref failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> add_attr_with_objref failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6520,7 +6520,7 @@ static herr_t gen_obj_ref(hid_t loc_id)
status = add_attr_with_regref(loc_id, oid);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> add_attr_with_regref failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> add_attr_with_regref failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6573,7 +6573,7 @@ static herr_t gen_region_ref(hid_t loc_id)
sid_trg = H5Screate_simple (2, dims_trg, NULL);
if (sid_trg < 0)
{
- fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6582,7 +6582,7 @@ static herr_t gen_region_ref(hid_t loc_id)
status = H5Sselect_elements (sid_trg, H5S_SELECT_SET, (size_t)4, coords[0]);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6591,7 +6591,7 @@ static herr_t gen_region_ref(hid_t loc_id)
status = H5Rcreate (&rr_data[0], loc_id, NAME_OBJ_DS2, H5R_DATASET_REGION, sid_trg);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6600,7 +6600,7 @@ static herr_t gen_region_ref(hid_t loc_id)
status = H5Sselect_hyperslab (sid_trg, H5S_SELECT_SET, start, stride, count, block);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Sselect_hyperslab failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Sselect_hyperslab failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6609,7 +6609,7 @@ static herr_t gen_region_ref(hid_t loc_id)
status = H5Rcreate (&rr_data[1], loc_id, NAME_OBJ_DS2, H5R_DATASET_REGION, sid_trg);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6618,7 +6618,7 @@ static herr_t gen_region_ref(hid_t loc_id)
sid_ref = H5Screate_simple (1, dims1, NULL);
if (sid_ref < 0)
{
- fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6627,7 +6627,7 @@ static herr_t gen_region_ref(hid_t loc_id)
oid_ref = H5Dcreate2 (loc_id, REG_REF_DS1, H5T_STD_REF_DSETREG, sid_ref, H5P_DEFAULT,H5P_DEFAULT,H5P_DEFAULT);
if (oid_ref < 0)
{
- fprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6636,7 +6636,7 @@ static herr_t gen_region_ref(hid_t loc_id)
status = H5Dwrite (oid_ref, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, rr_data);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6649,7 +6649,7 @@ static herr_t gen_region_ref(hid_t loc_id)
status = add_attr_with_objref(loc_id, oid_ref);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> add_attr_with_objref failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> add_attr_with_objref failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6658,7 +6658,7 @@ static herr_t gen_region_ref(hid_t loc_id)
status = add_attr_with_regref(loc_id, oid_ref);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> add_attr_with_regref failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> add_attr_with_regref failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6691,7 +6691,7 @@ static herr_t make_references(hid_t loc_id)
status = gen_refered_objs(loc_id);
if (status == FAIL)
{
- fprintf(stderr, "Failed to generate referenced object.\n");
+ HDfprintf(stderr, "Failed to generate referenced object.\n");
ret = FAIL;
}
@@ -6699,7 +6699,7 @@ static herr_t make_references(hid_t loc_id)
status = gen_obj_ref(loc_id);
if (status == FAIL)
{
- fprintf(stderr, "Failed to generate object reference.\n");
+ HDfprintf(stderr, "Failed to generate object reference.\n");
ret = FAIL;
}
@@ -6707,7 +6707,7 @@ static herr_t make_references(hid_t loc_id)
status = gen_region_ref(loc_id);
if (status == FAIL)
{
- fprintf(stderr, "Failed to generate region reference.\n");
+ HDfprintf(stderr, "Failed to generate region reference.\n");
ret = FAIL;
}
@@ -6831,7 +6831,7 @@ static herr_t make_complex_attr_references(hid_t loc_id)
status = H5Dwrite(objdid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, obj_data[0]);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6841,7 +6841,7 @@ static herr_t make_complex_attr_references(hid_t loc_id)
status = H5Tcommit2(loc_id, NAME_OBJ_NDTYPE, objtid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Tcommit2 failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Tcommit2 failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6854,7 +6854,7 @@ static herr_t make_complex_attr_references(hid_t loc_id)
main_gid = H5Gcreate2(loc_id, "group_main", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (main_gid < 0)
{
- fprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6869,7 +6869,7 @@ static herr_t make_complex_attr_references(hid_t loc_id)
status = H5Dwrite(main_did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, obj_data[0]);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6893,7 +6893,7 @@ static herr_t make_complex_attr_references(hid_t loc_id)
status = H5Rcreate (&(comp_objref_data[0].val_objref), loc_id, NAME_OBJ_DS1, H5R_OBJECT,(hid_t)-1);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6903,7 +6903,7 @@ static herr_t make_complex_attr_references(hid_t loc_id)
status = H5Rcreate (&(comp_objref_data[1].val_objref), loc_id, NAME_OBJ_GRP, H5R_OBJECT,(hid_t)-1);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6913,7 +6913,7 @@ static herr_t make_complex_attr_references(hid_t loc_id)
status = H5Rcreate (&(comp_objref_data[2].val_objref), loc_id, NAME_OBJ_NDTYPE, H5R_OBJECT,(hid_t)-1);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6927,7 +6927,7 @@ static herr_t make_complex_attr_references(hid_t loc_id)
status = H5Awrite (comp_objref_aid, comp_objref_tid, comp_objref_data);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Awrite failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Awrite failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6949,14 +6949,14 @@ static herr_t make_complex_attr_references(hid_t loc_id)
status = H5Sselect_elements (objsid, H5S_SELECT_SET, (size_t)4, coords[0]);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
status = H5Rcreate (&(comp_regref_data[0].val_regref), loc_id, NAME_OBJ_DS1, H5R_DATASET_REGION, objsid);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6970,7 +6970,7 @@ static herr_t make_complex_attr_references(hid_t loc_id)
status = H5Awrite (comp_regref_aid, comp_regref_tid, comp_regref_data);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Awrite failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Awrite failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -6996,7 +6996,7 @@ static herr_t make_complex_attr_references(hid_t loc_id)
status = H5Rcreate (&((hobj_ref_t*)vlen_objref_data[0].p)[0], loc_id, NAME_OBJ_DS1, H5R_OBJECT, (hid_t)-1);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -7004,7 +7004,7 @@ static herr_t make_complex_attr_references(hid_t loc_id)
status = H5Rcreate (&((hobj_ref_t*)vlen_objref_data[1].p)[0], loc_id, NAME_OBJ_GRP, H5R_OBJECT, (hid_t)-1);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -7012,7 +7012,7 @@ static herr_t make_complex_attr_references(hid_t loc_id)
status = H5Rcreate (&((hobj_ref_t*)vlen_objref_data[2].p)[0], loc_id, NAME_OBJ_NDTYPE, H5R_OBJECT, (hid_t)-1);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -7030,7 +7030,7 @@ static herr_t make_complex_attr_references(hid_t loc_id)
status = H5Awrite (vlen_objref_attr_id, vlen_objref_attr_tid, vlen_objref_data);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Awrite failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Awrite failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -7039,7 +7039,7 @@ static herr_t make_complex_attr_references(hid_t loc_id)
status = H5Dvlen_reclaim (vlen_objref_attr_tid, vlen_objref_attr_sid, H5P_DEFAULT, vlen_objref_data);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Dvlen_reclaim failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Dvlen_reclaim failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -7060,14 +7060,14 @@ static herr_t make_complex_attr_references(hid_t loc_id)
status = H5Sselect_elements(objsid, H5S_SELECT_SET, (size_t)4, coords[0]);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
status = H5Rcreate (&((hdset_reg_ref_t*)vlen_regref_data[0].p)[0], loc_id, NAME_OBJ_DS1, H5R_DATASET_REGION, objsid);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -7085,7 +7085,7 @@ static herr_t make_complex_attr_references(hid_t loc_id)
status = H5Awrite(vlen_regref_attr_id, vlen_regref_attr_tid, vlen_regref_data);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Awrite failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Awrite failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -7094,7 +7094,7 @@ static herr_t make_complex_attr_references(hid_t loc_id)
status = H5Dvlen_reclaim (vlen_regref_attr_tid, vlen_regref_attr_sid, H5P_DEFAULT, vlen_regref_data);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Dvlen_reclaim failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Dvlen_reclaim failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
diff --git a/tools/test/h5repack/testh5repack_detect_szip.c b/tools/test/h5repack/testh5repack_detect_szip.c
index 6e7a24e..6b86dd5 100644
--- a/tools/test/h5repack/testh5repack_detect_szip.c
+++ b/tools/test/h5repack/testh5repack_detect_szip.c
@@ -50,10 +50,10 @@ int main(void)
#ifdef H5_HAVE_FILTER_SZIP
if (h5tools_can_encode(H5Z_FILTER_SZIP) == 1) {
- printf("yes\n");
+ HDprintf("yes\n");
return(1);
}
#endif /* H5_HAVE_FILTER_SZIP */
- printf("no\n");
+ HDprintf("no\n");
return(0);
}
diff --git a/tools/test/h5stat/h5stat_gentest.c b/tools/test/h5stat/h5stat_gentest.c
index ae11032..2edfcf6 100644
--- a/tools/test/h5stat/h5stat_gentest.c
+++ b/tools/test/h5stat/h5stat_gentest.c
@@ -88,7 +88,7 @@ gen_newgrat_file(const char *fname)
/* Create NUM_GRPS groups in the root group */
for(i = 1; i <= NUM_GRPS; i++) {
- sprintf(name, "%s%d", GROUP_NAME,i);
+ HDsprintf(name, "%s%d", GROUP_NAME,i);
if((gid = H5Gcreate2(fid, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
if(H5Gclose(gid) < 0)
@@ -109,7 +109,7 @@ gen_newgrat_file(const char *fname)
/* Create NUM_ATTRS for the dataset */
for(i = 1; i <= NUM_ATTRS; i++) {
- sprintf(attrname, "%s%d", ATTR_NAME,i);
+ HDsprintf(attrname, "%s%d", ATTR_NAME,i);
if((attr_id = H5Acreate2(did, attrname, tid, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
if(H5Aclose(attr_id) < 0)
@@ -190,7 +190,7 @@ gen_threshold_file(const char *fname)
/* Create 11 attributes for the dataset */
for(i = 1; i <= (THRES_NUM+1); i++) {
- sprintf(name, "%s%d", THRES_ATTR_NAME,i);
+ HDsprintf(name, "%s%d", THRES_ATTR_NAME,i);
if((attr_id = H5Acreate2(did, name, H5T_NATIVE_INT, sid1, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
if(H5Aclose(attr_id) < 0)
@@ -217,7 +217,7 @@ gen_threshold_file(const char *fname)
/* Create 10 attributes for the 2-D dataset */
for(i = 1; i <= THRES_NUM; i++) {
- sprintf(name, "%s%d", THRES_ATTR_NAME,i);
+ HDsprintf(name, "%s%d", THRES_ATTR_NAME,i);
if((attr_id = H5Acreate2(did, name, H5T_NATIVE_INT, sid1, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
if(H5Aclose(attr_id) < 0)
@@ -241,7 +241,7 @@ gen_threshold_file(const char *fname)
/* Create 10 1-D datasets with non-zero dimension size for the group */
for(i = 1; i <= THRES_NUM; i++) {
/* set up dataset name */
- sprintf(name, "%s%d", THRES_DSET_NAME,i);
+ HDsprintf(name, "%s%d", THRES_DSET_NAME,i);
/* Create the dataset */
if((did = H5Dcreate2(gid, name, H5T_NATIVE_UCHAR, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -264,7 +264,7 @@ gen_threshold_file(const char *fname)
/* Create 25 attributes for the group */
for(i = 1; i <= THRES_NUM_25; i++) {
/* Set up attribute name */
- sprintf(name, "%s%d", THRES_ATTR_GRP_NAME,i);
+ HDsprintf(name, "%s%d", THRES_ATTR_GRP_NAME,i);
/* Create the attribute */
if((attr_id = H5Acreate2(gid, name, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -286,7 +286,7 @@ gen_threshold_file(const char *fname)
/* Create 9 1-D datasets with non-zero dimension size for the group */
for(i = 1; i < THRES_NUM; i++) {
/* set up dataset name */
- sprintf(name, "%s%d", THRES_DSET_NAME,i);
+ HDsprintf(name, "%s%d", THRES_DSET_NAME,i);
/* Create the dataset */
if((did = H5Dcreate2(gid, name, H5T_NATIVE_UCHAR, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
diff --git a/tools/test/misc/h5clear_gentest.c b/tools/test/misc/h5clear_gentest.c
index 7f80c23..96d7e75e7 100644
--- a/tools/test/misc/h5clear_gentest.c
+++ b/tools/test/misc/h5clear_gentest.c
@@ -15,10 +15,10 @@
/* The HDF5 test files */
const char *FILENAME[] = {
- "h5clear_sec2_v3.h5", /* 0 -- sec2 file with superblock version 3 */
- "h5clear_log_v3.h5", /* 1 -- log file with superblock veresion 3 */
- "h5clear_sec2_v0.h5", /* 2 -- sec2 file with superblock version 0 */
- "h5clear_sec2_v2.h5" /* 3 -- sec2 file with superblock version 2 */
+ "h5clear_sec2_v3.h5", /* 0 -- sec2 file with superblock version 3 */
+ "h5clear_log_v3.h5", /* 1 -- log file with superblock veresion 3 */
+ "h5clear_sec2_v0.h5", /* 2 -- sec2 file with superblock version 0 */
+ "h5clear_sec2_v2.h5" /* 3 -- sec2 file with superblock version 2 */
};
const char *FILENAME_ENHANCE[] = {
@@ -28,12 +28,12 @@ const char *FILENAME_ENHANCE[] = {
"h5clear_fsm_persist_user_equal.h5", /* 3: user block, persisting free-space, stored EOA = actual EOF */
"h5clear_fsm_persist_user_greater.h5", /* 4: user block, persisting free-space, stored EOA > actual EOF */
"h5clear_fsm_persist_user_less.h5", /* 5: user block, persisting free-space, stored EOA < actual EOF */
- "h5clear_status_noclose.h5", /* 6 -- v3 superblock, nonzero status_flags, no flush, exit,
+ "h5clear_status_noclose.h5", /* 6 -- v3 superblock, nonzero status_flags, no flush, exit,
stored EOA < actual EOF */
"h5clear_fsm_persist_noclose.h5" /* 7 -- persisting free-space, no flush, exit, stored EOA < actual EOF */
};
-#define KB 1024U
+#define KB 1024U
#define CACHE_IMAGE_FILE "h5clear_mdc_image.h5"
#define DSET "DSET"
@@ -42,14 +42,14 @@ const char *FILENAME_ENHANCE[] = {
#define USERBLOCK 512
/*-------------------------------------------------------------------------
- * Function: gen_cache_image_file
+ * Function: gen_cache_image_file
*
- * Purpose: To create a file with cache image feature enabled.
+ * Purpose: To create a file with cache image feature enabled.
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Vailin Choi; March 2017
+ * Programmer: Vailin Choi; March 2017
*
*-------------------------------------------------------------------------
*/
@@ -136,9 +136,9 @@ error:
} /* gen_cache_image_file() */
/*-------------------------------------------------------------------------
- * Function: gen_enhance_files
+ * Function: gen_enhance_files
*
- * Purpose: To create the first 6 files in FILENAME_ENHANCE[]:
+ * Purpose: To create the first 6 files in FILENAME_ENHANCE[]:
* (0) FILENAME_ENHANCE[0]: "h5clear_fsm_persist_equal.h5"
* (1) FILENAME_ENHANCE[1]: "h5clear_fsm_persist_greater.h5"
* (2) FILENAME_ENHANCE[2]: "h5clear_fsm_persist_less.h5"
@@ -149,15 +149,15 @@ error:
* value to the location where the EOA is stored in the superblock.
* Also modify the chksum in the superblock due to this change.
*
- * The first call to this routine (without user block) will generate
+ * The first call to this routine (without user block) will generate
* the first 3 files.
* The second call to this routine (with user block) will generate
* the last 3 files.
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Vailin Choi; March 2017
+ * Programmer: Vailin Choi; March 2017
*
*-------------------------------------------------------------------------
*/
@@ -190,7 +190,7 @@ gen_enhance_files(hbool_t user)
if(H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, (hsize_t)1) < 0)
goto error;
- /*
+ /*
* Create the file, then write invalid EOA to the file.
*/
for(i = 0+u; i < 3+u; i++) {
@@ -221,21 +221,21 @@ gen_enhance_files(hbool_t user)
if(H5Fclose(fid) < 0)
goto error;
- /*
+ /*
* No further action for:
- * --FILENAME_ENHANCE[0]: "h5clear_fsm_persist_equal.h5"
+ * --FILENAME_ENHANCE[0]: "h5clear_fsm_persist_equal.h5"
* --FILENAME_ENHANCE[3]: "h5clear_fsm_persist_user_equal.h5",
*/
if(!(i % 3))
continue;
- /*
+ /*
* For the following files:
* --FILENAME_ENHANCE[1]: "h5clear_fsm_persist_greater.h5"
* --FILENAME_ENHANCE[2]: "h5clear_fsm_persist_less.h5"
* --FILENAME_ENHANCE[4]: "h5clear_fsm_persist_greater.h5"
* --FILENAME_ENHANCE[5]: "h5clear_fsm_persist_less.h5"
*
- * Write invalid value to the location for stored eoa and
+ * Write invalid value to the location for stored eoa and
* update the chksum value.
*/
/* Open the file */
@@ -306,9 +306,9 @@ error:
} /* gen_enhance_files() */
/*-------------------------------------------------------------------------
- * Function: main
+ * Function: main
*
- * Purpose: Generate test files used by h5clear.
+ * Purpose: Generate test files used by h5clear.
*
* (A) gen_cache_image_file():
* --generate a file with cache image feature
@@ -317,10 +317,10 @@ error:
* --generate the first 6 files in FILENAME_ENHANCE[]:
* (0) "h5clear_fsm_persist_equal.h5"
* (1) "h5clear_fsm_persist_greater.h5"
- * (2) "h5clear_fsm_persist_less.h5"
- * (3) "h5clear_fsm_persist_user_equal.h5"
+ * (2) "h5clear_fsm_persist_less.h5"
+ * (3) "h5clear_fsm_persist_user_equal.h5"
* (4) "h5clear_fsm_persist_user_greater.h5"
- * (5) "h5clear_fsm_persist_user_less.h5"
+ * (5) "h5clear_fsm_persist_user_less.h5"
*
* (C) Generate the following FILENAME[] files in main():
* (0a) "h5clear_sec2_v3.h5"
@@ -328,43 +328,43 @@ error:
* (1a) "h5clear_log_v3.h5",
* (1b) "latest_h5clear_log_v3.h5"
* (2) "h5clear_sec2_v0.h5"
- * (3) "h5clear_sec2_v2.h5"
- *
- * These HDF5 files are created with non-zero status_flags in
+ * (3) "h5clear_sec2_v2.h5"
+ *
+ * These HDF5 files are created with non-zero status_flags in
* the superblock via flushing and exiting without closing the
* library.
- * Due to file locking, status_flags in the superblock will be
- * nonzero after H5Fcreate. The library will clear status_flags
- * on file closing.
+ * Due to file locking, status_flags in the superblock will be
+ * nonzero after H5Fcreate. The library will clear status_flags
+ * on file closing.
* This program, after "H5Fcreate" the files, exits without
- * going through library closing. Thus, status_flags for these
- * files are not cleared.
- * The library will check consistency of status_flags when
- * opening a file with superblock >= v3 and will return error
+ * going through library closing. Thus, status_flags for these
+ * files are not cleared.
+ * The library will check consistency of status_flags when
+ * opening a file with superblock >= v3 and will return error
* accordingly.
- * The library will not check status_flags when opening a file
- * with < v3 superblock.
- * These files are used by "h5clear" to see if the tool clears
- * status_flags properly so users can open the files afterwards.
- *
+ * The library will not check status_flags when opening a file
+ * with < v3 superblock.
+ * These files are used by "h5clear" to see if the tool clears
+ * status_flags properly so users can open the files afterwards.
+ *
* (D) Generate the last two files in FILENAME_ENHANCE[] in main():
- * (6) "h5clear_status_noclose.h5",
+ * (6) "h5clear_status_noclose.h5",
* (7) "h5clear_fsm_persist_noclose.h5"
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Vailin Choi; July 2013
+ * Programmer: Vailin Choi; July 2013
*
*-------------------------------------------------------------------------
*/
int
main(void)
{
- hid_t fid = -1; /* File ID */
- hid_t fcpl = -1; /* File creation property list */
- hid_t fapl = -1, new_fapl = -1; /* File access property lists */
- char fname[512]; /* File name */
+ hid_t fid = -1; /* File ID */
+ hid_t fcpl = -1; /* File creation property list */
+ hid_t fapl = -1, new_fapl = -1; /* File access property lists */
+ char fname[512]; /* File name */
unsigned new_format; /* To use latest library format or not */
hid_t sid = -1; /* Dataspace ID */
hid_t did = -1; /* Dataset ID */
@@ -382,7 +382,7 @@ main(void)
if(gen_enhance_files(TRUE) < 0)
goto error;
- /*
+ /*
* Generate files in FILENAME[]
*/
/* Create a copy of the file access property list */
@@ -396,13 +396,13 @@ main(void)
if(H5Pset_libver_bounds(new_fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
goto error;
- /*
+ /*
* Files created within this for loop will have v3 superblock and nonzero status_flags
* --FILENAME[0]: "h5clear_sec2_v3.h5", "latest_h5clear_sec2_v3.h5"
* --FILENAME[1]: "h5clear_log_v3.h5", "latest_h5clear_log_v3.h5"
*/
for(new_format = FALSE; new_format <= TRUE; new_format++) {
- hid_t fapl2, my_fapl; /* File access property lists */
+ hid_t fapl2, my_fapl; /* File access property lists */
/* Set to use the appropriate file access property list */
if(new_format)
@@ -415,14 +415,14 @@ main(void)
if((my_fapl = H5Pcopy(fapl2)) < 0)
goto error;
/* Create the file */
- sprintf(fname, "%s%s", new_format? "latest_":"", FILENAME[0]);
- if((fid = H5Fcreate(fname, H5F_ACC_TRUNC | (new_format ? 0 : H5F_ACC_SWMR_WRITE), H5P_DEFAULT, my_fapl)) < 0)
+ HDsprintf(fname, "%s%s", new_format? "latest_":"", FILENAME[0]);
+ if((fid = H5Fcreate(fname, H5F_ACC_TRUNC | (new_format ? 0 : H5F_ACC_SWMR_WRITE), H5P_DEFAULT, my_fapl)) < 0)
goto error;
/* Flush the file */
if(H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0)
goto error;
-
+
/* Close the property list */
if(H5Pclose(my_fapl) < 0)
goto error;
@@ -439,8 +439,8 @@ main(void)
goto error;
/* Create the file */
- sprintf(fname, "%s%s", new_format? "latest_":"", FILENAME[1]);
- if((fid = H5Fcreate(fname, H5F_ACC_TRUNC | (new_format ? 0 : H5F_ACC_SWMR_WRITE), H5P_DEFAULT, my_fapl)) < 0)
+ HDsprintf(fname, "%s%s", new_format? "latest_":"", FILENAME[1]);
+ if((fid = H5Fcreate(fname, H5F_ACC_TRUNC | (new_format ? 0 : H5F_ACC_SWMR_WRITE), H5P_DEFAULT, my_fapl)) < 0)
goto error;
/* Flush the file */
@@ -453,11 +453,11 @@ main(void)
} /* end for */
- /*
+ /*
* Create a sec2 file with v0 superblock but nonzero status_flags:
* FILENAME[2]: "h5clear_sec2_v0.h5"
*/
- if((fid = H5Fcreate(FILENAME[2], H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
+ if((fid = H5Fcreate(FILENAME[2], H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
goto error;
/* Flush the file */
@@ -465,9 +465,9 @@ main(void)
goto error;
- /*
+ /*
* Create a sec2 file with v2 superblock but nonzero status_flags:
- * FILENAME[3]: "h5clear_sec2_v2.h5"
+ * FILENAME[3]: "h5clear_sec2_v2.h5"
*/
if((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
goto error;
@@ -476,14 +476,14 @@ main(void)
if(H5Pset_shared_mesg_index(fcpl, 0, H5O_SHMESG_DTYPE_FLAG, 50) < 0)
goto error;
- if((fid = H5Fcreate(FILENAME[3], H5F_ACC_TRUNC, fcpl, fapl)) < 0)
+ if((fid = H5Fcreate(FILENAME[3], H5F_ACC_TRUNC, fcpl, fapl)) < 0)
goto error;
/* Flush the file */
if(H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0)
goto error;
-
+
/* Close the property lists */
if(H5Pclose(fapl) < 0)
goto error;
@@ -492,10 +492,10 @@ main(void)
if(H5Pclose(fcpl) < 0)
goto error;
- /*
+ /*
* Create the last two files in FILENAME_ENHANCE[]:
* --FILENAME_ENHANCE[6]: h5clear_status_noclose.h5
- * --FILENAME_ENHANCE[7]: h5clear_fsm_persist_noclose.h5
+ * --FILENAME_ENHANCE[7]: h5clear_fsm_persist_noclose.h5
*/
/*
* FILENAME_ENHANCE[6]: h5clear_status_noclose.h5
@@ -503,7 +503,7 @@ main(void)
* --version 3 superblock
* --nonzero status_flags
* --does not persist free-space
- * --does not flush the file, just exit without closing file:
+ * --does not flush the file, just exit without closing file:
* --this file is similar to the user-suppplied test file attached with HDFFV-10347
*/
if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
@@ -542,8 +542,8 @@ main(void)
/* Does not flush and does not close the file */
- /*
- * FILENAME_ENHANCE[7]: h5clear_fsm_persist_noclose.h5
+ /*
+ * FILENAME_ENHANCE[7]: h5clear_fsm_persist_noclose.h5
* --stored EOA < actual EOF
* --persisting free-space
* --undefined fsinfo.eoa_pre_fsm_fsalloc
diff --git a/tools/test/misc/talign.c b/tools/test/misc/talign.c
index 08ebfc7..7f1f038 100644
--- a/tools/test/misc/talign.c
+++ b/tools/test/misc/talign.c
@@ -51,14 +51,14 @@ int main(void)
int result = 0;
herr_t error = 1;
- printf("%-70s", "Testing alignment in compound datatypes");
+ HDprintf("%-70s", "Testing alignment in compound datatypes");
- strcpy(string5, "Hi!");
+ HDstrcpy(string5, "Hi!");
HDunlink(fname);
fil = H5Fcreate(fname, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fil < 0) {
- puts("*FAILED*");
+ HDputs("*FAILED*");
return 1;
}
@@ -123,8 +123,8 @@ int main(void)
data = (char *)HDmalloc(H5Tget_size(fix));
if(!data) {
- perror("malloc() failed");
- abort();
+ HDperror("malloc() failed");
+ HDabort();
}
set = H5Dopen2(fil, setname, H5P_DEFAULT);
@@ -136,7 +136,7 @@ int main(void)
out:
if(error < 0) {
result = 1;
- puts("*FAILED - HDF5 library error*");
+ HDputs("*FAILED - HDF5 library error*");
} else if(!(H5_FLT_ABS_EQUAL(fok[0], fptr[0]))
|| !(H5_FLT_ABS_EQUAL(fok[1], fptr[1]))
|| !(H5_FLT_ABS_EQUAL(fnok[0], fptr[2]))
@@ -145,7 +145,7 @@ out:
result = 1;
mname = H5Tget_member_name(fix, 0);
- printf("%14s (%2d) %6s = %s\n",
+ HDprintf("%14s (%2d) %6s = %s\n",
mname ? mname : "(null)", (int)H5Tget_member_offset(fix,0),
string5, (char *)(data + H5Tget_member_offset(fix, 0)));
if(mname)
@@ -153,7 +153,7 @@ out:
fptr = (float *)((void *)(data + H5Tget_member_offset(fix, 1)));
mname = H5Tget_member_name(fix, 1);
- printf("Data comparison:\n"
+ HDprintf("Data comparison:\n"
"%14s (%2d) %6f = %f\n"
" %6f = %f\n",
mname ? mname : "(null)", (int)H5Tget_member_offset(fix,1),
@@ -164,7 +164,7 @@ out:
fptr = (float *)((void *)(data + H5Tget_member_offset(fix, 2)));
mname = H5Tget_member_name(fix, 2);
- printf("%14s (%2d) %6f = %f\n"
+ HDprintf("%14s (%2d) %6f = %f\n"
" %6f = %6f\n",
mname ? mname : "(null)", (int)H5Tget_member_offset(fix,2),
(double)fnok[0], (double)fptr[0],
@@ -173,7 +173,7 @@ out:
H5free_memory(mname);
fptr = (float *)((void *)(data + H5Tget_member_offset(fix, 1)));
- printf("\n"
+ HDprintf("\n"
"Short circuit\n"
" %6f = %f\n"
" %6f = %f\n"
@@ -183,9 +183,9 @@ out:
(double)fok[1], (double)fptr[1],
(double)fnok[0], (double)fptr[2],
(double)fnok[1], (double)fptr[3]);
- puts("*FAILED - compound type alignmnent problem*");
+ HDputs("*FAILED - compound type alignmnent problem*");
} else {
- puts(" PASSED");
+ HDputs(" PASSED");
}
if(data)
@@ -200,7 +200,7 @@ out:
H5Pclose(plist);
H5Fclose(fil);
HDunlink(fname);
- fflush(stdout);
+ HDfflush(stdout);
return result;
}