diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-06-28 15:31:32 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-28 15:31:32 (GMT) |
commit | 187ea8a9ae1405b5b46ca47a32fb1fb9e2686c98 (patch) | |
tree | baffa167d0796786241aef6b0ce76d4adec3b66e /src | |
parent | 7a44581a84778a1346a2fd5b6cca7d9db905a321 (diff) | |
download | hdf5-187ea8a9ae1405b5b46ca47a32fb1fb9e2686c98.zip hdf5-187ea8a9ae1405b5b46ca47a32fb1fb9e2686c98.tar.gz hdf5-187ea8a9ae1405b5b46ca47a32fb1fb9e2686c98.tar.bz2 |
Rename HD(f)printf() to (f)printf() (#3194)
Diffstat (limited to 'src')
103 files changed, 1981 insertions, 2022 deletions
@@ -475,8 +475,8 @@ H5_term_library(void) if (pending) { /* Only display the error message if the user is interested in them. */ if (func) { - HDfprintf(stderr, "HDF5: infinite loop closing library\n"); - HDfprintf(stderr, " %s\n", loop); + fprintf(stderr, "HDF5: infinite loop closing library\n"); + fprintf(stderr, " %s\n", loop); #ifndef NDEBUG HDabort(); #endif /* NDEBUG */ @@ -741,7 +741,7 @@ H5__debug_mask(const char *s) } /* end if */ } /* end for */ if (i >= (size_t)H5_NPKGS) - HDfprintf(stderr, "HDF5_DEBUG: ignored %s\n", pkg_name); + fprintf(stderr, "HDF5_DEBUG: ignored %s\n", pkg_name); } /* end if-else */ } else if (HDisdigit(*s)) { @@ -896,15 +896,15 @@ H5check_version(unsigned majnum, unsigned minnum, unsigned relnum) if (H5_VERS_MAJOR != majnum || H5_VERS_MINOR != minnum) { switch (disable_version_check) { case 0: - HDfprintf(stderr, "%s%s", version_mismatch_warning, - "You can, at your own risk, disable this warning by setting the environment\n" - "variable 'HDF5_DISABLE_VERSION_CHECK' to a value of '1'.\n" - "Setting it to 2 or higher will suppress the warning messages totally.\n"); + fprintf(stderr, "%s%s", version_mismatch_warning, + "You can, at your own risk, disable this warning by setting the environment\n" + "variable 'HDF5_DISABLE_VERSION_CHECK' to a value of '1'.\n" + "Setting it to 2 or higher will suppress the warning messages totally.\n"); /* Mention the versions we are referring to */ - HDfprintf(stderr, "Headers are %u.%u.%u, library is %u.%u.%u\n", majnum, minnum, relnum, - (unsigned)H5_VERS_MAJOR, (unsigned)H5_VERS_MINOR, (unsigned)H5_VERS_RELEASE); + fprintf(stderr, "Headers are %u.%u.%u, library is %u.%u.%u\n", majnum, minnum, relnum, + (unsigned)H5_VERS_MAJOR, (unsigned)H5_VERS_MINOR, (unsigned)H5_VERS_RELEASE); /* Show library build settings if available */ - HDfprintf(stderr, "%s", H5build_settings); + fprintf(stderr, "%s", H5build_settings); /* Bail out now. */ HDfputs("Bye...\n", stderr); @@ -912,16 +912,16 @@ H5check_version(unsigned majnum, unsigned minnum, unsigned relnum) case 1: /* continue with a warning */ /* Note that the warning message is embedded in the format string.*/ - HDfprintf(stderr, - "%s'HDF5_DISABLE_VERSION_CHECK' " - "environment variable is set to %d, application will\n" - "continue at your own risk.\n", - version_mismatch_warning, disable_version_check); + fprintf(stderr, + "%s'HDF5_DISABLE_VERSION_CHECK' " + "environment variable is set to %d, application will\n" + "continue at your own risk.\n", + version_mismatch_warning, disable_version_check); /* Mention the versions we are referring to */ - HDfprintf(stderr, "Headers are %u.%u.%u, library is %u.%u.%u\n", majnum, minnum, relnum, - (unsigned)H5_VERS_MAJOR, (unsigned)H5_VERS_MINOR, (unsigned)H5_VERS_RELEASE); + fprintf(stderr, "Headers are %u.%u.%u, library is %u.%u.%u\n", majnum, minnum, relnum, + (unsigned)H5_VERS_MAJOR, (unsigned)H5_VERS_MINOR, (unsigned)H5_VERS_RELEASE); /* Show library build settings if available */ - HDfprintf(stderr, "%s", H5build_settings); + fprintf(stderr, "%s", H5build_settings); break; default: /* 2 or higher: continue silently */ @@ -938,15 +938,13 @@ H5check_version(unsigned majnum, unsigned minnum, unsigned relnum) if (VERS_RELEASE_EXCEPTIONS[i] == relnum || VERS_RELEASE_EXCEPTIONS[i] == H5_VERS_RELEASE) { switch (disable_version_check) { case 0: - HDfprintf( - stderr, "%s%s", release_mismatch_warning, - "You can, at your own risk, disable this warning by setting the environment\n" - "variable 'HDF5_DISABLE_VERSION_CHECK' to a value of '1'.\n" - "Setting it to 2 or higher will suppress the warning messages totally.\n"); + fprintf(stderr, "%s%s", release_mismatch_warning, + "You can, at your own risk, disable this warning by setting the environment\n" + "variable 'HDF5_DISABLE_VERSION_CHECK' to a value of '1'.\n" + "Setting it to 2 or higher will suppress the warning messages totally.\n"); /* Mention the versions we are referring to */ - HDfprintf(stderr, "Headers are %u.%u.%u, library is %u.%u.%u\n", majnum, minnum, - relnum, (unsigned)H5_VERS_MAJOR, (unsigned)H5_VERS_MINOR, - (unsigned)H5_VERS_RELEASE); + fprintf(stderr, "Headers are %u.%u.%u, library is %u.%u.%u\n", majnum, minnum, relnum, + (unsigned)H5_VERS_MAJOR, (unsigned)H5_VERS_MINOR, (unsigned)H5_VERS_RELEASE); /* Bail out now. */ HDfputs("Bye...\n", stderr); @@ -954,15 +952,14 @@ H5check_version(unsigned majnum, unsigned minnum, unsigned relnum) case 1: /* continue with a warning */ /* Note that the warning message is embedded in the format string.*/ - HDfprintf(stderr, - "%s'HDF5_DISABLE_VERSION_CHECK' " - "environment variable is set to %d, application will\n" - "continue at your own risk.\n", - release_mismatch_warning, disable_version_check); + fprintf(stderr, + "%s'HDF5_DISABLE_VERSION_CHECK' " + "environment variable is set to %d, application will\n" + "continue at your own risk.\n", + release_mismatch_warning, disable_version_check); /* Mention the versions we are referring to */ - HDfprintf(stderr, "Headers are %u.%u.%u, library is %u.%u.%u\n", majnum, minnum, - relnum, (unsigned)H5_VERS_MAJOR, (unsigned)H5_VERS_MINOR, - (unsigned)H5_VERS_RELEASE); + fprintf(stderr, "Headers are %u.%u.%u, library is %u.%u.%u\n", majnum, minnum, relnum, + (unsigned)H5_VERS_MAJOR, (unsigned)H5_VERS_MINOR, (unsigned)H5_VERS_RELEASE); break; default: /* 2 or higher: continue silently */ @@ -995,11 +992,11 @@ H5check_version(unsigned majnum, unsigned minnum, unsigned relnum) "variable 'HDF5_DISABLE_VERSION_CHECK' to a value of 1 " "will suppress\nthis warning.\n", stderr); - HDfprintf(stderr, - "Library version information are:\n" - "H5_VERS_MAJOR=%d, H5_VERS_MINOR=%d, H5_VERS_RELEASE=%d, " - "H5_VERS_SUBRELEASE=%s,\nH5_VERS_INFO=%s\n", - H5_VERS_MAJOR, H5_VERS_MINOR, H5_VERS_RELEASE, H5_VERS_SUBRELEASE, H5_VERS_INFO); + fprintf(stderr, + "Library version information are:\n" + "H5_VERS_MAJOR=%d, H5_VERS_MINOR=%d, H5_VERS_RELEASE=%d, " + "H5_VERS_SUBRELEASE=%s,\nH5_VERS_INFO=%s\n", + H5_VERS_MAJOR, H5_VERS_MINOR, H5_VERS_RELEASE, H5_VERS_SUBRELEASE, H5_VERS_INFO); } /* end if */ } diff --git a/src/H5ACmpio.c b/src/H5ACmpio.c index 34c408a..03ad79c 100644 --- a/src/H5ACmpio.c +++ b/src/H5ACmpio.c @@ -2086,11 +2086,11 @@ H5AC__run_sync_point(H5F_t *f, int sync_point_op) (sync_point_op == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED)); #ifdef H5AC_DEBUG_DIRTY_BYTES_CREATION - HDfprintf(stdout, "%d:%s...:%u: (u/uu/i/iu/m/mu) = %zu/%u/%zu/%u/%zu/%u\n", aux_ptr->mpi_rank, - __func__ aux_ptr->dirty_bytes_propagations, aux_ptr->unprotect_dirty_bytes, - aux_ptr->unprotect_dirty_bytes_updates, aux_ptr->insert_dirty_bytes, - aux_ptr->insert_dirty_bytes_updates, aux_ptr->move_dirty_bytes, - aux_ptr->move_dirty_bytes_updates); + fprintf(stdout, "%d:%s...:%u: (u/uu/i/iu/m/mu) = %zu/%u/%zu/%u/%zu/%u\n", aux_ptr->mpi_rank, + __func__ aux_ptr->dirty_bytes_propagations, aux_ptr->unprotect_dirty_bytes, + aux_ptr->unprotect_dirty_bytes_updates, aux_ptr->insert_dirty_bytes, + aux_ptr->insert_dirty_bytes_updates, aux_ptr->move_dirty_bytes, + aux_ptr->move_dirty_bytes_updates); #endif /* H5AC_DEBUG_DIRTY_BYTES_CREATION */ /* Clear collective access flag on half of the entries in the cache and diff --git a/src/H5Abtree2.c b/src/H5Abtree2.c index 9dde3ef..bdf53cd 100644 --- a/src/H5Abtree2.c +++ b/src/H5Abtree2.c @@ -363,8 +363,8 @@ H5A__dense_btree2_name_debug(FILE *stream, int indent, int fwidth, const void *_ FUNC_ENTER_PACKAGE_NOERR - HDfprintf(stream, "%*s%-*s {%016" PRIx64 ", %02" PRIx8 ", %u, %08" PRIx32 "}\n", indent, "", fwidth, - "Record:", nrecord->id.val, nrecord->flags, (unsigned)nrecord->corder, nrecord->hash); + fprintf(stream, "%*s%-*s {%016" PRIx64 ", %02" PRIx8 ", %u, %08" PRIx32 "}\n", indent, "", fwidth, + "Record:", nrecord->id.val, nrecord->flags, (unsigned)nrecord->corder, nrecord->hash); FUNC_LEAVE_NOAPI(SUCCEED) } /* H5A__dense_btree2_name_debug() */ @@ -514,8 +514,8 @@ H5A__dense_btree2_corder_debug(FILE *stream, int indent, int fwidth, const void FUNC_ENTER_PACKAGE_NOERR - HDfprintf(stream, "%*s%-*s {%016" PRIx64 ", %02" PRIx8 ", %u}\n", indent, "", fwidth, - "Record:", nrecord->id.val, nrecord->flags, (unsigned)nrecord->corder); + fprintf(stream, "%*s%-*s {%016" PRIx64 ", %02" PRIx8 ", %u}\n", indent, "", fwidth, + "Record:", nrecord->id.val, nrecord->flags, (unsigned)nrecord->corder); FUNC_LEAVE_NOAPI(SUCCEED) } /* H5A__dense_btree2_corder_debug() */ @@ -422,8 +422,8 @@ H5B__split(H5F_t *f, H5B_ins_ud_t *bt_ud, unsigned idx, void *udata, H5B_ins_ud_ side = "LEFT"; else side = "MIDDLE"; - HDfprintf(H5DEBUG(B), "H5B__split: %3u {%5.3f,%5.3f,%5.3f} %6s", shared->two_k, split_ratios[0], - split_ratios[1], split_ratios[2], side); + fprintf(H5DEBUG(B), "H5B__split: %3u {%5.3f,%5.3f,%5.3f} %6s", shared->two_k, split_ratios[0], + split_ratios[1], split_ratios[2], side); } #endif @@ -450,7 +450,7 @@ H5B__split(H5F_t *f, H5B_ins_ud_t *bt_ud, unsigned idx, void *udata, H5B_ins_ud_ nright = shared->two_k - nleft; #ifdef H5B_DEBUG if (H5DEBUG(B)) - HDfprintf(H5DEBUG(B), " split %3d/%-3d\n", nleft, nright); + fprintf(H5DEBUG(B), " split %3d/%-3d\n", nleft, nright); #endif /* diff --git a/src/H5B2dbg.c b/src/H5B2dbg.c index a94bc76..c352f26 100644 --- a/src/H5B2dbg.c +++ b/src/H5B2dbg.c @@ -105,34 +105,33 @@ H5B2__hdr_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, hdr->f = f; /* Print opening message */ - HDfprintf(stream, "%*sv2 B-tree Header...\n", indent, ""); + fprintf(stream, "%*sv2 B-tree Header...\n", indent, ""); /* * Print the values. */ - HDfprintf(stream, "%*s%-*s %s (%u)\n", indent, "", fwidth, "Tree type ID:", hdr->cls->name, - (unsigned)hdr->cls->id); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Size of node:", (unsigned)hdr->node_size); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, - "Size of raw (disk) record:", (unsigned)hdr->rrec_size); - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, - "Dirty flag:", hdr->cache_info.is_dirty ? "True" : "False"); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Depth:", hdr->depth); - HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, - "Number of records in tree:", hdr->root.all_nrec); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, - "Number of records in root node:", hdr->root.node_nrec); - HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, - "Address of root node:", hdr->root.addr); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Split percent:", hdr->split_percent); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Merge percent:", hdr->merge_percent); + fprintf(stream, "%*s%-*s %s (%u)\n", indent, "", fwidth, "Tree type ID:", hdr->cls->name, + (unsigned)hdr->cls->id); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Size of node:", (unsigned)hdr->node_size); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, + "Size of raw (disk) record:", (unsigned)hdr->rrec_size); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, + "Dirty flag:", hdr->cache_info.is_dirty ? "True" : "False"); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Depth:", hdr->depth); + fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, + "Number of records in tree:", hdr->root.all_nrec); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, + "Number of records in root node:", hdr->root.node_nrec); + fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Address of root node:", hdr->root.addr); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Split percent:", hdr->split_percent); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Merge percent:", hdr->merge_percent); /* Print relevant node info */ - HDfprintf(stream, "%*sNode Info: (max_nrec/split_nrec/merge_nrec)\n", indent, ""); + fprintf(stream, "%*sNode Info: (max_nrec/split_nrec/merge_nrec)\n", indent, ""); for (u = 0; u < (unsigned)(hdr->depth + 1); u++) { HDsnprintf(temp_str, sizeof(temp_str), "Depth %u:", u); - HDfprintf(stream, "%*s%-*s (%u/%u/%u)\n", indent + 3, "", MAX(0, fwidth - 3), temp_str, - hdr->node_info[u].max_nrec, hdr->node_info[u].split_nrec, hdr->node_info[u].merge_nrec); + fprintf(stream, "%*s%-*s (%u/%u/%u)\n", indent + 3, "", MAX(0, fwidth - 3), temp_str, + hdr->node_info[u].max_nrec, hdr->node_info[u].split_nrec, hdr->node_info[u].merge_nrec); } /* end for */ done: @@ -198,31 +197,31 @@ H5B2__int_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, co HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, FAIL, "unable to load B-tree internal node") /* Print opening message */ - HDfprintf(stream, "%*sv2 B-tree Internal Node...\n", indent, ""); + fprintf(stream, "%*sv2 B-tree Internal Node...\n", indent, ""); /* * Print the values. */ - HDfprintf(stream, "%*s%-*s %s (%u)\n", indent, "", fwidth, "Tree type ID:", hdr->cls->name, - (unsigned)hdr->cls->id); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Size of node:", (unsigned)hdr->node_size); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, - "Size of raw (disk) record:", (unsigned)hdr->rrec_size); - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, - "Dirty flag:", internal->cache_info.is_dirty ? "True" : "False"); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Number of records in node:", internal->nrec); + fprintf(stream, "%*s%-*s %s (%u)\n", indent, "", fwidth, "Tree type ID:", hdr->cls->name, + (unsigned)hdr->cls->id); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Size of node:", (unsigned)hdr->node_size); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, + "Size of raw (disk) record:", (unsigned)hdr->rrec_size); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, + "Dirty flag:", internal->cache_info.is_dirty ? "True" : "False"); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Number of records in node:", internal->nrec); /* Print all node pointers and records */ for (u = 0; u < internal->nrec; u++) { /* Print node pointer */ HDsnprintf(temp_str, sizeof(temp_str), "Node pointer #%u: (all/node/addr)", u); - HDfprintf(stream, "%*s%-*s (%" PRIuHSIZE "/%u/%" PRIuHADDR ")\n", indent + 3, "", MAX(0, fwidth - 3), - temp_str, internal->node_ptrs[u].all_nrec, internal->node_ptrs[u].node_nrec, - internal->node_ptrs[u].addr); + fprintf(stream, "%*s%-*s (%" PRIuHSIZE "/%u/%" PRIuHADDR ")\n", indent + 3, "", MAX(0, fwidth - 3), + temp_str, internal->node_ptrs[u].all_nrec, internal->node_ptrs[u].node_nrec, + internal->node_ptrs[u].addr); /* Print record */ HDsnprintf(temp_str, sizeof(temp_str), "Record #%u:", u); - HDfprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3), temp_str); + fprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3), temp_str); assert(H5B2_INT_NREC(internal, hdr, u)); (void)(type->debug)(stream, indent + 6, MAX(0, fwidth - 6), H5B2_INT_NREC(internal, hdr, u), hdr->cb_ctx); @@ -230,9 +229,9 @@ H5B2__int_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, co /* Print final node pointer */ HDsnprintf(temp_str, sizeof(temp_str), "Node pointer #%u: (all/node/addr)", u); - HDfprintf(stream, "%*s%-*s (%" PRIuHSIZE "/%u/%" PRIuHADDR ")\n", indent + 3, "", MAX(0, fwidth - 3), - temp_str, internal->node_ptrs[u].all_nrec, internal->node_ptrs[u].node_nrec, - internal->node_ptrs[u].addr); + fprintf(stream, "%*s%-*s (%" PRIuHSIZE "/%u/%" PRIuHADDR ")\n", indent + 3, "", MAX(0, fwidth - 3), + temp_str, internal->node_ptrs[u].all_nrec, internal->node_ptrs[u].node_nrec, + internal->node_ptrs[u].addr); done: if (hdr && H5B2__hdr_unprotect(hdr, H5AC__NO_FLAGS_SET) < 0) @@ -298,25 +297,25 @@ H5B2__leaf_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, c HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node") /* Print opening message */ - HDfprintf(stream, "%*sv2 B-tree Leaf Node...\n", indent, ""); + fprintf(stream, "%*sv2 B-tree Leaf Node...\n", indent, ""); /* * Print the values. */ - HDfprintf(stream, "%*s%-*s %s (%u)\n", indent, "", fwidth, "Tree type ID:", hdr->cls->name, - (unsigned)hdr->cls->id); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Size of node:", (unsigned)hdr->node_size); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, - "Size of raw (disk) record:", (unsigned)hdr->rrec_size); - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, - "Dirty flag:", leaf->cache_info.is_dirty ? "True" : "False"); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Number of records in node:", leaf->nrec); + fprintf(stream, "%*s%-*s %s (%u)\n", indent, "", fwidth, "Tree type ID:", hdr->cls->name, + (unsigned)hdr->cls->id); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Size of node:", (unsigned)hdr->node_size); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, + "Size of raw (disk) record:", (unsigned)hdr->rrec_size); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, + "Dirty flag:", leaf->cache_info.is_dirty ? "True" : "False"); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Number of records in node:", leaf->nrec); /* Print all node pointers and records */ for (u = 0; u < leaf->nrec; u++) { /* Print record */ HDsnprintf(temp_str, sizeof(temp_str), "Record #%u:", u); - HDfprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3), temp_str); + fprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3), temp_str); assert(H5B2_LEAF_NREC(leaf, hdr, u)); (void)(type->debug)(stream, indent + 6, MAX(0, fwidth - 6), H5B2_LEAF_NREC(leaf, hdr, u), hdr->cb_ctx); diff --git a/src/H5B2test.c b/src/H5B2test.c index 9a72d59..751fd6a 100644 --- a/src/H5B2test.c +++ b/src/H5B2test.c @@ -306,7 +306,7 @@ H5B2__test_debug(FILE *stream, int indent, int fwidth, const void *record, const assert(record); - HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, "Record:", *(const hsize_t *)record); + fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, "Record:", *(const hsize_t *)record); FUNC_LEAVE_NOAPI(SUCCEED) } /* H5B2__test_debug() */ @@ -436,8 +436,8 @@ H5B2__test2_debug(FILE *stream, int indent, int fwidth, const void *record, cons assert(record); - HDfprintf(stream, "%*s%-*s (%" PRIuHSIZE ", %" PRIuHSIZE ")\n", indent, "", fwidth, - "Record:", ((const H5B2_test_rec_t *)record)->key, ((const H5B2_test_rec_t *)record)->val); + fprintf(stream, "%*s%-*s (%" PRIuHSIZE ", %" PRIuHSIZE ")\n", indent, "", fwidth, + "Record:", ((const H5B2_test_rec_t *)record)->key, ((const H5B2_test_rec_t *)record)->val); FUNC_LEAVE_NOAPI(SUCCEED) } /* H5B2__test2_debug() */ diff --git a/src/H5Bdbg.c b/src/H5Bdbg.c index 46ed7f4..cfba91f 100644 --- a/src/H5Bdbg.c +++ b/src/H5Bdbg.c @@ -90,37 +90,37 @@ H5B_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, const H5 /* * Print the values. */ - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Tree type ID:", - ((shared->type->id) == H5B_SNODE_ID - ? "H5B_SNODE_ID" - : ((shared->type->id) == H5B_CHUNK_ID ? "H5B_CHUNK_ID" : "Unknown!"))); - HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Size of node:", shared->sizeof_rnode); - HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Size of raw (disk) key:", shared->sizeof_rkey); - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, - "Dirty flag:", bt->cache_info.is_dirty ? "True" : "False"); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Level:", bt->level); - HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Address of left sibling:", bt->left); - HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Address of right sibling:", bt->right); - HDfprintf(stream, "%*s%-*s %u (%u)\n", indent, "", fwidth, "Number of children (max):", bt->nchildren, - shared->two_k); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Tree type ID:", + ((shared->type->id) == H5B_SNODE_ID + ? "H5B_SNODE_ID" + : ((shared->type->id) == H5B_CHUNK_ID ? "H5B_CHUNK_ID" : "Unknown!"))); + fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Size of node:", shared->sizeof_rnode); + fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Size of raw (disk) key:", shared->sizeof_rkey); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, + "Dirty flag:", bt->cache_info.is_dirty ? "True" : "False"); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Level:", bt->level); + fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Address of left sibling:", bt->left); + fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Address of right sibling:", bt->right); + fprintf(stream, "%*s%-*s %u (%u)\n", indent, "", fwidth, "Number of children (max):", bt->nchildren, + shared->two_k); /* * Print the child addresses */ for (u = 0; u < bt->nchildren; u++) { - HDfprintf(stream, "%*sChild %d...\n", indent, "", u); - HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", MAX(3, fwidth) - 3, - "Address:", bt->child[u]); + fprintf(stream, "%*sChild %d...\n", indent, "", u); + fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", MAX(3, fwidth) - 3, + "Address:", bt->child[u]); /* If there is a key debugging routine, use it to display the left & right keys */ if (type->debug_key) { /* Decode the 'left' key & print it */ - HDfprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(3, fwidth) - 3, "Left Key:"); + fprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(3, fwidth) - 3, "Left Key:"); assert(H5B_NKEY(bt, shared, u)); (void)(type->debug_key)(stream, indent + 6, MAX(6, fwidth) - 6, H5B_NKEY(bt, shared, u), udata); /* Decode the 'right' key & print it */ - HDfprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(3, fwidth) - 3, "Right Key:"); + fprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(3, fwidth) - 3, "Right Key:"); assert(H5B_NKEY(bt, shared, u + 1)); (void)(type->debug_key)(stream, indent + 6, MAX(6, fwidth) - 6, H5B_NKEY(bt, shared, u + 1), udata); @@ -172,7 +172,7 @@ H5B__assert(H5F_t *f, haddr_t addr, const H5B_class_t *type, void *udata) if (0 == ncalls++) { if (H5DEBUG(B)) - HDfprintf(H5DEBUG(B), "H5B: debugging B-trees (expensive)\n"); + fprintf(H5DEBUG(B), "H5B: debugging B-trees (expensive)\n"); } /* end if */ /* Get shared info for B-tree */ @@ -538,8 +538,8 @@ H5C_dest(H5F_t *f) #ifdef H5C_DO_SANITY_CHECKS if (cache_ptr->get_entry_ptr_from_addr_counter > 0) - HDfprintf(stdout, "*** %" PRId64 " calls to H5C_get_entry_ptr_from_add(). ***\n", - cache_ptr->get_entry_ptr_from_addr_counter); + fprintf(stdout, "*** %" PRId64 " calls to H5C_get_entry_ptr_from_add(). ***\n", + cache_ptr->get_entry_ptr_from_addr_counter); #endif /* H5C_DO_SANITY_CHECKS */ cache_ptr = H5FL_FREE(H5C_t, cache_ptr); @@ -139,15 +139,15 @@ H5CS_print_stack(const H5CS_t *fstack, FILE *stream) if (!stream) stream = stderr; - HDfprintf(stream, "HDF5-DIAG: Function stack from %s ", H5_lib_vers_info_g); + fprintf(stream, "HDF5-DIAG: Function stack from %s ", H5_lib_vers_info_g); /* try show the process or thread id in multiple processes cases*/ - HDfprintf(stream, "thread %" PRIu64 ".", H5TS_thread_id()); + fprintf(stream, "thread %" PRIu64 ".", H5TS_thread_id()); if (fstack && fstack->nused > 0) - HDfprintf(stream, " Back trace follows."); + fprintf(stream, " Back trace follows."); HDfputc('\n', stream); for (i = fstack->nused - 1; i >= 0; --i) - HDfprintf(stream, "%*s#%03d: Routine: %s\n", indent, "", i, fstack->rec[i]); + fprintf(stream, "%*s#%03d: Routine: %s\n", indent, "", i, fstack->rec[i]); FUNC_LEAVE_NOAPI_NOFS(SUCCEED) } /* end H5CS_print_stack() */ diff --git a/src/H5Cdbg.c b/src/H5Cdbg.c index 7fe00cf..62704e6 100644 --- a/src/H5Cdbg.c +++ b/src/H5Cdbg.c @@ -111,38 +111,38 @@ H5C_dump_cache(H5C_t *cache_ptr, const char *cache_name) * skip list -- scan the skip list generating the desired output. */ - HDfprintf(stdout, "\n\nDump of metadata cache \"%s\"\n", cache_name); + fprintf(stdout, "\n\nDump of metadata cache \"%s\"\n", cache_name); /* Print header */ - HDfprintf(stdout, "Entry "); - HDfprintf(stdout, "| Address "); - HDfprintf(stdout, "| Tag "); - HDfprintf(stdout, "| Size "); - HDfprintf(stdout, "| Ring "); - HDfprintf(stdout, "| Type "); - HDfprintf(stdout, "| Prot/Pin/Dirty"); - HDfprintf(stdout, "\n"); - - HDfprintf(stdout, "--------------------------------------------------------------------------------------" - "--------------------------\n"); + fprintf(stdout, "Entry "); + fprintf(stdout, "| Address "); + fprintf(stdout, "| Tag "); + fprintf(stdout, "| Size "); + fprintf(stdout, "| Ring "); + fprintf(stdout, "| Type "); + fprintf(stdout, "| Prot/Pin/Dirty"); + fprintf(stdout, "\n"); + + fprintf(stdout, "--------------------------------------------------------------------------------------" + "--------------------------\n"); i = 0; entry_ptr = (H5C_cache_entry_t *)H5SL_remove_first(slist_ptr); while (entry_ptr != NULL) { /* Print entry */ - HDfprintf(stdout, "%s%5d ", cache_ptr->prefix, i); - HDfprintf(stdout, " 0x%16llx ", (long long)(entry_ptr->addr)); + fprintf(stdout, "%s%5d ", cache_ptr->prefix, i); + fprintf(stdout, " 0x%16llx ", (long long)(entry_ptr->addr)); if (NULL == entry_ptr->tag_info) - HDfprintf(stdout, " %16s ", "N/A"); + fprintf(stdout, " %16s ", "N/A"); else - HDfprintf(stdout, " 0x%16llx ", (long long)(entry_ptr->tag_info->tag)); - HDfprintf(stdout, " %5lld ", (long long)(entry_ptr->size)); - HDfprintf(stdout, " %d ", (int)(entry_ptr->ring)); - HDfprintf(stdout, " %2d %-32s ", (int)(entry_ptr->type->id), (entry_ptr->type->name)); - HDfprintf(stdout, " %d", (int)(entry_ptr->is_protected)); - HDfprintf(stdout, " %d", (int)(entry_ptr->is_pinned)); - HDfprintf(stdout, " %d", (int)(entry_ptr->is_dirty)); - HDfprintf(stdout, "\n"); + fprintf(stdout, " 0x%16llx ", (long long)(entry_ptr->tag_info->tag)); + fprintf(stdout, " %5lld ", (long long)(entry_ptr->size)); + fprintf(stdout, " %d ", (int)(entry_ptr->ring)); + fprintf(stdout, " %2d %-32s ", (int)(entry_ptr->type->id), (entry_ptr->type->name)); + fprintf(stdout, " %d", (int)(entry_ptr->is_protected)); + fprintf(stdout, " %d", (int)(entry_ptr->is_pinned)); + fprintf(stdout, " %d", (int)(entry_ptr->is_dirty)); + fprintf(stdout, "\n"); /* remove the next (first) item in the skip list */ entry_ptr = (H5C_cache_entry_t *)H5SL_remove_first(slist_ptr); @@ -150,7 +150,7 @@ H5C_dump_cache(H5C_t *cache_ptr, const char *cache_name) i++; } /* end while */ - HDfprintf(stdout, "\n\n"); + fprintf(stdout, "\n\n"); /* Verify that all the entries were removed from the skip list */ assert(H5SL_count(slist_ptr) == 0); @@ -191,49 +191,49 @@ H5C_dump_cache_LRU(H5C_t *cache_ptr, const char *cache_name) assert(cache_ptr != NULL); assert(cache_name != NULL); - HDfprintf(stdout, "\n\nDump of metadata cache LRU \"%s\"\n", cache_name); - HDfprintf(stdout, "LRU len = %d, LRU size = %d\n", cache_ptr->LRU_list_len, - (int)(cache_ptr->LRU_list_size)); - HDfprintf(stdout, "index_size = %d, max_cache_size = %d, delta = %d\n\n", (int)(cache_ptr->index_size), - (int)(cache_ptr->max_cache_size), - (int)(cache_ptr->max_cache_size) - (int)(cache_ptr->index_size)); + fprintf(stdout, "\n\nDump of metadata cache LRU \"%s\"\n", cache_name); + fprintf(stdout, "LRU len = %d, LRU size = %d\n", cache_ptr->LRU_list_len, + (int)(cache_ptr->LRU_list_size)); + fprintf(stdout, "index_size = %d, max_cache_size = %d, delta = %d\n\n", (int)(cache_ptr->index_size), + (int)(cache_ptr->max_cache_size), + (int)(cache_ptr->max_cache_size) - (int)(cache_ptr->index_size)); /* Print header */ - HDfprintf(stdout, "Entry "); - HDfprintf(stdout, "| Address "); - HDfprintf(stdout, "| Tag "); - HDfprintf(stdout, "| Size "); - HDfprintf(stdout, "| Ring "); - HDfprintf(stdout, "| Type "); - HDfprintf(stdout, "| Dirty"); - HDfprintf(stdout, "\n"); - - HDfprintf(stdout, "--------------------------------------------------------------------------------------" - "--------------------------\n"); + fprintf(stdout, "Entry "); + fprintf(stdout, "| Address "); + fprintf(stdout, "| Tag "); + fprintf(stdout, "| Size "); + fprintf(stdout, "| Ring "); + fprintf(stdout, "| Type "); + fprintf(stdout, "| Dirty"); + fprintf(stdout, "\n"); + + fprintf(stdout, "--------------------------------------------------------------------------------------" + "--------------------------\n"); entry_ptr = cache_ptr->LRU_head_ptr; while (entry_ptr != NULL) { /* Print entry */ - HDfprintf(stdout, "%s%5d ", cache_ptr->prefix, i); - HDfprintf(stdout, " 0x%16llx ", (long long)(entry_ptr->addr)); + fprintf(stdout, "%s%5d ", cache_ptr->prefix, i); + fprintf(stdout, " 0x%16llx ", (long long)(entry_ptr->addr)); if (NULL == entry_ptr->tag_info) - HDfprintf(stdout, " %16s ", "N/A"); + fprintf(stdout, " %16s ", "N/A"); else - HDfprintf(stdout, " 0x%16llx ", (long long)(entry_ptr->tag_info->tag)); + fprintf(stdout, " 0x%16llx ", (long long)(entry_ptr->tag_info->tag)); - HDfprintf(stdout, " %5lld ", (long long)(entry_ptr->size)); - HDfprintf(stdout, " %d ", (int)(entry_ptr->ring)); - HDfprintf(stdout, " %2d %-32s ", (int)(entry_ptr->type->id), (entry_ptr->type->name)); - HDfprintf(stdout, " %d", (int)(entry_ptr->is_dirty)); - HDfprintf(stdout, "\n"); + fprintf(stdout, " %5lld ", (long long)(entry_ptr->size)); + fprintf(stdout, " %d ", (int)(entry_ptr->ring)); + fprintf(stdout, " %2d %-32s ", (int)(entry_ptr->type->id), (entry_ptr->type->name)); + fprintf(stdout, " %d", (int)(entry_ptr->is_dirty)); + fprintf(stdout, "\n"); i++; entry_ptr = entry_ptr->next; } /* end while */ - HDfprintf(stdout, "--------------------------------------------------------------------------------------" - "--------------------------\n"); + fprintf(stdout, "--------------------------------------------------------------------------------------" + "--------------------------\n"); FUNC_LEAVE_NOAPI(SUCCEED) } /* H5C_dump_cache_LRU() */ @@ -267,17 +267,17 @@ H5C_dump_cache_skip_list(H5C_t *cache_ptr, char *calling_fcn) assert(cache_ptr != NULL); assert(calling_fcn != NULL); - HDfprintf(stdout, "\n\nDumping metadata cache skip list from %s.\n", calling_fcn); - HDfprintf(stdout, " slist %s.\n", cache_ptr->slist_enabled ? "enabled" : "disabled"); - HDfprintf(stdout, " slist len = %" PRIu32 ".\n", cache_ptr->slist_len); - HDfprintf(stdout, " slist size = %zu.\n", cache_ptr->slist_size); + fprintf(stdout, "\n\nDumping metadata cache skip list from %s.\n", calling_fcn); + fprintf(stdout, " slist %s.\n", cache_ptr->slist_enabled ? "enabled" : "disabled"); + fprintf(stdout, " slist len = %" PRIu32 ".\n", cache_ptr->slist_len); + fprintf(stdout, " slist size = %zu.\n", cache_ptr->slist_size); if (cache_ptr->slist_len > 0) { /* If we get this far, all entries in the cache are listed in the * skip list -- scan the skip list generating the desired output. */ - HDfprintf(stdout, "Num: Addr: Len: Prot/Pind: Dirty: Type:\n"); + fprintf(stdout, "Num: Addr: Len: Prot/Pind: Dirty: Type:\n"); i = 0; @@ -288,11 +288,11 @@ H5C_dump_cache_skip_list(H5C_t *cache_ptr, char *calling_fcn) entry_ptr = NULL; while (entry_ptr != NULL) { - HDfprintf(stdout, "%s%d 0x%016llx %4lld %d/%d %d %s\n", cache_ptr->prefix, i, - (long long)(entry_ptr->addr), (long long)(entry_ptr->size), - (int)(entry_ptr->is_protected), (int)(entry_ptr->is_pinned), (int)(entry_ptr->is_dirty), - entry_ptr->type->name); - HDfprintf(stdout, " node_ptr = %p, item = %p\n", (void *)node_ptr, H5SL_item(node_ptr)); + fprintf(stdout, "%s%d 0x%016llx %4lld %d/%d %d %s\n", cache_ptr->prefix, i, + (long long)(entry_ptr->addr), (long long)(entry_ptr->size), + (int)(entry_ptr->is_protected), (int)(entry_ptr->is_pinned), (int)(entry_ptr->is_dirty), + entry_ptr->type->name); + fprintf(stdout, " node_ptr = %p, item = %p\n", (void *)node_ptr, H5SL_item(node_ptr)); /* increment node_ptr before we delete its target */ node_ptr = H5SL_next(node_ptr); @@ -305,7 +305,7 @@ H5C_dump_cache_skip_list(H5C_t *cache_ptr, char *calling_fcn) } /* end while */ } /* end if */ - HDfprintf(stdout, "\n\n"); + fprintf(stdout, "\n\n"); FUNC_LEAVE_NOAPI(ret_value) } /* H5C_dump_cache_skip_list() */ @@ -465,157 +465,154 @@ H5C_stats(H5C_t *cache_ptr, const char *cache_name, average_failed_search_depth = ((double)(cache_ptr->total_failed_ht_search_depth)) / ((double)(cache_ptr->failed_ht_searches)); - HDfprintf(stdout, "\n%sH5C: cache statistics for %s\n", cache_ptr->prefix, cache_name); + fprintf(stdout, "\n%sH5C: cache statistics for %s\n", cache_ptr->prefix, cache_name); - HDfprintf(stdout, "\n"); + fprintf(stdout, "\n"); - HDfprintf(stdout, "%s hash table insertion / deletions = %ld / %ld\n", cache_ptr->prefix, - (long)(cache_ptr->total_ht_insertions), (long)(cache_ptr->total_ht_deletions)); + fprintf(stdout, "%s hash table insertion / deletions = %ld / %ld\n", cache_ptr->prefix, + (long)(cache_ptr->total_ht_insertions), (long)(cache_ptr->total_ht_deletions)); - HDfprintf(stdout, "%s HT successful / failed searches = %ld / %ld\n", cache_ptr->prefix, - (long)(cache_ptr->successful_ht_searches), (long)(cache_ptr->failed_ht_searches)); + fprintf(stdout, "%s HT successful / failed searches = %ld / %ld\n", cache_ptr->prefix, + (long)(cache_ptr->successful_ht_searches), (long)(cache_ptr->failed_ht_searches)); - HDfprintf(stdout, "%s Av. HT suc / failed search depth = %f / %f\n", cache_ptr->prefix, - average_successful_search_depth, average_failed_search_depth); + fprintf(stdout, "%s Av. HT suc / failed search depth = %f / %f\n", cache_ptr->prefix, + average_successful_search_depth, average_failed_search_depth); - HDfprintf(stdout, "%s current (max) index size / length = %ld (%ld) / %lu (%lu)\n", cache_ptr->prefix, - (long)(cache_ptr->index_size), (long)(cache_ptr->max_index_size), - (unsigned long)(cache_ptr->index_len), (unsigned long)(cache_ptr->max_index_len)); + fprintf(stdout, "%s current (max) index size / length = %ld (%ld) / %lu (%lu)\n", cache_ptr->prefix, + (long)(cache_ptr->index_size), (long)(cache_ptr->max_index_size), + (unsigned long)(cache_ptr->index_len), (unsigned long)(cache_ptr->max_index_len)); - HDfprintf(stdout, "%s current (max) clean/dirty idx size = %ld (%ld) / %ld (%ld)\n", cache_ptr->prefix, - (long)(cache_ptr->clean_index_size), (long)(cache_ptr->max_clean_index_size), - (long)(cache_ptr->dirty_index_size), (long)(cache_ptr->max_dirty_index_size)); + fprintf(stdout, "%s current (max) clean/dirty idx size = %ld (%ld) / %ld (%ld)\n", cache_ptr->prefix, + (long)(cache_ptr->clean_index_size), (long)(cache_ptr->max_clean_index_size), + (long)(cache_ptr->dirty_index_size), (long)(cache_ptr->max_dirty_index_size)); - HDfprintf(stdout, "%s current (max) slist size / length = %ld (%ld) / %lu (%lu)\n", cache_ptr->prefix, - (long)(cache_ptr->slist_size), (long)(cache_ptr->max_slist_size), - (unsigned long)(cache_ptr->slist_len), (unsigned long)(cache_ptr->max_slist_len)); + fprintf(stdout, "%s current (max) slist size / length = %ld (%ld) / %lu (%lu)\n", cache_ptr->prefix, + (long)(cache_ptr->slist_size), (long)(cache_ptr->max_slist_size), + (unsigned long)(cache_ptr->slist_len), (unsigned long)(cache_ptr->max_slist_len)); - HDfprintf(stdout, "%s current (max) PL size / length = %ld (%ld) / %lu (%lu)\n", cache_ptr->prefix, - (long)(cache_ptr->pl_size), (long)(cache_ptr->max_pl_size), (unsigned long)(cache_ptr->pl_len), - (unsigned long)(cache_ptr->max_pl_len)); + fprintf(stdout, "%s current (max) PL size / length = %ld (%ld) / %lu (%lu)\n", cache_ptr->prefix, + (long)(cache_ptr->pl_size), (long)(cache_ptr->max_pl_size), (unsigned long)(cache_ptr->pl_len), + (unsigned long)(cache_ptr->max_pl_len)); - HDfprintf(stdout, "%s current (max) PEL size / length = %ld (%ld) / %lu (%lu)\n", cache_ptr->prefix, - (long)(cache_ptr->pel_size), (long)(cache_ptr->max_pel_size), - (unsigned long)(cache_ptr->pel_len), (unsigned long)(cache_ptr->max_pel_len)); + fprintf(stdout, "%s current (max) PEL size / length = %ld (%ld) / %lu (%lu)\n", cache_ptr->prefix, + (long)(cache_ptr->pel_size), (long)(cache_ptr->max_pel_size), (unsigned long)(cache_ptr->pel_len), + (unsigned long)(cache_ptr->max_pel_len)); - HDfprintf(stdout, "%s current LRU list size / length = %ld / %lu\n", cache_ptr->prefix, - (long)(cache_ptr->LRU_list_size), (unsigned long)(cache_ptr->LRU_list_len)); + fprintf(stdout, "%s current LRU list size / length = %ld / %lu\n", cache_ptr->prefix, + (long)(cache_ptr->LRU_list_size), (unsigned long)(cache_ptr->LRU_list_len)); #if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS - HDfprintf(stdout, "%s current clean LRU size / length = %ld / %lu\n", cache_ptr->prefix, - (long)(cache_ptr->cLRU_list_size), (unsigned long)(cache_ptr->cLRU_list_len)); + fprintf(stdout, "%s current clean LRU size / length = %ld / %lu\n", cache_ptr->prefix, + (long)(cache_ptr->cLRU_list_size), (unsigned long)(cache_ptr->cLRU_list_len)); - HDfprintf(stdout, "%s current dirty LRU size / length = %ld / %lu\n", cache_ptr->prefix, - (long)(cache_ptr->dLRU_list_size), (unsigned long)(cache_ptr->dLRU_list_len)); + fprintf(stdout, "%s current dirty LRU size / length = %ld / %lu\n", cache_ptr->prefix, + (long)(cache_ptr->dLRU_list_size), (unsigned long)(cache_ptr->dLRU_list_len)); #endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ - HDfprintf(stdout, "%s Total hits / misses / hit_rate = %ld / %ld / %f\n", cache_ptr->prefix, - (long)total_hits, (long)total_misses, hit_rate); + fprintf(stdout, "%s Total hits / misses / hit_rate = %ld / %ld / %f\n", cache_ptr->prefix, + (long)total_hits, (long)total_misses, hit_rate); - HDfprintf(stdout, "%s Total write / read (max) protects = %ld / %ld (%ld)\n", cache_ptr->prefix, - (long)total_write_protects, (long)total_read_protects, (long)max_read_protects); + fprintf(stdout, "%s Total write / read (max) protects = %ld / %ld (%ld)\n", cache_ptr->prefix, + (long)total_write_protects, (long)total_read_protects, (long)max_read_protects); - HDfprintf(stdout, "%s Total clears / flushes = %ld / %ld\n", cache_ptr->prefix, - (long)total_clears, (long)total_flushes); + fprintf(stdout, "%s Total clears / flushes = %ld / %ld\n", cache_ptr->prefix, + (long)total_clears, (long)total_flushes); - HDfprintf(stdout, "%s Total evictions / take ownerships = %ld / %ld\n", cache_ptr->prefix, - (long)total_evictions, (long)total_take_ownerships); + fprintf(stdout, "%s Total evictions / take ownerships = %ld / %ld\n", cache_ptr->prefix, + (long)total_evictions, (long)total_take_ownerships); - HDfprintf(stdout, "%s Total insertions(pinned) / moves = %ld(%ld) / %ld\n", cache_ptr->prefix, - (long)total_insertions, (long)total_pinned_insertions, (long)total_moves); + fprintf(stdout, "%s Total insertions(pinned) / moves = %ld(%ld) / %ld\n", cache_ptr->prefix, + (long)total_insertions, (long)total_pinned_insertions, (long)total_moves); - HDfprintf(stdout, "%s Total entry / cache flush moves = %ld / %ld\n", cache_ptr->prefix, - (long)total_entry_flush_moves, (long)total_cache_flush_moves); + fprintf(stdout, "%s Total entry / cache flush moves = %ld / %ld\n", cache_ptr->prefix, + (long)total_entry_flush_moves, (long)total_cache_flush_moves); - HDfprintf(stdout, "%s Total entry size incrs / decrs = %ld / %ld\n", cache_ptr->prefix, - (long)total_size_increases, (long)total_size_decreases); + fprintf(stdout, "%s Total entry size incrs / decrs = %ld / %ld\n", cache_ptr->prefix, + (long)total_size_increases, (long)total_size_decreases); - HDfprintf(stdout, "%s Ttl entry/cache flush size changes = %ld / %ld\n", cache_ptr->prefix, - (long)total_entry_flush_size_changes, (long)total_cache_flush_size_changes); + fprintf(stdout, "%s Ttl entry/cache flush size changes = %ld / %ld\n", cache_ptr->prefix, + (long)total_entry_flush_size_changes, (long)total_cache_flush_size_changes); - HDfprintf(stdout, "%s Total entry pins (dirty) / unpins = %ld (%ld) / %ld\n", cache_ptr->prefix, - (long)total_pins, (long)total_dirty_pins, (long)total_unpins); + fprintf(stdout, "%s Total entry pins (dirty) / unpins = %ld (%ld) / %ld\n", cache_ptr->prefix, + (long)total_pins, (long)total_dirty_pins, (long)total_unpins); - HDfprintf(stdout, "%s Total pinned flushes / clears = %ld / %ld\n", cache_ptr->prefix, - (long)total_pinned_flushes, (long)total_pinned_clears); + fprintf(stdout, "%s Total pinned flushes / clears = %ld / %ld\n", cache_ptr->prefix, + (long)total_pinned_flushes, (long)total_pinned_clears); - HDfprintf(stdout, "%s MSIC: (make space in cache) calls = %lld\n", cache_ptr->prefix, - (long long)(cache_ptr->calls_to_msic)); + fprintf(stdout, "%s MSIC: (make space in cache) calls = %lld\n", cache_ptr->prefix, + (long long)(cache_ptr->calls_to_msic)); if (cache_ptr->calls_to_msic > 0) average_entries_skipped_per_calls_to_msic = (((double)(cache_ptr->total_entries_skipped_in_msic)) / ((double)(cache_ptr->calls_to_msic))); - HDfprintf(stdout, "%s MSIC: Average/max entries skipped = %lf / %ld\n", cache_ptr->prefix, - (double)average_entries_skipped_per_calls_to_msic, - (long)(cache_ptr->max_entries_skipped_in_msic)); + fprintf(stdout, "%s MSIC: Average/max entries skipped = %lf / %ld\n", cache_ptr->prefix, + (double)average_entries_skipped_per_calls_to_msic, + (long)(cache_ptr->max_entries_skipped_in_msic)); if (cache_ptr->calls_to_msic > 0) average_dirty_pf_entries_skipped_per_call_to_msic = (((double)(cache_ptr->total_dirty_pf_entries_skipped_in_msic)) / ((double)(cache_ptr->calls_to_msic))); - HDfprintf(stdout, "%s MSIC: Average/max dirty pf entries skipped = %lf / %ld\n", cache_ptr->prefix, - average_dirty_pf_entries_skipped_per_call_to_msic, - (long)(cache_ptr->max_dirty_pf_entries_skipped_in_msic)); + fprintf(stdout, "%s MSIC: Average/max dirty pf entries skipped = %lf / %ld\n", cache_ptr->prefix, + average_dirty_pf_entries_skipped_per_call_to_msic, + (long)(cache_ptr->max_dirty_pf_entries_skipped_in_msic)); if (cache_ptr->calls_to_msic > 0) average_entries_scanned_per_calls_to_msic = (((double)(cache_ptr->total_entries_scanned_in_msic)) / ((double)(cache_ptr->calls_to_msic))); - HDfprintf(stdout, "%s MSIC: Average/max entries scanned = %lf / %ld\n", cache_ptr->prefix, - (double)average_entries_scanned_per_calls_to_msic, - (long)(cache_ptr->max_entries_scanned_in_msic)); + fprintf(stdout, "%s MSIC: Average/max entries scanned = %lf / %ld\n", cache_ptr->prefix, + (double)average_entries_scanned_per_calls_to_msic, + (long)(cache_ptr->max_entries_scanned_in_msic)); - HDfprintf(stdout, "%s MSIC: Scanned to make space(evict) = %lld\n", cache_ptr->prefix, - (long long)(cache_ptr->entries_scanned_to_make_space)); + fprintf(stdout, "%s MSIC: Scanned to make space(evict) = %lld\n", cache_ptr->prefix, + (long long)(cache_ptr->entries_scanned_to_make_space)); - HDfprintf( - stdout, "%s MSIC: Scanned to satisfy min_clean = %lld\n", cache_ptr->prefix, - (long long)(cache_ptr->total_entries_scanned_in_msic - cache_ptr->entries_scanned_to_make_space)); + fprintf(stdout, "%s MSIC: Scanned to satisfy min_clean = %lld\n", cache_ptr->prefix, + (long long)(cache_ptr->total_entries_scanned_in_msic - cache_ptr->entries_scanned_to_make_space)); - HDfprintf(stdout, "%s slist/LRU/index scan restarts = %lld / %lld / %lld.\n", cache_ptr->prefix, - (long long)(cache_ptr->slist_scan_restarts), (long long)(cache_ptr->LRU_scan_restarts), - (long long)(cache_ptr->index_scan_restarts)); + fprintf(stdout, "%s slist/LRU/index scan restarts = %lld / %lld / %lld.\n", cache_ptr->prefix, + (long long)(cache_ptr->slist_scan_restarts), (long long)(cache_ptr->LRU_scan_restarts), + (long long)(cache_ptr->index_scan_restarts)); - HDfprintf(stdout, "%s cache image creations/reads/loads/size = %d / %d /%d / %" PRIuHSIZE "\n", - cache_ptr->prefix, cache_ptr->images_created, cache_ptr->images_read, cache_ptr->images_loaded, - cache_ptr->last_image_size); + fprintf(stdout, "%s cache image creations/reads/loads/size = %d / %d /%d / %" PRIuHSIZE "\n", + cache_ptr->prefix, cache_ptr->images_created, cache_ptr->images_read, cache_ptr->images_loaded, + cache_ptr->last_image_size); - HDfprintf(stdout, "%s prefetches / dirty prefetches = %lld / %lld\n", cache_ptr->prefix, - (long long)(cache_ptr->prefetches), (long long)(cache_ptr->dirty_prefetches)); + fprintf(stdout, "%s prefetches / dirty prefetches = %lld / %lld\n", cache_ptr->prefix, + (long long)(cache_ptr->prefetches), (long long)(cache_ptr->dirty_prefetches)); - HDfprintf(stdout, "%s prefetch hits/flushes/evictions = %lld / %lld / %lld\n", cache_ptr->prefix, - (long long)(cache_ptr->prefetch_hits), - (long long)(cache_ptr->flushes[H5AC_PREFETCHED_ENTRY_ID]), - (long long)(cache_ptr->evictions[H5AC_PREFETCHED_ENTRY_ID])); + fprintf(stdout, "%s prefetch hits/flushes/evictions = %lld / %lld / %lld\n", cache_ptr->prefix, + (long long)(cache_ptr->prefetch_hits), (long long)(cache_ptr->flushes[H5AC_PREFETCHED_ENTRY_ID]), + (long long)(cache_ptr->evictions[H5AC_PREFETCHED_ENTRY_ID])); if (cache_ptr->prefetches > 0) prefetch_use_rate = 100.0 * ((double)(cache_ptr->prefetch_hits)) / ((double)(cache_ptr->prefetches)); else prefetch_use_rate = 0.0; - HDfprintf(stdout, "%s prefetched entry use rate = %lf\n", cache_ptr->prefix, prefetch_use_rate); + fprintf(stdout, "%s prefetched entry use rate = %lf\n", cache_ptr->prefix, prefetch_use_rate); #if H5C_COLLECT_CACHE_ENTRY_STATS - HDfprintf(stdout, "%s aggregate max / min accesses = %d / %d\n", cache_ptr->prefix, - (int)aggregate_max_accesses, (int)aggregate_min_accesses); + fprintf(stdout, "%s aggregate max / min accesses = %d / %d\n", cache_ptr->prefix, + (int)aggregate_max_accesses, (int)aggregate_min_accesses); - HDfprintf(stdout, "%s aggregate max_clears / max_flushes = %d / %d\n", cache_ptr->prefix, - (int)aggregate_max_clears, (int)aggregate_max_flushes); + fprintf(stdout, "%s aggregate max_clears / max_flushes = %d / %d\n", cache_ptr->prefix, + (int)aggregate_max_clears, (int)aggregate_max_flushes); - HDfprintf(stdout, "%s aggregate max_size / max_pins = %d / %d\n", cache_ptr->prefix, - (int)aggregate_max_size, (int)aggregate_max_pins); + fprintf(stdout, "%s aggregate max_size / max_pins = %d / %d\n", cache_ptr->prefix, + (int)aggregate_max_size, (int)aggregate_max_pins); #endif /* H5C_COLLECT_CACHE_ENTRY_STATS */ if (display_detailed_stats) { for (i = 0; i <= cache_ptr->max_type_id; i++) { - HDfprintf(stdout, "\n"); + fprintf(stdout, "\n"); - HDfprintf(stdout, "%s Stats on %s:\n", cache_ptr->prefix, - ((cache_ptr->class_table_ptr))[i]->name); + fprintf(stdout, "%s Stats on %s:\n", cache_ptr->prefix, ((cache_ptr->class_table_ptr))[i]->name); if ((cache_ptr->hits[i] > 0) || (cache_ptr->misses[i] > 0)) hit_rate = 100.0 * ((double)(cache_ptr->hits[i])) / @@ -623,56 +620,56 @@ H5C_stats(H5C_t *cache_ptr, const char *cache_name, else hit_rate = 0.0; - HDfprintf(stdout, "%s hits / misses / hit_rate = %ld / %ld / %f\n", cache_ptr->prefix, - (long)(cache_ptr->hits[i]), (long)(cache_ptr->misses[i]), hit_rate); + fprintf(stdout, "%s hits / misses / hit_rate = %ld / %ld / %f\n", cache_ptr->prefix, + (long)(cache_ptr->hits[i]), (long)(cache_ptr->misses[i]), hit_rate); - HDfprintf(stdout, "%s write / read (max) protects = %ld / %ld (%d)\n", cache_ptr->prefix, - (long)(cache_ptr->write_protects[i]), (long)(cache_ptr->read_protects[i]), - (int)(cache_ptr->max_read_protects[i])); + fprintf(stdout, "%s write / read (max) protects = %ld / %ld (%d)\n", cache_ptr->prefix, + (long)(cache_ptr->write_protects[i]), (long)(cache_ptr->read_protects[i]), + (int)(cache_ptr->max_read_protects[i])); - HDfprintf(stdout, "%s clears / flushes = %ld / %ld\n", cache_ptr->prefix, - (long)(cache_ptr->clears[i]), (long)(cache_ptr->flushes[i])); + fprintf(stdout, "%s clears / flushes = %ld / %ld\n", cache_ptr->prefix, + (long)(cache_ptr->clears[i]), (long)(cache_ptr->flushes[i])); - HDfprintf(stdout, "%s evictions / take ownerships = %ld / %ld\n", cache_ptr->prefix, - (long)(cache_ptr->evictions[i]), (long)(cache_ptr->take_ownerships[i])); + fprintf(stdout, "%s evictions / take ownerships = %ld / %ld\n", cache_ptr->prefix, + (long)(cache_ptr->evictions[i]), (long)(cache_ptr->take_ownerships[i])); - HDfprintf(stdout, "%s insertions(pinned) / moves = %ld(%ld) / %ld\n", cache_ptr->prefix, - (long)(cache_ptr->insertions[i]), (long)(cache_ptr->pinned_insertions[i]), - (long)(cache_ptr->moves[i])); + fprintf(stdout, "%s insertions(pinned) / moves = %ld(%ld) / %ld\n", cache_ptr->prefix, + (long)(cache_ptr->insertions[i]), (long)(cache_ptr->pinned_insertions[i]), + (long)(cache_ptr->moves[i])); - HDfprintf(stdout, "%s entry / cache flush moves = %ld / %ld\n", cache_ptr->prefix, - (long)(cache_ptr->entry_flush_moves[i]), (long)(cache_ptr->cache_flush_moves[i])); + fprintf(stdout, "%s entry / cache flush moves = %ld / %ld\n", cache_ptr->prefix, + (long)(cache_ptr->entry_flush_moves[i]), (long)(cache_ptr->cache_flush_moves[i])); - HDfprintf(stdout, "%s size increases / decreases = %ld / %ld\n", cache_ptr->prefix, - (long)(cache_ptr->size_increases[i]), (long)(cache_ptr->size_decreases[i])); + fprintf(stdout, "%s size increases / decreases = %ld / %ld\n", cache_ptr->prefix, + (long)(cache_ptr->size_increases[i]), (long)(cache_ptr->size_decreases[i])); - HDfprintf(stdout, "%s entry/cache flush size changes = %ld / %ld\n", cache_ptr->prefix, - (long)(cache_ptr->entry_flush_size_changes[i]), - (long)(cache_ptr->cache_flush_size_changes[i])); + fprintf(stdout, "%s entry/cache flush size changes = %ld / %ld\n", cache_ptr->prefix, + (long)(cache_ptr->entry_flush_size_changes[i]), + (long)(cache_ptr->cache_flush_size_changes[i])); - HDfprintf(stdout, "%s entry pins / unpins = %ld / %ld\n", cache_ptr->prefix, - (long)(cache_ptr->pins[i]), (long)(cache_ptr->unpins[i])); + fprintf(stdout, "%s entry pins / unpins = %ld / %ld\n", cache_ptr->prefix, + (long)(cache_ptr->pins[i]), (long)(cache_ptr->unpins[i])); - HDfprintf(stdout, "%s entry dirty pins/pin'd flushes = %ld / %ld\n", cache_ptr->prefix, - (long)(cache_ptr->dirty_pins[i]), (long)(cache_ptr->pinned_flushes[i])); + fprintf(stdout, "%s entry dirty pins/pin'd flushes = %ld / %ld\n", cache_ptr->prefix, + (long)(cache_ptr->dirty_pins[i]), (long)(cache_ptr->pinned_flushes[i])); #if H5C_COLLECT_CACHE_ENTRY_STATS - HDfprintf(stdout, "%s entry max / min accesses = %d / %d\n", cache_ptr->prefix, - cache_ptr->max_accesses[i], cache_ptr->min_accesses[i]); + fprintf(stdout, "%s entry max / min accesses = %d / %d\n", cache_ptr->prefix, + cache_ptr->max_accesses[i], cache_ptr->min_accesses[i]); - HDfprintf(stdout, "%s entry max_clears / max_flushes = %d / %d\n", cache_ptr->prefix, - cache_ptr->max_clears[i], cache_ptr->max_flushes[i]); + fprintf(stdout, "%s entry max_clears / max_flushes = %d / %d\n", cache_ptr->prefix, + cache_ptr->max_clears[i], cache_ptr->max_flushes[i]); - HDfprintf(stdout, "%s entry max_size / max_pins = %d / %d\n", cache_ptr->prefix, - (int)(cache_ptr->max_size[i]), (int)(cache_ptr->max_pins[i])); + fprintf(stdout, "%s entry max_size / max_pins = %d / %d\n", cache_ptr->prefix, + (int)(cache_ptr->max_size[i]), (int)(cache_ptr->max_pins[i])); #endif /* H5C_COLLECT_CACHE_ENTRY_STATS */ } /* end for */ } /* end if */ - HDfprintf(stdout, "\n"); + fprintf(stdout, "\n"); #endif /* H5C_COLLECT_CACHE_STATS */ @@ -1178,7 +1175,7 @@ done: * * Purpose: Print results of a automatic cache resize. * - * This function should only be used where HDprintf() behaves + * This function should only be used where printf() behaves * well -- i.e. not on Windows. * * Return: void @@ -1203,27 +1200,27 @@ H5C_def_auto_resize_rpt_fcn(H5C_t *cache_ptr, switch (status) { case in_spec: - HDfprintf(stdout, "%sAuto cache resize -- no change. (hit rate = %lf)\n", cache_ptr->prefix, - hit_rate); + fprintf(stdout, "%sAuto cache resize -- no change. (hit rate = %lf)\n", cache_ptr->prefix, + hit_rate); break; case increase: assert(hit_rate < cache_ptr->resize_ctl.lower_hr_threshold); assert(old_max_cache_size < new_max_cache_size); - HDfprintf(stdout, "%sAuto cache resize -- hit rate (%lf) out of bounds low (%6.5lf).\n", - cache_ptr->prefix, hit_rate, cache_ptr->resize_ctl.lower_hr_threshold); - HDfprintf(stdout, "%scache size increased from (%zu/%zu) to (%zu/%zu).\n", cache_ptr->prefix, - old_max_cache_size, old_min_clean_size, new_max_cache_size, new_min_clean_size); + fprintf(stdout, "%sAuto cache resize -- hit rate (%lf) out of bounds low (%6.5lf).\n", + cache_ptr->prefix, hit_rate, cache_ptr->resize_ctl.lower_hr_threshold); + fprintf(stdout, "%scache size increased from (%zu/%zu) to (%zu/%zu).\n", cache_ptr->prefix, + old_max_cache_size, old_min_clean_size, new_max_cache_size, new_min_clean_size); break; case flash_increase: assert(old_max_cache_size < new_max_cache_size); - HDfprintf(stdout, "%sflash cache resize(%d) -- size threshold = %zu.\n", cache_ptr->prefix, - (int)(cache_ptr->resize_ctl.flash_incr_mode), cache_ptr->flash_size_increase_threshold); - HDfprintf(stdout, "%s cache size increased from (%zu/%zu) to (%zu/%zu).\n", cache_ptr->prefix, - old_max_cache_size, old_min_clean_size, new_max_cache_size, new_min_clean_size); + fprintf(stdout, "%sflash cache resize(%d) -- size threshold = %zu.\n", cache_ptr->prefix, + (int)(cache_ptr->resize_ctl.flash_incr_mode), cache_ptr->flash_size_increase_threshold); + fprintf(stdout, "%s cache size increased from (%zu/%zu) to (%zu/%zu).\n", cache_ptr->prefix, + old_max_cache_size, old_min_clean_size, new_max_cache_size, new_min_clean_size); break; case decrease: @@ -1231,73 +1228,73 @@ H5C_def_auto_resize_rpt_fcn(H5C_t *cache_ptr, switch (cache_ptr->resize_ctl.decr_mode) { case H5C_decr__off: - HDfprintf(stdout, "%sAuto cache resize -- decrease off. HR = %lf\n", cache_ptr->prefix, - hit_rate); + fprintf(stdout, "%sAuto cache resize -- decrease off. HR = %lf\n", cache_ptr->prefix, + hit_rate); break; case H5C_decr__threshold: assert(hit_rate > cache_ptr->resize_ctl.upper_hr_threshold); - HDfprintf(stdout, "%sAuto cache resize -- decrease by threshold. HR = %lf > %6.5lf\n", - cache_ptr->prefix, hit_rate, cache_ptr->resize_ctl.upper_hr_threshold); - HDfprintf(stdout, "%sout of bounds high (%6.5lf).\n", cache_ptr->prefix, - cache_ptr->resize_ctl.upper_hr_threshold); + fprintf(stdout, "%sAuto cache resize -- decrease by threshold. HR = %lf > %6.5lf\n", + cache_ptr->prefix, hit_rate, cache_ptr->resize_ctl.upper_hr_threshold); + fprintf(stdout, "%sout of bounds high (%6.5lf).\n", cache_ptr->prefix, + cache_ptr->resize_ctl.upper_hr_threshold); break; case H5C_decr__age_out: - HDfprintf(stdout, "%sAuto cache resize -- decrease by ageout. HR = %lf\n", - cache_ptr->prefix, hit_rate); + fprintf(stdout, "%sAuto cache resize -- decrease by ageout. HR = %lf\n", + cache_ptr->prefix, hit_rate); break; case H5C_decr__age_out_with_threshold: assert(hit_rate > cache_ptr->resize_ctl.upper_hr_threshold); - HDfprintf(stdout, - "%sAuto cache resize -- decrease by ageout with threshold. HR = %lf > %6.5lf\n", - cache_ptr->prefix, hit_rate, cache_ptr->resize_ctl.upper_hr_threshold); + fprintf(stdout, + "%sAuto cache resize -- decrease by ageout with threshold. HR = %lf > %6.5lf\n", + cache_ptr->prefix, hit_rate, cache_ptr->resize_ctl.upper_hr_threshold); break; default: - HDfprintf(stdout, "%sAuto cache resize -- decrease by unknown mode. HR = %lf\n", - cache_ptr->prefix, hit_rate); + fprintf(stdout, "%sAuto cache resize -- decrease by unknown mode. HR = %lf\n", + cache_ptr->prefix, hit_rate); } - HDfprintf(stdout, "%s cache size decreased from (%zu/%zu) to (%zu/%zu).\n", cache_ptr->prefix, - old_max_cache_size, old_min_clean_size, new_max_cache_size, new_min_clean_size); + fprintf(stdout, "%s cache size decreased from (%zu/%zu) to (%zu/%zu).\n", cache_ptr->prefix, + old_max_cache_size, old_min_clean_size, new_max_cache_size, new_min_clean_size); break; case at_max_size: - HDfprintf(stdout, "%sAuto cache resize -- hit rate (%lf) out of bounds low (%6.5lf).\n", - cache_ptr->prefix, hit_rate, cache_ptr->resize_ctl.lower_hr_threshold); - HDfprintf(stdout, "%s cache already at maximum size so no change.\n", cache_ptr->prefix); + fprintf(stdout, "%sAuto cache resize -- hit rate (%lf) out of bounds low (%6.5lf).\n", + cache_ptr->prefix, hit_rate, cache_ptr->resize_ctl.lower_hr_threshold); + fprintf(stdout, "%s cache already at maximum size so no change.\n", cache_ptr->prefix); break; case at_min_size: - HDfprintf(stdout, "%sAuto cache resize -- hit rate (%lf) -- can't decrease.\n", cache_ptr->prefix, - hit_rate); - HDfprintf(stdout, "%s cache already at minimum size.\n", cache_ptr->prefix); + fprintf(stdout, "%sAuto cache resize -- hit rate (%lf) -- can't decrease.\n", cache_ptr->prefix, + hit_rate); + fprintf(stdout, "%s cache already at minimum size.\n", cache_ptr->prefix); break; case increase_disabled: - HDfprintf(stdout, "%sAuto cache resize -- increase disabled -- HR = %lf.", cache_ptr->prefix, - hit_rate); + fprintf(stdout, "%sAuto cache resize -- increase disabled -- HR = %lf.", cache_ptr->prefix, + hit_rate); break; case decrease_disabled: - HDfprintf(stdout, "%sAuto cache resize -- decrease disabled -- HR = %lf.\n", cache_ptr->prefix, - hit_rate); + fprintf(stdout, "%sAuto cache resize -- decrease disabled -- HR = %lf.\n", cache_ptr->prefix, + hit_rate); break; case not_full: assert(hit_rate < cache_ptr->resize_ctl.lower_hr_threshold); - HDfprintf(stdout, "%sAuto cache resize -- hit rate (%lf) out of bounds low (%6.5lf).\n", - cache_ptr->prefix, hit_rate, cache_ptr->resize_ctl.lower_hr_threshold); - HDfprintf(stdout, "%s cache not full so no increase in size.\n", cache_ptr->prefix); + fprintf(stdout, "%sAuto cache resize -- hit rate (%lf) out of bounds low (%6.5lf).\n", + cache_ptr->prefix, hit_rate, cache_ptr->resize_ctl.lower_hr_threshold); + fprintf(stdout, "%s cache not full so no increase in size.\n", cache_ptr->prefix); break; default: - HDfprintf(stdout, "%sAuto cache resize -- unknown status code.\n", cache_ptr->prefix); + fprintf(stdout, "%sAuto cache resize -- unknown status code.\n", cache_ptr->prefix); break; } } /* H5C_def_auto_resize_rpt_fcn() */ @@ -1626,16 +1623,15 @@ H5C__image_stats(H5C_t *cache_ptr, hbool_t H5_ATTR_UNUSED print_header) prefetch_use_rate = 0.0; if (print_header) { - HDfprintf(stdout, "\nhit prefetches prefetch image pf hit\n"); - HDfprintf(stdout, "rate: total: dirty: hits: flshs: evct: size: rate:\n"); + fprintf(stdout, "\nhit prefetches prefetch image pf hit\n"); + fprintf(stdout, "rate: total: dirty: hits: flshs: evct: size: rate:\n"); } /* end if */ - HDfprintf(stdout, "%3.1lf %5lld %5lld %5lld %5lld %5lld %5lld %3.1lf\n", hit_rate, - (long long)(cache_ptr->prefetches), (long long)(cache_ptr->dirty_prefetches), - (long long)(cache_ptr->prefetch_hits), - (long long)(cache_ptr->flushes[H5AC_PREFETCHED_ENTRY_ID]), - (long long)(cache_ptr->evictions[H5AC_PREFETCHED_ENTRY_ID]), - (long long)(cache_ptr->last_image_size), prefetch_use_rate); + fprintf(stdout, "%3.1lf %5lld %5lld %5lld %5lld %5lld %5lld %3.1lf\n", hit_rate, + (long long)(cache_ptr->prefetches), (long long)(cache_ptr->dirty_prefetches), + (long long)(cache_ptr->prefetch_hits), (long long)(cache_ptr->flushes[H5AC_PREFETCHED_ENTRY_ID]), + (long long)(cache_ptr->evictions[H5AC_PREFETCHED_ENTRY_ID]), + (long long)(cache_ptr->last_image_size), prefetch_use_rate); #endif /* H5C_COLLECT_CACHE_STATS */ done: diff --git a/src/H5Clog_json.c b/src/H5Clog_json.c index cffd10a..b2542a9 100644 --- a/src/H5Clog_json.c +++ b/src/H5Clog_json.c @@ -172,7 +172,7 @@ H5C__json_write_log_message(H5C_log_json_udata_t *json_udata) /* Write the log message and flush */ n_chars = HDstrlen(json_udata->message); - if ((int)n_chars != HDfprintf(json_udata->outfile, "%s", json_udata->message)) + if ((int)n_chars != fprintf(json_udata->outfile, "%s", json_udata->message)) HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "error writing log message") HDmemset((void *)(json_udata->message), 0, (size_t)(n_chars * sizeof(char))); diff --git a/src/H5Clog_trace.c b/src/H5Clog_trace.c index 72d93f6..be07fa4 100644 --- a/src/H5Clog_trace.c +++ b/src/H5Clog_trace.c @@ -167,7 +167,7 @@ H5C__trace_write_log_message(H5C_log_trace_udata_t *trace_udata) /* Write the log message and flush */ n_chars = HDstrlen(trace_udata->message); - if ((int)n_chars != HDfprintf(trace_udata->outfile, "%s", trace_udata->message)) + if ((int)n_chars != fprintf(trace_udata->outfile, "%s", trace_udata->message)) HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "error writing log message") HDmemset((void *)(trace_udata->message), 0, (size_t)(n_chars * sizeof(char))); @@ -249,7 +249,7 @@ H5C__log_trace_set_up(H5C_log_info_t *log_info, const char log_location[], int m HDsetbuf(trace_udata->outfile, NULL); /* Write the header */ - HDfprintf(trace_udata->outfile, "### HDF5 metadata cache trace file version 1 ###\n"); + fprintf(trace_udata->outfile, "### HDF5 metadata cache trace file version 1 ###\n"); done: if (file_name) diff --git a/src/H5Cmpio.c b/src/H5Cmpio.c index 308a7f3..b9b00fd 100644 --- a/src/H5Cmpio.c +++ b/src/H5Cmpio.c @@ -195,7 +195,7 @@ H5C_apply_candidate_list(H5F_t *f, H5C_t *cache_ptr, unsigned num_candidates, ha HDmemset(entries_to_clear, 0, sizeof(entries_to_clear)); #if H5C_APPLY_CANDIDATE_LIST__DEBUG - HDfprintf(stdout, "%s:%d: setting up candidate assignment table.\n", __func__, mpi_rank); + fprintf(stdout, "%s:%d: setting up candidate assignment table.\n", __func__, mpi_rank); HDmemset(tbl_buf, 0, sizeof(tbl_buf)); @@ -204,7 +204,7 @@ H5C_apply_candidate_list(H5F_t *f, H5C_t *cache_ptr, unsigned num_candidates, ha HDsprintf(&(tbl_buf[HDstrlen(tbl_buf)]), " 0x%llx", (long long)(*(candidates_list_ptr + u))); HDsprintf(&(tbl_buf[HDstrlen(tbl_buf)]), "\n"); - HDfprintf(stdout, "%s", tbl_buf); + fprintf(stdout, "%s", tbl_buf); #endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */ if (f->shared->coll_md_write) { @@ -269,12 +269,12 @@ H5C_apply_candidate_list(H5F_t *f, H5C_t *cache_ptr, unsigned num_candidates, ha for (u = 0; u <= (unsigned)mpi_size; u++) HDsprintf(&(tbl_buf[HDstrlen(tbl_buf)]), " %u", candidate_assignment_table[u]); HDsprintf(&(tbl_buf[HDstrlen(tbl_buf)]), "\n"); - HDfprintf(stdout, "%s", tbl_buf); + fprintf(stdout, "%s", tbl_buf); - HDfprintf(stdout, "%s:%d: flush entries [%u, %u].\n", __func__, mpi_rank, first_entry_to_flush, - last_entry_to_flush); + fprintf(stdout, "%s:%d: flush entries [%u, %u].\n", __func__, mpi_rank, first_entry_to_flush, + last_entry_to_flush); - HDfprintf(stdout, "%s:%d: marking entries.\n", __func__, mpi_rank); + fprintf(stdout, "%s:%d: marking entries.\n", __func__, mpi_rank); #endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */ for (u = 0; u < num_candidates; u++) { @@ -355,8 +355,8 @@ H5C_apply_candidate_list(H5F_t *f, H5C_t *cache_ptr, unsigned num_candidates, ha #endif /* H5C_DO_SANITY_CHECKS */ #if H5C_APPLY_CANDIDATE_LIST__DEBUG - HDfprintf(stdout, "%s:%d: num candidates/to clear/to flush = %u/%u/%u.\n", __func__, mpi_rank, - num_candidates, total_entries_to_clear, total_entries_to_flush); + fprintf(stdout, "%s:%d: num candidates/to clear/to flush = %u/%u/%u.\n", __func__, mpi_rank, + num_candidates, total_entries_to_clear, total_entries_to_flush); #endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */ /* We have now marked all the entries on the candidate list for @@ -684,14 +684,13 @@ H5C_mark_entries_as_clean(H5F_t *f, unsigned ce_array_len, haddr_t *ce_array_ptr if (entry_ptr == NULL) { #ifdef H5C_DO_SANITY_CHECKS - HDfprintf(stdout, "H5C_mark_entries_as_clean: entry[%u] = %" PRIuHADDR " not in cache.\n", u, - addr); + fprintf(stdout, "H5C_mark_entries_as_clean: entry[%u] = %" PRIuHADDR " not in cache.\n", u, addr); #endif /* H5C_DO_SANITY_CHECKS */ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Listed entry not in cache?!?!?") } /* end if */ else if (!entry_ptr->is_dirty) { #ifdef H5C_DO_SANITY_CHECKS - HDfprintf(stdout, "H5C_mark_entries_as_clean: entry %" PRIuHADDR " is not dirty!?!\n", addr); + fprintf(stdout, "H5C_mark_entries_as_clean: entry %" PRIuHADDR " is not dirty!?!\n", addr); #endif /* H5C_DO_SANITY_CHECKS */ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Listed entry not dirty?!?!?") } /* end else-if */ diff --git a/src/H5Dbtree.c b/src/H5Dbtree.c index a8af152..1b494ab 100644 --- a/src/H5Dbtree.c +++ b/src/H5Dbtree.c @@ -733,11 +733,11 @@ H5D__btree_debug_key(FILE *stream, int indent, int fwidth, const void *_key, con assert(key); - HDfprintf(stream, "%*s%-*s %u bytes\n", indent, "", fwidth, "Chunk size:", (unsigned)key->nbytes); - HDfprintf(stream, "%*s%-*s 0x%08x\n", indent, "", fwidth, "Filter mask:", key->filter_mask); - HDfprintf(stream, "%*s%-*s {", indent, "", fwidth, "Logical offset:"); + fprintf(stream, "%*s%-*s %u bytes\n", indent, "", fwidth, "Chunk size:", (unsigned)key->nbytes); + fprintf(stream, "%*s%-*s 0x%08x\n", indent, "", fwidth, "Filter mask:", key->filter_mask); + fprintf(stream, "%*s%-*s {", indent, "", fwidth, "Logical offset:"); for (u = 0; u < udata->ndims; u++) - HDfprintf(stream, "%s%" PRIuHSIZE, u ? ", " : "", (key->scaled[u] * udata->common.layout->dim[u])); + fprintf(stream, "%s%" PRIuHSIZE, u ? ", " : "", (key->scaled[u] * udata->common.layout->dim[u])); HDfputs("}\n", stream); FUNC_LEAVE_NOAPI(SUCCEED) @@ -1368,7 +1368,7 @@ H5D__btree_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream) assert(storage); assert(stream); - HDfprintf(stream, " Address: %" PRIuHADDR "\n", storage->idx_addr); + fprintf(stream, " Address: %" PRIuHADDR "\n", storage->idx_addr); FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5D__btree_idx_dump() */ diff --git a/src/H5Dbtree2.c b/src/H5Dbtree2.c index 69c6629..4a43ae4 100644 --- a/src/H5Dbtree2.c +++ b/src/H5Dbtree2.c @@ -440,11 +440,11 @@ H5D__bt2_unfilt_debug(FILE *stream, int indent, int fwidth, const void *_record, assert(ctx->chunk_size == record->nbytes); assert(0 == record->filter_mask); - HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Chunk address:", record->chunk_addr); + fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Chunk address:", record->chunk_addr); - HDfprintf(stream, "%*s%-*s {", indent, "", fwidth, "Logical offset:"); + fprintf(stream, "%*s%-*s {", indent, "", fwidth, "Logical offset:"); for (u = 0; u < ctx->ndims; u++) - HDfprintf(stream, "%s%" PRIuHSIZE, u ? ", " : "", record->scaled[u] * ctx->dim[u]); + fprintf(stream, "%s%" PRIuHSIZE, u ? ", " : "", record->scaled[u] * ctx->dim[u]); HDfputs("}\n", stream); FUNC_LEAVE_NOAPI(SUCCEED) @@ -554,13 +554,13 @@ H5D__bt2_filt_debug(FILE *stream, int indent, int fwidth, const void *_record, c assert(H5_addr_defined(record->chunk_addr)); assert(0 != record->nbytes); - HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Chunk address:", record->chunk_addr); - HDfprintf(stream, "%*s%-*s %u bytes\n", indent, "", fwidth, "Chunk size:", (unsigned)record->nbytes); - HDfprintf(stream, "%*s%-*s 0x%08x\n", indent, "", fwidth, "Filter mask:", record->filter_mask); + fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Chunk address:", record->chunk_addr); + fprintf(stream, "%*s%-*s %u bytes\n", indent, "", fwidth, "Chunk size:", (unsigned)record->nbytes); + fprintf(stream, "%*s%-*s 0x%08x\n", indent, "", fwidth, "Filter mask:", record->filter_mask); - HDfprintf(stream, "%*s%-*s {", indent, "", fwidth, "Logical offset:"); + fprintf(stream, "%*s%-*s {", indent, "", fwidth, "Logical offset:"); for (u = 0; u < ctx->ndims; u++) - HDfprintf(stream, "%s%" PRIuHSIZE, u ? ", " : "", record->scaled[u] * ctx->dim[u]); + fprintf(stream, "%s%" PRIuHSIZE, u ? ", " : "", record->scaled[u] * ctx->dim[u]); HDfputs("}\n", stream); FUNC_LEAVE_NOAPI(SUCCEED) @@ -1469,7 +1469,7 @@ H5D__bt2_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream) assert(storage); assert(stream); - HDfprintf(stream, " Address: %" PRIuHADDR "\n", storage->idx_addr); + fprintf(stream, " Address: %" PRIuHADDR "\n", storage->idx_addr); FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5D__bt2_idx_dump() */ diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c index c40d1d6..64a5a4c 100644 --- a/src/H5Dchunk.c +++ b/src/H5Dchunk.c @@ -7284,20 +7284,19 @@ H5D__chunk_dump_index_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata) /* Print header if not already displayed */ if (!udata->header_displayed) { - HDfprintf(udata->stream, " Flags Bytes Address Logical Offset\n"); - HDfprintf(udata->stream, - " ========== ======== ========== ==============================\n"); + fprintf(udata->stream, " Flags Bytes Address Logical Offset\n"); + fprintf(udata->stream, " ========== ======== ========== ==============================\n"); /* Set flag that the headers has been printed */ udata->header_displayed = TRUE; } /* end if */ /* Print information about this chunk */ - HDfprintf(udata->stream, " 0x%08x %8" PRIu32 " %10" PRIuHADDR " [", chunk_rec->filter_mask, - chunk_rec->nbytes, chunk_rec->chunk_addr); + fprintf(udata->stream, " 0x%08x %8" PRIu32 " %10" PRIuHADDR " [", chunk_rec->filter_mask, + chunk_rec->nbytes, chunk_rec->chunk_addr); for (u = 0; u < udata->ndims; u++) - HDfprintf(udata->stream, "%s%" PRIuHSIZE, (u ? ", " : ""), - (chunk_rec->scaled[u] * udata->chunk_dim[u])); + fprintf(udata->stream, "%s%" PRIuHSIZE, (u ? ", " : ""), + (chunk_rec->scaled[u] * udata->chunk_dim[u])); HDfputs("]\n", udata->stream); } /* end if */ @@ -7391,11 +7390,11 @@ H5D__chunk_stats(const H5D_t *dset, hbool_t headers) HGOTO_DONE(SUCCEED) if (headers) { - HDfprintf(H5DEBUG(AC), "H5D: raw data cache statistics\n"); - HDfprintf(H5DEBUG(AC), " %-18s %8s %8s %8s %8s+%-8s\n", "Layer", "Hits", "Misses", "MissRate", - "Inits", "Flushes"); - HDfprintf(H5DEBUG(AC), " %-18s %8s %8s %8s %8s-%-8s\n", "-----", "----", "------", "--------", - "-----", "-------"); + fprintf(H5DEBUG(AC), "H5D: raw data cache statistics\n"); + fprintf(H5DEBUG(AC), " %-18s %8s %8s %8s %8s+%-8s\n", "Layer", "Hits", "Misses", "MissRate", + "Inits", "Flushes"); + fprintf(H5DEBUG(AC), " %-18s %8s %8s %8s %8s-%-8s\n", "-----", "----", "------", "--------", + "-----", "-------"); } #ifdef H5AC_DEBUG @@ -7417,9 +7416,9 @@ H5D__chunk_stats(const H5D_t *dset, hbool_t headers) HDsnprintf(ascii, sizeof(ascii), "%7.2f%%", miss_rate); } - HDfprintf(H5DEBUG(AC), " %-18s %8u %8u %7s %8d+%-9ld\n", "raw data chunks", rdcc->stats.nhits, - rdcc->stats.nmisses, ascii, rdcc->stats.ninits, - (long)(rdcc->stats.nflushes) - (long)(rdcc->stats.ninits)); + fprintf(H5DEBUG(AC), " %-18s %8u %8u %7s %8d+%-9ld\n", "raw data chunks", rdcc->stats.nhits, + rdcc->stats.nmisses, ascii, rdcc->stats.ninits, + (long)(rdcc->stats.nflushes) - (long)(rdcc->stats.ninits)); } done: diff --git a/src/H5Ddbg.c b/src/H5Ddbg.c index 0dc6bd7..569dad9 100644 --- a/src/H5Ddbg.c +++ b/src/H5Ddbg.c @@ -77,8 +77,7 @@ H5Ddebug(hid_t dset_id) if (H5D_CHUNKED == dset->shared->layout.type) (void)H5D__chunk_dump_index(dset, stdout); else if (H5D_CONTIGUOUS == dset->shared->layout.type) - HDfprintf(stdout, " %-10s %" PRIuHADDR "\n", - "Address:", dset->shared->layout.storage.u.contig.addr); + fprintf(stdout, " %-10s %" PRIuHADDR "\n", "Address:", dset->shared->layout.storage.u.contig.addr); done: FUNC_LEAVE_API(ret_value) diff --git a/src/H5Dearray.c b/src/H5Dearray.c index 5a98967..87dc377 100644 --- a/src/H5Dearray.c +++ b/src/H5Dearray.c @@ -417,7 +417,7 @@ H5D__earray_debug(FILE *stream, int indent, int fwidth, hsize_t idx, const void /* Print element */ HDsnprintf(temp_str, sizeof(temp_str), "Element #%" PRIuHSIZE ":", idx); - HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, temp_str, *(const haddr_t *)elmt); + fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, temp_str, *(const haddr_t *)elmt); FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5D__earray_debug() */ @@ -573,8 +573,8 @@ H5D__earray_filt_debug(FILE *stream, int indent, int fwidth, hsize_t idx, const /* Print element */ HDsnprintf(temp_str, sizeof(temp_str), "Element #%" PRIuHSIZE ":", idx); - HDfprintf(stream, "%*s%-*s {%" PRIuHADDR ", %u, %0x}\n", indent, "", fwidth, temp_str, elmt->addr, - elmt->nbytes, elmt->filter_mask); + fprintf(stream, "%*s%-*s {%" PRIuHADDR ", %u, %0x}\n", indent, "", fwidth, temp_str, elmt->addr, + elmt->nbytes, elmt->filter_mask); FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5D__earray_filt_debug() */ @@ -1735,7 +1735,7 @@ H5D__earray_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream) assert(storage); assert(stream); - HDfprintf(stream, " Address: %" PRIuHADDR "\n", storage->idx_addr); + fprintf(stream, " Address: %" PRIuHADDR "\n", storage->idx_addr); FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5D__earray_idx_dump() */ diff --git a/src/H5Dfarray.c b/src/H5Dfarray.c index 0cd09dd..7caef2c 100644 --- a/src/H5Dfarray.c +++ b/src/H5Dfarray.c @@ -415,7 +415,7 @@ H5D__farray_debug(FILE *stream, int indent, int fwidth, hsize_t idx, const void /* Print element */ HDsnprintf(temp_str, sizeof(temp_str), "Element #%" PRIuHSIZE ":", idx); - HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, temp_str, *(const haddr_t *)elmt); + fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, temp_str, *(const haddr_t *)elmt); FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5D__farray_debug() */ @@ -675,8 +675,8 @@ H5D__farray_filt_debug(FILE *stream, int indent, int fwidth, hsize_t idx, const /* Print element */ HDsnprintf(temp_str, sizeof(temp_str), "Element #%" PRIuHSIZE ":", idx); - HDfprintf(stream, "%*s%-*s {%" PRIuHADDR ", %u, %0x}\n", indent, "", fwidth, temp_str, elmt->addr, - elmt->nbytes, elmt->filter_mask); + fprintf(stream, "%*s%-*s {%" PRIuHADDR ", %u, %0x}\n", indent, "", fwidth, temp_str, elmt->addr, + elmt->nbytes, elmt->filter_mask); FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5D__farray_filt_debug() */ @@ -1590,7 +1590,7 @@ H5D__farray_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream) assert(storage); assert(stream); - HDfprintf(stream, " Address: %" PRIuHADDR "\n", storage->idx_addr); + fprintf(stream, " Address: %" PRIuHADDR "\n", storage->idx_addr); FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5D__farray_idx_dump() */ diff --git a/src/H5Dmpio.c b/src/H5Dmpio.c index 7a8b121..ea4d9a4 100644 --- a/src/H5Dmpio.c +++ b/src/H5Dmpio.c @@ -432,7 +432,7 @@ static FILE *debug_stream = NULL; #define H5D_MPIO_DEBUG(rank, string) \ do { \ if (debug_stream && H5D_MPIO_DEBUG_THIS_RANK(rank)) { \ - HDfprintf(debug_stream, "%*s(Rank %d) " string "\n", debug_indent, "", rank); \ + fprintf(debug_stream, "%*s(Rank %d) " string "\n", debug_indent, "", rank); \ HDfflush(debug_stream); \ } \ } while (0) @@ -441,7 +441,7 @@ static FILE *debug_stream = NULL; #define H5D_MPIO_DEBUG_VA(rank, string, ...) \ do { \ if (debug_stream && H5D_MPIO_DEBUG_THIS_RANK(rank)) { \ - HDfprintf(debug_stream, "%*s(Rank %d) " string "\n", debug_indent, "", rank, __VA_ARGS__); \ + fprintf(debug_stream, "%*s(Rank %d) " string "\n", debug_indent, "", rank, __VA_ARGS__); \ HDfflush(debug_stream); \ } \ } while (0) @@ -1150,7 +1150,7 @@ H5D__piece_io(H5D_io_info_t *io_info) /* Print a short header for this I/O operation */ time_now = HDtime(NULL); - HDfprintf(debug_log_file, "##### %s", HDasctime(HDlocaltime(&time_now))); + fprintf(debug_log_file, "##### %s", HDasctime(HDlocaltime(&time_now))); debug_stream = debug_log_file; } @@ -1356,7 +1356,7 @@ done: #ifdef H5Dmpio_DEBUG /* Close debugging log file */ if (debug_log_file) { - HDfprintf(debug_log_file, "##############\n\n"); + fprintf(debug_log_file, "##############\n\n"); if (EOF == HDfclose(debug_log_file)) HDONE_ERROR(H5E_IO, H5E_CLOSEERROR, FAIL, "couldn't close debugging log file") debug_stream = H5DEBUG(D); diff --git a/src/H5Dnone.c b/src/H5Dnone.c index 0ece5b7..2f54fb6 100644 --- a/src/H5Dnone.c +++ b/src/H5Dnone.c @@ -469,7 +469,7 @@ H5D__none_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream) assert(storage); assert(stream); - HDfprintf(stream, " Address: %" PRIuHADDR "\n", storage->idx_addr); + fprintf(stream, " Address: %" PRIuHADDR "\n", storage->idx_addr); FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5D__none_idx_dump() */ diff --git a/src/H5Dsingle.c b/src/H5Dsingle.c index 2ddd6cf..0ee1834 100644 --- a/src/H5Dsingle.c +++ b/src/H5Dsingle.c @@ -526,7 +526,7 @@ H5D__single_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream) assert(storage); assert(stream); - HDfprintf(stream, " Address: %" PRIuHADDR "\n", storage->idx_addr); + fprintf(stream, " Address: %" PRIuHADDR "\n", storage->idx_addr); FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5D__single_idx_dump() */ diff --git a/src/H5EAdbg.c b/src/H5EAdbg.c index 218558e..3f677a4 100644 --- a/src/H5EAdbg.c +++ b/src/H5EAdbg.c @@ -109,35 +109,35 @@ H5EA__hdr_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, co HGOTO_ERROR(H5E_EARRAY, H5E_CANTPROTECT, FAIL, "unable to load extensible array header") /* Print opening message */ - HDfprintf(stream, "%*sExtensible Array Header...\n", indent, ""); + fprintf(stream, "%*sExtensible Array Header...\n", indent, ""); /* Print the values */ - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Array class ID:", hdr->cparam.cls->name); - HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Header size:", hdr->size); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, - "Raw Element Size:", (unsigned)hdr->cparam.raw_elmt_size); - HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, - "Native Element Size (on this platform):", hdr->cparam.cls->nat_elmt_size); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, - "Log2(Max. # of elements in array):", (unsigned)hdr->cparam.max_nelmts_bits); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, - "# of elements in index block:", (unsigned)hdr->cparam.idx_blk_elmts); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, - "Min. # of elements per data block:", (unsigned)hdr->cparam.data_blk_min_elmts); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Min. # of data block pointers for a super block:", - (unsigned)hdr->cparam.sup_blk_min_data_ptrs); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Log2(Max. # of elements in data block page):", - (unsigned)hdr->cparam.max_dblk_page_nelmts_bits); - HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, - "Highest element index stored (+1):", hdr->stats.stored.max_idx_set); - HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, - "Number of super blocks created:", hdr->stats.stored.nsuper_blks); - HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, - "Number of data blocks created:", hdr->stats.stored.ndata_blks); - HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, - "Number of elements 'realized':", hdr->stats.stored.nelmts); - HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, - "Index Block Address:", hdr->idx_blk_addr); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Array class ID:", hdr->cparam.cls->name); + fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Header size:", hdr->size); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, + "Raw Element Size:", (unsigned)hdr->cparam.raw_elmt_size); + fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, + "Native Element Size (on this platform):", hdr->cparam.cls->nat_elmt_size); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, + "Log2(Max. # of elements in array):", (unsigned)hdr->cparam.max_nelmts_bits); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, + "# of elements in index block:", (unsigned)hdr->cparam.idx_blk_elmts); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, + "Min. # of elements per data block:", (unsigned)hdr->cparam.data_blk_min_elmts); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, + "Min. # of data block pointers for a super block:", (unsigned)hdr->cparam.sup_blk_min_data_ptrs); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, + "Log2(Max. # of elements in data block page):", (unsigned)hdr->cparam.max_dblk_page_nelmts_bits); + fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, + "Highest element index stored (+1):", hdr->stats.stored.max_idx_set); + fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, + "Number of super blocks created:", hdr->stats.stored.nsuper_blks); + fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, + "Number of data blocks created:", hdr->stats.stored.ndata_blks); + fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, + "Number of elements 'realized':", hdr->stats.stored.nelmts); + fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, + "Index Block Address:", hdr->idx_blk_addr); done: if (dbg_ctx && cls->dst_dbg_ctx(dbg_ctx) < 0) @@ -202,22 +202,22 @@ H5EA__iblock_debug(H5F_t *f, haddr_t H5_ATTR_UNUSED addr, FILE *stream, int inde (unsigned long long)hdr->idx_blk_addr) /* Print opening message */ - HDfprintf(stream, "%*sExtensible Array Index Block...\n", indent, ""); + fprintf(stream, "%*sExtensible Array Index Block...\n", indent, ""); /* Print the values */ - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Array class ID:", hdr->cparam.cls->name); - HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Index Block size:", iblock->size); - HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, - "# of data block addresses in index block:", iblock->ndblk_addrs); - HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, - "# of super block addresses in index block:", iblock->nsblk_addrs); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Array class ID:", hdr->cparam.cls->name); + fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Index Block size:", iblock->size); + fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, + "# of data block addresses in index block:", iblock->ndblk_addrs); + fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, + "# of super block addresses in index block:", iblock->nsblk_addrs); /* Check if there are any elements in index block */ if (hdr->cparam.idx_blk_elmts > 0) { unsigned u; /* Local index variable */ /* Print the elements in the index block */ - HDfprintf(stream, "%*sElements in Index Block:\n", indent, ""); + fprintf(stream, "%*sElements in Index Block:\n", indent, ""); for (u = 0; u < hdr->cparam.idx_blk_elmts; u++) { /* Call the class's 'debug' callback */ if ((hdr->cparam.cls->debug)(stream, (indent + 3), MAX(0, (fwidth - 3)), (hsize_t)u, @@ -233,12 +233,12 @@ H5EA__iblock_debug(H5F_t *f, haddr_t H5_ATTR_UNUSED addr, FILE *stream, int inde unsigned u; /* Local index variable */ /* Print the data block addresses in the index block */ - HDfprintf(stream, "%*sData Block Addresses in Index Block:\n", indent, ""); + fprintf(stream, "%*sData Block Addresses in Index Block:\n", indent, ""); for (u = 0; u < iblock->ndblk_addrs; u++) { /* Print address */ HDsnprintf(temp_str, sizeof(temp_str), "Address #%u:", u); - HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", (indent + 3), "", MAX(0, (fwidth - 3)), temp_str, - iblock->dblk_addrs[u]); + fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", (indent + 3), "", MAX(0, (fwidth - 3)), temp_str, + iblock->dblk_addrs[u]); } /* end for */ } /* end if */ @@ -248,12 +248,12 @@ H5EA__iblock_debug(H5F_t *f, haddr_t H5_ATTR_UNUSED addr, FILE *stream, int inde unsigned u; /* Local index variable */ /* Print the super block addresses in the index block */ - HDfprintf(stream, "%*sSuper Block Addresses in Index Block:\n", indent, ""); + fprintf(stream, "%*sSuper Block Addresses in Index Block:\n", indent, ""); for (u = 0; u < iblock->nsblk_addrs; u++) { /* Print address */ HDsnprintf(temp_str, sizeof(temp_str), "Address #%u:", u); - HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", (indent + 3), "", MAX(0, (fwidth - 3)), temp_str, - iblock->sblk_addrs[u]); + fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", (indent + 3), "", MAX(0, (fwidth - 3)), temp_str, + iblock->sblk_addrs[u]); } /* end for */ } /* end if */ @@ -321,15 +321,15 @@ H5EA__sblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, (unsigned long long)addr) /* Print opening message */ - HDfprintf(stream, "%*sExtensible Array Super Block...\n", indent, ""); + fprintf(stream, "%*sExtensible Array Super Block...\n", indent, ""); /* Print the values */ - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Array class ID:", hdr->cparam.cls->name); - HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Super Block size:", sblock->size); - HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, - "# of data block addresses in super block:", sblock->ndblks); - HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, - "# of elements in data blocks from this super block:", sblock->dblk_nelmts); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Array class ID:", hdr->cparam.cls->name); + fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Super Block size:", sblock->size); + fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, + "# of data block addresses in super block:", sblock->ndblks); + fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, + "# of elements in data blocks from this super block:", sblock->dblk_nelmts); /* Check if there are any data block addresses in super block */ if (sblock->ndblks > 0) { @@ -337,12 +337,12 @@ H5EA__sblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, unsigned u; /* Local index variable */ /* Print the data block addresses in the super block */ - HDfprintf(stream, "%*sData Block Addresses in Super Block:\n", indent, ""); + fprintf(stream, "%*sData Block Addresses in Super Block:\n", indent, ""); for (u = 0; u < sblock->ndblks; u++) { /* Print address */ HDsnprintf(temp_str, sizeof(temp_str), "Address #%u:", u); - HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", (indent + 3), "", MAX(0, (fwidth - 3)), temp_str, - sblock->dblk_addrs[u]); + fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", (indent + 3), "", MAX(0, (fwidth - 3)), temp_str, + sblock->dblk_addrs[u]); } /* end for */ } /* end if */ @@ -410,14 +410,14 @@ H5EA__dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, "unable to protect extensible array data block, address = %" PRIuHADDR, addr) /* Print opening message */ - HDfprintf(stream, "%*sExtensible Array data Block...\n", indent, ""); + fprintf(stream, "%*sExtensible Array data Block...\n", indent, ""); /* Print the values */ - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Array class ID:", hdr->cparam.cls->name); - HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Data Block size:", dblock->size); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Array class ID:", hdr->cparam.cls->name); + fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Data Block size:", dblock->size); /* Print the elements in the index block */ - HDfprintf(stream, "%*sElements:\n", indent, ""); + fprintf(stream, "%*sElements:\n", indent, ""); for (u = 0; u < dblk_nelmts; u++) { /* Call the class's 'debug' callback */ if ((hdr->cparam.cls->debug)(stream, (indent + 3), MAX(0, (fwidth - 3)), (hsize_t)u, diff --git a/src/H5EAtest.c b/src/H5EAtest.c index 7e02ed7..6167954 100644 --- a/src/H5EAtest.c +++ b/src/H5EAtest.c @@ -322,8 +322,8 @@ H5EA__test_debug(FILE *stream, int indent, int fwidth, hsize_t idx, const void * /* Print element */ HDsnprintf(temp_str, sizeof(temp_str), "Element #%llu:", (unsigned long long)idx); - HDfprintf(stream, "%*s%-*s %llu\n", indent, "", fwidth, temp_str, - (unsigned long long)*(const uint64_t *)elmt); + fprintf(stream, "%*s%-*s %llu\n", indent, "", fwidth, temp_str, + (unsigned long long)*(const uint64_t *)elmt); FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5EA__test_debug() */ diff --git a/src/H5Eint.c b/src/H5Eint.c index 64292f3..2719a41 100644 --- a/src/H5Eint.c +++ b/src/H5Eint.c @@ -226,10 +226,10 @@ H5E__walk1_cb(int n, H5E_error1_t *err_desc, void *client_data) if (cls_ptr->lib_vers) eprint->cls.lib_vers = cls_ptr->lib_vers; - HDfprintf(stream, "%s-DIAG: Error detected in %s (%s) ", - (cls_ptr->cls_name ? cls_ptr->cls_name : "(null)"), - (cls_ptr->lib_name ? cls_ptr->lib_name : "(null)"), - (cls_ptr->lib_vers ? cls_ptr->lib_vers : "(null)")); + fprintf(stream, "%s-DIAG: Error detected in %s (%s) ", + (cls_ptr->cls_name ? cls_ptr->cls_name : "(null)"), + (cls_ptr->lib_name ? cls_ptr->lib_name : "(null)"), + (cls_ptr->lib_vers ? cls_ptr->lib_vers : "(null)")); /* try show the process or thread id in multiple processes cases*/ #ifdef H5_HAVE_PARALLEL @@ -241,15 +241,15 @@ H5E__walk1_cb(int n, H5E_error1_t *err_desc, void *client_data) if (mpi_initialized && !mpi_finalized) { MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); - HDfprintf(stream, "MPI-process %d", mpi_rank); + fprintf(stream, "MPI-process %d", mpi_rank); } /* end if */ else - HDfprintf(stream, "thread 0"); + fprintf(stream, "thread 0"); } /* end block */ #else - HDfprintf(stream, "thread %" PRIu64, H5TS_thread_id()); + fprintf(stream, "thread %" PRIu64, H5TS_thread_id()); #endif - HDfprintf(stream, ":\n"); + fprintf(stream, ":\n"); } /* end if */ /* Check for "real" error description - used to format output more nicely */ @@ -257,11 +257,10 @@ H5E__walk1_cb(int n, H5E_error1_t *err_desc, void *client_data) have_desc = 0; /* Print error message */ - HDfprintf(stream, "%*s#%03d: %s line %u in %s()%s%s\n", H5E_INDENT, "", n, err_desc->file_name, - err_desc->line, err_desc->func_name, (have_desc ? ": " : ""), - (have_desc ? err_desc->desc : "")); - HDfprintf(stream, "%*smajor: %s\n", (H5E_INDENT * 2), "", maj_str); - HDfprintf(stream, "%*sminor: %s\n", (H5E_INDENT * 2), "", min_str); + fprintf(stream, "%*s#%03d: %s line %u in %s()%s%s\n", H5E_INDENT, "", n, err_desc->file_name, + err_desc->line, err_desc->func_name, (have_desc ? ": " : ""), (have_desc ? err_desc->desc : "")); + fprintf(stream, "%*smajor: %s\n", (H5E_INDENT * 2), "", maj_str); + fprintf(stream, "%*sminor: %s\n", (H5E_INDENT * 2), "", min_str); done: FUNC_LEAVE_NOAPI(ret_value) @@ -354,10 +353,10 @@ H5E__walk2_cb(unsigned n, const H5E_error2_t *err_desc, void *client_data) if (cls_ptr->lib_vers) eprint->cls.lib_vers = cls_ptr->lib_vers; - HDfprintf(stream, "%s-DIAG: Error detected in %s (%s) ", - (cls_ptr->cls_name ? cls_ptr->cls_name : "(null)"), - (cls_ptr->lib_name ? cls_ptr->lib_name : "(null)"), - (cls_ptr->lib_vers ? cls_ptr->lib_vers : "(null)")); + fprintf(stream, "%s-DIAG: Error detected in %s (%s) ", + (cls_ptr->cls_name ? cls_ptr->cls_name : "(null)"), + (cls_ptr->lib_name ? cls_ptr->lib_name : "(null)"), + (cls_ptr->lib_vers ? cls_ptr->lib_vers : "(null)")); /* try show the process or thread id in multiple processes cases*/ #ifdef H5_HAVE_PARALLEL @@ -369,15 +368,15 @@ H5E__walk2_cb(unsigned n, const H5E_error2_t *err_desc, void *client_data) if (mpi_initialized && !mpi_finalized) { MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); - HDfprintf(stream, "MPI-process %d", mpi_rank); + fprintf(stream, "MPI-process %d", mpi_rank); } /* end if */ else - HDfprintf(stream, "thread 0"); + fprintf(stream, "thread 0"); } /* end block */ #else - HDfprintf(stream, "thread %" PRIu64, H5TS_thread_id()); + fprintf(stream, "thread %" PRIu64, H5TS_thread_id()); #endif - HDfprintf(stream, ":\n"); + fprintf(stream, ":\n"); } /* end if */ /* Check for "real" error description - used to format output more nicely */ @@ -385,11 +384,10 @@ H5E__walk2_cb(unsigned n, const H5E_error2_t *err_desc, void *client_data) have_desc = 0; /* Print error message */ - HDfprintf(stream, "%*s#%03u: %s line %u in %s()%s%s\n", H5E_INDENT, "", n, err_desc->file_name, - err_desc->line, err_desc->func_name, (have_desc ? ": " : ""), - (have_desc ? err_desc->desc : "")); - HDfprintf(stream, "%*smajor: %s\n", (H5E_INDENT * 2), "", maj_str); - HDfprintf(stream, "%*sminor: %s\n", (H5E_INDENT * 2), "", min_str); + fprintf(stream, "%*s#%03u: %s line %u in %s()%s%s\n", H5E_INDENT, "", n, err_desc->file_name, + err_desc->line, err_desc->func_name, (have_desc ? ": " : ""), (have_desc ? err_desc->desc : "")); + fprintf(stream, "%*smajor: %s\n", (H5E_INDENT * 2), "", maj_str); + fprintf(stream, "%*sminor: %s\n", (H5E_INDENT * 2), "", min_str); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5FAdbg.c b/src/H5FAdbg.c index 3ae1aa1..515103f 100644 --- a/src/H5FAdbg.c +++ b/src/H5FAdbg.c @@ -109,24 +109,24 @@ H5FA__hdr_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, co HGOTO_ERROR(H5E_FARRAY, H5E_CANTPROTECT, FAIL, "unable to load fixed array header") /* Print opening message */ - HDfprintf(stream, "%*sFixed Array Header...\n", indent, ""); + fprintf(stream, "%*sFixed Array Header...\n", indent, ""); /* Print the values */ - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Array class ID:", hdr->cparam.cls->name); - HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Header size:", hdr->size); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, - "Raw Element Size:", (unsigned)hdr->cparam.raw_elmt_size); - HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, - "Native Element Size (on this platform):", hdr->cparam.cls->nat_elmt_size); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Array class ID:", hdr->cparam.cls->name); + fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Header size:", hdr->size); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, + "Raw Element Size:", (unsigned)hdr->cparam.raw_elmt_size); + fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, + "Native Element Size (on this platform):", hdr->cparam.cls->nat_elmt_size); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Max. # of elements in data block page:", - (unsigned)((size_t)1 << hdr->cparam.max_dblk_page_nelmts_bits)); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Max. # of elements in data block page:", + (unsigned)((size_t)1 << hdr->cparam.max_dblk_page_nelmts_bits)); - HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, - "Number of elements in Fixed Array:", hdr->stats.nelmts); + fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, + "Number of elements in Fixed Array:", hdr->stats.nelmts); - HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, - "Fixed Array Data Block Address:", hdr->dblk_addr); + fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, + "Fixed Array Data Block Address:", hdr->dblk_addr); done: if (dbg_ctx && cls->dst_dbg_ctx(dbg_ctx) < 0) @@ -188,24 +188,24 @@ H5FA__dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, "unable to protect fixed array data block, address = %llu", (unsigned long long)addr) /* Print opening message */ - HDfprintf(stream, "%*sFixed Array data Block...\n", indent, ""); + fprintf(stream, "%*sFixed Array data Block...\n", indent, ""); /* Print the values */ - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Array class ID:", hdr->cparam.cls->name); - HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Address of Data Block:", dblock->addr); - HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, "Data Block size:", dblock->size); - HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, - "Number of elements in Data Block:", hdr->cparam.nelmts); - HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Number of pages in Data Block:", dblock->npages); - HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, - "Number of elements per Data Block page:", dblock->dblk_page_nelmts); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Array class ID:", hdr->cparam.cls->name); + fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Address of Data Block:", dblock->addr); + fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, "Data Block size:", dblock->size); + fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, + "Number of elements in Data Block:", hdr->cparam.nelmts); + fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Number of pages in Data Block:", dblock->npages); + fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, + "Number of elements per Data Block page:", dblock->dblk_page_nelmts); if (dblock->npages) { /* paging */ size_t dblk_page_nelmts; /* # of elements in a data block page */ haddr_t dblk_page_addr; /* Address of a data block page */ size_t page_idx; /* Page index within data block */ - HDfprintf(stream, "%*sPaging:\n", indent, ""); + fprintf(stream, "%*sPaging:\n", indent, ""); /* Iterate over the pages */ dblk_page_addr = dblock->addr + H5FA_DBLOCK_PREFIX_SIZE(dblock); @@ -214,7 +214,7 @@ H5FA__dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, /* Read and print each page's elements in the data block */ for (page_idx = 0; page_idx < dblock->npages; page_idx++) { if (!H5VM_bit_get(dblock->dblk_page_init, page_idx)) { - HDfprintf(stream, "%*s%-*s %zu %s\n", indent, "", fwidth, "Page %zu:", page_idx, "empty"); + fprintf(stream, "%*s%-*s %zu %s\n", indent, "", fwidth, "Page %zu:", page_idx, "empty"); } /* end if */ else { /* get the page */ @@ -232,7 +232,7 @@ H5FA__dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, "unable to protect fixed array data block page, address = %llu", (unsigned long long)dblk_page_addr) - HDfprintf(stream, "%*sElements in page %zu:\n", indent, "", page_idx); + fprintf(stream, "%*sElements in page %zu:\n", indent, "", page_idx); for (u = 0; u < dblk_page_nelmts; u++) { /* Call the class's 'debug' callback */ if ((hdr->cparam.cls->debug)(stream, (indent + 3), MAX(0, (fwidth - 3)), (hsize_t)u, @@ -251,7 +251,7 @@ H5FA__dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, } /* end if */ else { /* not paging */ /* Print the elements in the data block */ - HDfprintf(stream, "%*sElements:\n", indent, ""); + fprintf(stream, "%*sElements:\n", indent, ""); for (u = 0; u < hdr->cparam.nelmts; u++) { /* Call the class's 'debug' callback */ if ((hdr->cparam.cls->debug)(stream, (indent + 3), MAX(0, (fwidth - 3)), (hsize_t)u, diff --git a/src/H5FAdblkpage.c b/src/H5FAdblkpage.c index 04931c9..4930fc2 100644 --- a/src/H5FAdblkpage.c +++ b/src/H5FAdblkpage.c @@ -146,7 +146,7 @@ H5FA__dblk_page_create(H5FA_hdr_t *hdr, haddr_t addr, size_t nelmts) FUNC_ENTER_PACKAGE #ifdef H5FA_DEBUG - HDfprintf(stderr, "%s: Called, addr = %" PRIuHADDR "\n", __func__, addr); + fprintf(stderr, "%s: Called, addr = %" PRIuHADDR "\n", __func__, addr); #endif /* H5FA_DEBUG */ /* Sanity check */ @@ -161,7 +161,7 @@ H5FA__dblk_page_create(H5FA_hdr_t *hdr, haddr_t addr, size_t nelmts) dblk_page->addr = addr; dblk_page->size = H5FA_DBLK_PAGE_SIZE(hdr, nelmts); #ifdef H5FA_DEBUG - HDfprintf(stderr, "%s: dblk_page->size = %Zu\n", __func__, dblk_page->size); + fprintf(stderr, "%s: dblk_page->size = %Zu\n", __func__, dblk_page->size); #endif /* H5FA_DEBUG */ /* Clear any elements in data block page to fill value */ @@ -222,7 +222,7 @@ H5FA__dblk_page_protect(H5FA_hdr_t *hdr, haddr_t dblk_page_addr, size_t dblk_pag FUNC_ENTER_PACKAGE #ifdef H5FA_DEBUG - HDfprintf(stderr, "%s: Called\n", __func__); + fprintf(stderr, "%s: Called\n", __func__); #endif /* H5FA_DEBUG */ /* Sanity check */ @@ -292,7 +292,7 @@ H5FA__dblk_page_unprotect(H5FA_dblk_page_t *dblk_page, unsigned cache_flags) FUNC_ENTER_PACKAGE #ifdef H5FA_DEBUG - HDfprintf(stderr, "%s: Called\n", __func__); + fprintf(stderr, "%s: Called\n", __func__); #endif /* H5FA_DEBUG */ /* Sanity check */ diff --git a/src/H5FAstat.c b/src/H5FAstat.c index a052b79..9603648 100644 --- a/src/H5FAstat.c +++ b/src/H5FAstat.c @@ -83,7 +83,7 @@ H5FA_get_stats(const H5FA_t *fa, H5FA_stat_t *stats) FUNC_ENTER_NOAPI_NOERR #ifdef H5FA_DEBUG - HDfprintf(stderr, "%s: Called\n", __func__); + fprintf(stderr, "%s: Called\n", __func__); #endif /* H5FA_DEBUG */ /* Check arguments */ diff --git a/src/H5FAtest.c b/src/H5FAtest.c index bf723a2..2758d39 100644 --- a/src/H5FAtest.c +++ b/src/H5FAtest.c @@ -303,8 +303,8 @@ H5FA__test_debug(FILE *stream, int indent, int fwidth, hsize_t idx, const void * /* Print element */ HDsnprintf(temp_str, sizeof(temp_str), "Element #%llu:", (unsigned long long)idx); - HDfprintf(stream, "%*s%-*s %llu\n", indent, "", fwidth, temp_str, - (unsigned long long)*(const uint64_t *)elmt); + fprintf(stream, "%*s%-*s %llu\n", indent, "", fwidth, temp_str, + (unsigned long long)*(const uint64_t *)elmt); FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5FA__test_debug() */ diff --git a/src/H5FDhdfs.c b/src/H5FDhdfs.c index b461bd4..00b9b92 100644 --- a/src/H5FDhdfs.c +++ b/src/H5FDhdfs.c @@ -347,7 +347,7 @@ H5FD_hdfs_init(void) FUNC_ENTER_NOAPI(H5I_INVALID_HID) #if HDFS_DEBUG - HDfprintf(stdout, "called %s.\n", __func__); + fprintf(stdout, "called %s.\n", __func__); #endif if (H5I_VFL != H5I_get_type(H5FD_HDFS_g)) @@ -388,7 +388,7 @@ H5FD__hdfs_term(void) FUNC_ENTER_PACKAGE_NOERR #if HDFS_DEBUG - HDfprintf(stdout, "called %s.\n", __func__); + fprintf(stdout, "called %s.\n", __func__); #endif /* Reset VFL ID */ @@ -422,7 +422,7 @@ H5FD__hdfs_handle_open(const char *path, const char *namenode_name, const int32_ FUNC_ENTER_PACKAGE #if HDFS_DEBUG - HDfprintf(stdout, "called %s.\n", __func__); + fprintf(stdout, "called %s.\n", __func__); #endif if (path == NULL || path[0] == '\0') @@ -507,7 +507,7 @@ H5FD__hdfs_handle_close(hdfs_t *handle) FUNC_ENTER_PACKAGE #if HDFS_DEBUG - HDfprintf(stdout, "called %s.\n", __func__); + fprintf(stdout, "called %s.\n", __func__); #endif if (handle == NULL) @@ -598,7 +598,7 @@ H5Pset_fapl_hdfs(hid_t fapl_id, H5FD_hdfs_fapl_t *fa) assert(fa != NULL); #if HDFS_DEBUG - HDfprintf(stdout, "called %s.\n", __func__); + fprintf(stdout, "called %s.\n", __func__); #endif plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS); @@ -639,7 +639,7 @@ H5Pget_fapl_hdfs(hid_t fapl_id, H5FD_hdfs_fapl_t *fa_dst /*out*/) H5TRACE2("e", "ix", fapl_id, fa_dst); #if HDFS_DEBUG - HDfprintf(stdout, "called %s.\n", __func__); + fprintf(stdout, "called %s.\n", __func__); #endif if (fa_dst == NULL) @@ -796,7 +796,7 @@ hdfs__reset_stats(H5FD_hdfs_t *file) FUNC_ENTER_PACKAGE #if HDFS_DEBUG - HDfprintf(stdout, "called %s.\n", __func__); + fprintf(stdout, "called %s.\n", __func__); #endif if (file == NULL) @@ -854,7 +854,7 @@ H5FD__hdfs_open(const char *path, unsigned flags, hid_t fapl_id, haddr_t maxaddr FUNC_ENTER_PACKAGE #if HDFS_DEBUG - HDfprintf(stdout, "called %s.\n", __func__); + fprintf(stdout, "called %s.\n", __func__); #endif /* HDFS_DEBUG */ /* Sanity check on file offsets */ @@ -1025,10 +1025,10 @@ hdfs__fprint_stats(FILE *stream, const H5FD_hdfs_t *file) * PRINT OVERVIEW * ******************/ - HDfprintf(stream, "TOTAL READS: %llu (%llu meta, %llu raw)\n", count_raw + count_meta, count_meta, - count_raw); - HDfprintf(stream, "TOTAL BYTES: %llu (%llu meta, %llu raw)\n", bytes_raw + bytes_meta, bytes_meta, - bytes_raw); + fprintf(stream, "TOTAL READS: %llu (%llu meta, %llu raw)\n", count_raw + count_meta, count_meta, + count_raw); + fprintf(stream, "TOTAL BYTES: %llu (%llu meta, %llu raw)\n", bytes_raw + bytes_meta, bytes_meta, + bytes_raw); if (count_raw + count_meta == 0) goto done; @@ -1037,60 +1037,60 @@ hdfs__fprint_stats(FILE *stream, const H5FD_hdfs_t *file) * PRINT AGGREGATE STATS * *************************/ - HDfprintf(stream, "SIZES meta raw\n"); - HDfprintf(stream, " min "); + fprintf(stream, "SIZES meta raw\n"); + fprintf(stream, " min "); if (count_meta == 0) - HDfprintf(stream, " 0.000 "); + fprintf(stream, " 0.000 "); else { re_dub = (double)min_meta; for (suffix_i = 0; re_dub >= 1024.0; suffix_i++) re_dub /= 1024.0; assert(suffix_i < sizeof(suffixes)); - HDfprintf(stream, "%8.3lf%c ", re_dub, suffixes[suffix_i]); + fprintf(stream, "%8.3lf%c ", re_dub, suffixes[suffix_i]); } if (count_raw == 0) - HDfprintf(stream, " 0.000 \n"); + fprintf(stream, " 0.000 \n"); else { re_dub = (double)min_raw; for (suffix_i = 0; re_dub >= 1024.0; suffix_i++) re_dub /= 1024.0; assert(suffix_i < sizeof(suffixes)); - HDfprintf(stream, "%8.3lf%c\n", re_dub, suffixes[suffix_i]); + fprintf(stream, "%8.3lf%c\n", re_dub, suffixes[suffix_i]); } - HDfprintf(stream, " avg "); + fprintf(stream, " avg "); re_dub = (double)average_meta; for (suffix_i = 0; re_dub >= 1024.0; suffix_i++) re_dub /= 1024.0; assert(suffix_i < sizeof(suffixes)); - HDfprintf(stream, "%8.3lf%c ", re_dub, suffixes[suffix_i]); + fprintf(stream, "%8.3lf%c ", re_dub, suffixes[suffix_i]); re_dub = (double)average_raw; for (suffix_i = 0; re_dub >= 1024.0; suffix_i++) re_dub /= 1024.0; assert(suffix_i < sizeof(suffixes)); - HDfprintf(stream, "%8.3lf%c\n", re_dub, suffixes[suffix_i]); + fprintf(stream, "%8.3lf%c\n", re_dub, suffixes[suffix_i]); - HDfprintf(stream, " max "); + fprintf(stream, " max "); re_dub = (double)max_meta; for (suffix_i = 0; re_dub >= 1024.0; suffix_i++) re_dub /= 1024.0; assert(suffix_i < sizeof(suffixes)); - HDfprintf(stream, "%8.3lf%c ", re_dub, suffixes[suffix_i]); + fprintf(stream, "%8.3lf%c ", re_dub, suffixes[suffix_i]); re_dub = (double)max_raw; for (suffix_i = 0; re_dub >= 1024.0; suffix_i++) re_dub /= 1024.0; assert(suffix_i < sizeof(suffixes)); - HDfprintf(stream, "%8.3lf%c\n", re_dub, suffixes[suffix_i]); + fprintf(stream, "%8.3lf%c\n", re_dub, suffixes[suffix_i]); /****************************** * PRINT INDIVIDUAL BIN STATS * ******************************/ - HDfprintf(stream, "BINS # of reads total bytes average size\n"); - HDfprintf(stream, " up-to meta raw meta raw meta raw\n"); + fprintf(stream, "BINS # of reads total bytes average size\n"); + fprintf(stream, " up-to meta raw meta raw meta raw\n"); for (i = 0; i <= HDFS_STATS_BIN_COUNT; i++) { const hdfs_statsbin *m; @@ -1114,10 +1114,10 @@ hdfs__fprint_stats(FILE *stream, const H5FD_hdfs_t *file) if (i == HDFS_STATS_BIN_COUNT) { range_end = hdfs_stats_boundaries[i - 1]; - HDfprintf(stream, ">"); + fprintf(stream, ">"); } else - HDfprintf(stream, " "); + fprintf(stream, " "); bm_val = (double)m->bytes; for (suffix_i = 0; bm_val >= 1024.0; suffix_i++) @@ -1150,14 +1150,14 @@ hdfs__fprint_stats(FILE *stream, const H5FD_hdfs_t *file) re_dub /= 1024.0; assert(suffix_i < sizeof(suffixes)); - HDfprintf(stream, " %8.3f%c %7d %7d %8.3f%c %8.3f%c %8.3f%c %8.3f%c\n", re_dub, - suffixes[suffix_i], /* bin ceiling */ - m->count, /* metadata reads */ - r->count, /* raw data reads */ - bm_val, bm_suffix, /* metadata bytes */ - br_val, br_suffix, /* raw data bytes */ - am_val, am_suffix, /* metadata average */ - ar_val, ar_suffix); /* raw data average */ + fprintf(stream, " %8.3f%c %7d %7d %8.3f%c %8.3f%c %8.3f%c %8.3f%c\n", re_dub, + suffixes[suffix_i], /* bin ceiling */ + m->count, /* metadata reads */ + r->count, /* raw data reads */ + bm_val, bm_suffix, /* metadata bytes */ + br_val, br_suffix, /* raw data bytes */ + am_val, am_suffix, /* metadata average */ + ar_val, ar_suffix); /* raw data average */ HDfflush(stream); } @@ -1192,7 +1192,7 @@ H5FD__hdfs_close(H5FD_t *_file) FUNC_ENTER_PACKAGE #if HDFS_DEBUG - HDfprintf(stdout, "called %s.\n", __func__); + fprintf(stdout, "called %s.\n", __func__); #endif /* Sanity checks */ @@ -1248,7 +1248,7 @@ H5FD__hdfs_cmp(const H5FD_t *_f1, const H5FD_t *_f2) FUNC_ENTER_PACKAGE_NOERR #if HDFS_DEBUG - HDfprintf(stdout, "called %s.\n", __func__); + fprintf(stdout, "called %s.\n", __func__); #endif /* HDFS_DEBUG */ assert(f1->hdfs_handle != NULL); @@ -1321,7 +1321,7 @@ H5FD__hdfs_query(const H5FD_t H5_ATTR_UNUSED *_file, unsigned long *flags) FUNC_ENTER_PACKAGE_NOERR #if HDFS_DEBUG - HDfprintf(stdout, "called %s.\n", __func__); + fprintf(stdout, "called %s.\n", __func__); #endif if (flags) { @@ -1359,7 +1359,7 @@ H5FD__hdfs_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type) FUNC_ENTER_PACKAGE_NOERR #if HDFS_DEBUG - HDfprintf(stdout, "called %s.\n", __func__); + fprintf(stdout, "called %s.\n", __func__); #endif FUNC_LEAVE_NOAPI(file->eoa) @@ -1390,7 +1390,7 @@ H5FD__hdfs_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr) FUNC_ENTER_PACKAGE_NOERR #if HDFS_DEBUG - HDfprintf(stdout, "called %s.\n", __func__); + fprintf(stdout, "called %s.\n", __func__); #endif file->eoa = addr; @@ -1424,7 +1424,7 @@ H5FD__hdfs_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type) FUNC_ENTER_PACKAGE_NOERR #if HDFS_DEBUG - HDfprintf(stdout, "called %s.\n", __func__); + fprintf(stdout, "called %s.\n", __func__); #endif assert(file->hdfs_handle != NULL); @@ -1459,7 +1459,7 @@ H5FD__hdfs_get_handle(H5FD_t *_file, hid_t H5_ATTR_UNUSED fapl, void **file_hand FUNC_ENTER_PACKAGE #if HDFS_DEBUG - HDfprintf(stdout, "called %s.\n", __func__); + fprintf(stdout, "called %s.\n", __func__); #endif /* HDFS_DEBUG */ if (!file_handle) @@ -1509,7 +1509,7 @@ H5FD__hdfs_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU FUNC_ENTER_PACKAGE #if HDFS_DEBUG - HDfprintf(stdout, "called %s.\n", __func__); + fprintf(stdout, "called %s.\n", __func__); #endif /* HDFS_DEBUG */ assert(file != NULL); @@ -1581,7 +1581,7 @@ H5FD__hdfs_write(H5FD_t H5_ATTR_UNUSED *_file, H5FD_mem_t H5_ATTR_UNUSED type, h FUNC_ENTER_PACKAGE #if HDFS_DEBUG - HDfprintf(stdout, "called %s.\n", __func__); + fprintf(stdout, "called %s.\n", __func__); #endif HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, FAIL, "cannot write to read-only file") @@ -1619,7 +1619,7 @@ H5FD__hdfs_truncate(H5FD_t H5_ATTR_UNUSED *_file, hid_t H5_ATTR_UNUSED dxpl_id, FUNC_ENTER_PACKAGE #if HDFS_DEBUG - HDfprintf(stdout, "called %s.\n", __func__); + fprintf(stdout, "called %s.\n", __func__); #endif HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, FAIL, "cannot truncate read-only file") diff --git a/src/H5FDlog.c b/src/H5FDlog.c index e7bde20..6dc76cb 100644 --- a/src/H5FDlog.c +++ b/src/H5FDlog.c @@ -608,13 +608,13 @@ H5FD__log_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr) H5_timevals_t open_times; /* Elapsed time for open() call */ H5_timer_get_times(open_timer, &open_times); - HDfprintf(file->logfp, "Open took: (%f s)\n", open_times.elapsed); + fprintf(file->logfp, "Open took: (%f s)\n", open_times.elapsed); } if (file->fa.flags & H5FD_LOG_TIME_STAT) { H5_timevals_t stat_times; /* Elapsed time for stat() call */ H5_timer_get_times(stat_timer, &stat_times); - HDfprintf(file->logfp, "Stat took: (%f s)\n", stat_times.elapsed); + fprintf(file->logfp, "Stat took: (%f s)\n", stat_times.elapsed); } } @@ -704,89 +704,89 @@ H5FD__log_close(H5FD_t *_file) H5_timevals_t close_times; /* Elapsed time for close() call */ H5_timer_get_times(close_timer, &close_times); - HDfprintf(file->logfp, "Close took: (%f s)\n", close_times.elapsed); + fprintf(file->logfp, "Close took: (%f s)\n", close_times.elapsed); } /* Dump the total number of seek/read/write operations */ if (file->fa.flags & H5FD_LOG_NUM_READ) - HDfprintf(file->logfp, "Total number of read operations: %llu\n", file->total_read_ops); + fprintf(file->logfp, "Total number of read operations: %llu\n", file->total_read_ops); if (file->fa.flags & H5FD_LOG_NUM_WRITE) - HDfprintf(file->logfp, "Total number of write operations: %llu\n", file->total_write_ops); + fprintf(file->logfp, "Total number of write operations: %llu\n", file->total_write_ops); if (file->fa.flags & H5FD_LOG_NUM_SEEK) - HDfprintf(file->logfp, "Total number of seek operations: %llu\n", file->total_seek_ops); + fprintf(file->logfp, "Total number of seek operations: %llu\n", file->total_seek_ops); if (file->fa.flags & H5FD_LOG_NUM_TRUNCATE) - HDfprintf(file->logfp, "Total number of truncate operations: %llu\n", file->total_truncate_ops); + fprintf(file->logfp, "Total number of truncate operations: %llu\n", file->total_truncate_ops); /* Dump the total time in seek/read/write */ if (file->fa.flags & H5FD_LOG_TIME_READ) - HDfprintf(file->logfp, "Total time in read operations: %f s\n", file->total_read_time); + fprintf(file->logfp, "Total time in read operations: %f s\n", file->total_read_time); if (file->fa.flags & H5FD_LOG_TIME_WRITE) - HDfprintf(file->logfp, "Total time in write operations: %f s\n", file->total_write_time); + fprintf(file->logfp, "Total time in write operations: %f s\n", file->total_write_time); if (file->fa.flags & H5FD_LOG_TIME_SEEK) - HDfprintf(file->logfp, "Total time in seek operations: %f s\n", file->total_seek_time); + fprintf(file->logfp, "Total time in seek operations: %f s\n", file->total_seek_time); if (file->fa.flags & H5FD_LOG_TIME_TRUNCATE) - HDfprintf(file->logfp, "Total time in truncate operations: %f s\n", file->total_truncate_time); + fprintf(file->logfp, "Total time in truncate operations: %f s\n", file->total_truncate_time); /* Dump the write I/O information */ if (file->fa.flags & H5FD_LOG_FILE_WRITE) { - HDfprintf(file->logfp, "Dumping write I/O information:\n"); + fprintf(file->logfp, "Dumping write I/O information:\n"); last_val = file->nwrite[0]; last_addr = 0; addr = 1; while (addr < file->eoa) { if (file->nwrite[addr] != last_val) { - HDfprintf(file->logfp, - "\tAddr %10" PRIuHADDR "-%10" PRIuHADDR " (%10lu bytes) written to %3d times\n", - last_addr, (addr - 1), (unsigned long)(addr - last_addr), (int)last_val); + fprintf(file->logfp, + "\tAddr %10" PRIuHADDR "-%10" PRIuHADDR " (%10lu bytes) written to %3d times\n", + last_addr, (addr - 1), (unsigned long)(addr - last_addr), (int)last_val); last_val = file->nwrite[addr]; last_addr = addr; } addr++; } - HDfprintf(file->logfp, - "\tAddr %10" PRIuHADDR "-%10" PRIuHADDR " (%10lu bytes) written to %3d times\n", - last_addr, (addr - 1), (unsigned long)(addr - last_addr), (int)last_val); + fprintf(file->logfp, + "\tAddr %10" PRIuHADDR "-%10" PRIuHADDR " (%10lu bytes) written to %3d times\n", + last_addr, (addr - 1), (unsigned long)(addr - last_addr), (int)last_val); } /* Dump the read I/O information */ if (file->fa.flags & H5FD_LOG_FILE_READ) { - HDfprintf(file->logfp, "Dumping read I/O information:\n"); + fprintf(file->logfp, "Dumping read I/O information:\n"); last_val = file->nread[0]; last_addr = 0; addr = 1; while (addr < file->eoa) { if (file->nread[addr] != last_val) { - HDfprintf(file->logfp, - "\tAddr %10" PRIuHADDR "-%10" PRIuHADDR " (%10lu bytes) read from %3d times\n", - last_addr, (addr - 1), (unsigned long)(addr - last_addr), (int)last_val); + fprintf(file->logfp, + "\tAddr %10" PRIuHADDR "-%10" PRIuHADDR " (%10lu bytes) read from %3d times\n", + last_addr, (addr - 1), (unsigned long)(addr - last_addr), (int)last_val); last_val = file->nread[addr]; last_addr = addr; } addr++; } - HDfprintf(file->logfp, - "\tAddr %10" PRIuHADDR "-%10" PRIuHADDR " (%10lu bytes) read from %3d times\n", - last_addr, (addr - 1), (unsigned long)(addr - last_addr), (int)last_val); + fprintf(file->logfp, + "\tAddr %10" PRIuHADDR "-%10" PRIuHADDR " (%10lu bytes) read from %3d times\n", last_addr, + (addr - 1), (unsigned long)(addr - last_addr), (int)last_val); } /* Dump the I/O flavor information */ if (file->fa.flags & H5FD_LOG_FLAVOR) { - HDfprintf(file->logfp, "Dumping I/O flavor information:\n"); + fprintf(file->logfp, "Dumping I/O flavor information:\n"); last_val = file->flavor[0]; last_addr = 0; addr = 1; while (addr < file->eoa) { if (file->flavor[addr] != last_val) { - HDfprintf(file->logfp, - "\tAddr %10" PRIuHADDR "-%10" PRIuHADDR " (%10lu bytes) flavor is %s\n", - last_addr, (addr - 1), (unsigned long)(addr - last_addr), flavors[last_val]); + fprintf(file->logfp, + "\tAddr %10" PRIuHADDR "-%10" PRIuHADDR " (%10lu bytes) flavor is %s\n", + last_addr, (addr - 1), (unsigned long)(addr - last_addr), flavors[last_val]); last_val = file->flavor[addr]; last_addr = addr; } addr++; } - HDfprintf(file->logfp, "\tAddr %10" PRIuHADDR "-%10" PRIuHADDR " (%10lu bytes) flavor is %s\n", - last_addr, (addr - 1), (unsigned long)(addr - last_addr), flavors[last_val]); + fprintf(file->logfp, "\tAddr %10" PRIuHADDR "-%10" PRIuHADDR " (%10lu bytes) flavor is %s\n", + last_addr, (addr - 1), (unsigned long)(addr - last_addr), flavors[last_val]); } /* Free the logging information */ @@ -956,9 +956,9 @@ H5FD__log_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, hs } if (file->fa.flags & H5FD_LOG_ALLOC) - HDfprintf(file->logfp, - "%10" PRIuHADDR "-%10" PRIuHADDR " (%10" PRIuHSIZE " bytes) (%s) Allocated\n", addr, - (haddr_t)((addr + size) - 1), size, flavors[type]); + fprintf(file->logfp, + "%10" PRIuHADDR "-%10" PRIuHADDR " (%10" PRIuHSIZE " bytes) (%s) Allocated\n", addr, + (haddr_t)((addr + size) - 1), size, flavors[type]); } /* Set return value */ @@ -996,8 +996,8 @@ H5FD__log_free(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, had /* Log the file memory freed */ if (file->fa.flags & H5FD_LOG_FREE) - HDfprintf(file->logfp, "%10" PRIuHADDR "-%10" PRIuHADDR " (%10" PRIuHSIZE " bytes) (%s) Freed\n", - addr, (haddr_t)((addr + size) - 1), size, flavors[type]); + fprintf(file->logfp, "%10" PRIuHADDR "-%10" PRIuHADDR " (%10" PRIuHSIZE " bytes) (%s) Freed\n", + addr, (haddr_t)((addr + size) - 1), size, flavors[type]); } FUNC_LEAVE_NOAPI(SUCCEED) @@ -1063,9 +1063,9 @@ H5FD__log_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr) /* Log the extension like an allocation */ if (file->fa.flags & H5FD_LOG_ALLOC) - HDfprintf(file->logfp, - "%10" PRIuHADDR "-%10" PRIuHADDR " (%10" PRIuHSIZE " bytes) (%s) Allocated\n", - file->eoa, addr, size, flavors[type]); + fprintf(file->logfp, + "%10" PRIuHADDR "-%10" PRIuHADDR " (%10" PRIuHSIZE " bytes) (%s) Allocated\n", + file->eoa, addr, size, flavors[type]); } /* Check for decreasing file size */ @@ -1081,9 +1081,9 @@ H5FD__log_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr) /* Log the shrink like a free */ if (file->fa.flags & H5FD_LOG_FREE) - HDfprintf(file->logfp, - "%10" PRIuHADDR "-%10" PRIuHADDR " (%10" PRIuHSIZE " bytes) (%s) Freed\n", - file->eoa, addr, size, flavors[type]); + fprintf(file->logfp, + "%10" PRIuHADDR "-%10" PRIuHADDR " (%10" PRIuHSIZE " bytes) (%s) Freed\n", file->eoa, + addr, size, flavors[type]); } } @@ -1235,16 +1235,16 @@ H5FD__log_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, had /* Emit log string if we're tracking individual seek events. */ if (file->fa.flags & H5FD_LOG_LOC_SEEK) { - HDfprintf(file->logfp, "Seek: From %10" PRIuHADDR " To %10" PRIuHADDR, file->pos, addr); + fprintf(file->logfp, "Seek: From %10" PRIuHADDR " To %10" PRIuHADDR, file->pos, addr); /* Add the seek time, if we're tracking that. * Note that the seek time is NOT emitted for when just H5FD_LOG_TIME_SEEK * is set. */ if (file->fa.flags & H5FD_LOG_TIME_SEEK) - HDfprintf(file->logfp, " (%fs @ %f)\n", seek_times.elapsed, seek_timer.initial.elapsed); + fprintf(file->logfp, " (%fs @ %f)\n", seek_times.elapsed, seek_timer.initial.elapsed); else - HDfprintf(file->logfp, "\n"); + fprintf(file->logfp, "\n"); } } #endif /* H5_HAVE_PREADWRITE */ @@ -1286,8 +1286,8 @@ H5FD__log_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, had offset = HDlseek(file->fd, (HDoff_t)0, SEEK_CUR); if (file->fa.flags & H5FD_LOG_LOC_READ) - HDfprintf(file->logfp, "Error! Reading: %10" PRIuHADDR "-%10" PRIuHADDR " (%10zu bytes)\n", - orig_addr, (orig_addr + orig_size) - 1, orig_size); + fprintf(file->logfp, "Error! Reading: %10" PRIuHADDR "-%10" PRIuHADDR " (%10zu bytes)\n", + orig_addr, (orig_addr + orig_size) - 1, orig_size); HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "file read failed: time = %s, filename = '%s', file descriptor = %d, errno = %d, " @@ -1328,8 +1328,8 @@ H5FD__log_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, had /* Log information about the read */ if (file->fa.flags & H5FD_LOG_LOC_READ) { - HDfprintf(file->logfp, "%10" PRIuHADDR "-%10" PRIuHADDR " (%10zu bytes) (%s) Read", orig_addr, - (orig_addr + orig_size) - 1, orig_size, flavors[type]); + fprintf(file->logfp, "%10" PRIuHADDR "-%10" PRIuHADDR " (%10zu bytes) (%s) Read", orig_addr, + (orig_addr + orig_size) - 1, orig_size, flavors[type]); /* Verify that we are reading in the type of data we allocated in this location */ if (file->flavor) { @@ -1345,9 +1345,9 @@ H5FD__log_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, had * is set. */ if (file->fa.flags & H5FD_LOG_TIME_READ) - HDfprintf(file->logfp, " (%fs @ %f)\n", read_times.elapsed, read_timer.initial.elapsed); + fprintf(file->logfp, " (%fs @ %f)\n", read_times.elapsed, read_timer.initial.elapsed); else - HDfprintf(file->logfp, "\n"); + fprintf(file->logfp, "\n"); } /* Update current position */ @@ -1457,16 +1457,16 @@ H5FD__log_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, ha /* Emit log string if we're tracking individual seek events. */ if (file->fa.flags & H5FD_LOG_LOC_SEEK) { - HDfprintf(file->logfp, "Seek: From %10" PRIuHADDR " To %10" PRIuHADDR, file->pos, addr); + fprintf(file->logfp, "Seek: From %10" PRIuHADDR " To %10" PRIuHADDR, file->pos, addr); /* Add the seek time, if we're tracking that. * Note that the seek time is NOT emitted for when just H5FD_LOG_TIME_SEEK * is set. */ if (file->fa.flags & H5FD_LOG_TIME_SEEK) - HDfprintf(file->logfp, " (%fs @ %f)\n", seek_times.elapsed, seek_timer.initial.elapsed); + fprintf(file->logfp, " (%fs @ %f)\n", seek_times.elapsed, seek_timer.initial.elapsed); else - HDfprintf(file->logfp, "\n"); + fprintf(file->logfp, "\n"); } } #endif /* H5_HAVE_PREADWRITE */ @@ -1508,8 +1508,8 @@ H5FD__log_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, ha offset = HDlseek(file->fd, (HDoff_t)0, SEEK_CUR); if (file->fa.flags & H5FD_LOG_LOC_WRITE) - HDfprintf(file->logfp, "Error! Writing: %10" PRIuHADDR "-%10" PRIuHADDR " (%10zu bytes)\n", - orig_addr, (orig_addr + orig_size) - 1, orig_size); + fprintf(file->logfp, "Error! Writing: %10" PRIuHADDR "-%10" PRIuHADDR " (%10zu bytes)\n", + orig_addr, (orig_addr + orig_size) - 1, orig_size); HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed: time = %s, filename = '%s', file descriptor = %d, errno = %d, " @@ -1544,15 +1544,15 @@ H5FD__log_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, ha /* Log information about the write */ if (file->fa.flags & H5FD_LOG_LOC_WRITE) { - HDfprintf(file->logfp, "%10" PRIuHADDR "-%10" PRIuHADDR " (%10zu bytes) (%s) Written", orig_addr, - (orig_addr + orig_size) - 1, orig_size, flavors[type]); + fprintf(file->logfp, "%10" PRIuHADDR "-%10" PRIuHADDR " (%10zu bytes) (%s) Written", orig_addr, + (orig_addr + orig_size) - 1, orig_size, flavors[type]); /* Check if this is the first write into a "default" section, grabbed by the metadata aggregation * algorithm */ if (file->fa.flags & H5FD_LOG_FLAVOR) { if ((H5FD_mem_t)file->flavor[orig_addr] == H5FD_MEM_DEFAULT) { HDmemset(&file->flavor[orig_addr], (int)type, orig_size); - HDfprintf(file->logfp, " (fresh)"); + fprintf(file->logfp, " (fresh)"); } } @@ -1561,9 +1561,9 @@ H5FD__log_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, ha * is set. */ if (file->fa.flags & H5FD_LOG_TIME_WRITE) - HDfprintf(file->logfp, " (%fs @ %f)\n", write_times.elapsed, write_timer.initial.elapsed); + fprintf(file->logfp, " (%fs @ %f)\n", write_times.elapsed, write_timer.initial.elapsed); else - HDfprintf(file->logfp, "\n"); + fprintf(file->logfp, "\n"); } /* Update current position and eof */ @@ -1666,16 +1666,16 @@ H5FD__log_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_ /* Emit log string if we're tracking individual truncate events. */ if (file->fa.flags & H5FD_LOG_TRUNCATE) { - HDfprintf(file->logfp, "Truncate: To %10" PRIuHADDR, file->eoa); + fprintf(file->logfp, "Truncate: To %10" PRIuHADDR, file->eoa); /* Add the truncate time, if we're tracking that. * Note that the truncate time is NOT emitted for when just H5FD_LOG_TIME_TRUNCATE * is set. */ if (file->fa.flags & H5FD_LOG_TIME_TRUNCATE) - HDfprintf(file->logfp, " (%fs @ %f)\n", trunc_times.elapsed, trunc_timer.initial.elapsed); + fprintf(file->logfp, " (%fs @ %f)\n", trunc_times.elapsed, trunc_timer.initial.elapsed); else - HDfprintf(file->logfp, "\n"); + fprintf(file->logfp, "\n"); } /* Update the eof value */ diff --git a/src/H5FDmirror.c b/src/H5FDmirror.c index 25992e8..b6997e4 100644 --- a/src/H5FDmirror.c +++ b/src/H5FDmirror.c @@ -81,47 +81,47 @@ typedef struct H5FD_mirror_t { ssize_t bytes_written = 0; \ const unsigned char *b = NULL; \ \ - HDfprintf(stdout, "%s bytes:\n```\n", (label)); \ + fprintf(stdout, "%s bytes:\n```\n", (label)); \ \ /* print whole lines */ \ while ((len - bytes_written) >= 32) { \ b = (const unsigned char *)(buf) + bytes_written; \ - HDfprintf(stdout, \ - "%04zX %02X%02X%02X%02X %02X%02X%02X%02X" \ - " %02X%02X%02X%02X %02X%02X%02X%02X" \ - " %02X%02X%02X%02X %02X%02X%02X%02X" \ - " %02X%02X%02X%02X %02X%02X%02X%02X\n", \ - bytes_written, b[0], b[1], b[2], b[3], b[4], b[5], b[6], b[7], b[8], b[9], b[10], \ - b[11], b[12], b[13], b[14], b[15], b[16], b[17], b[18], b[19], b[20], b[21], b[22], \ - b[23], b[24], b[25], b[26], b[27], b[28], b[29], b[30], b[31]); \ + fprintf(stdout, \ + "%04zX %02X%02X%02X%02X %02X%02X%02X%02X" \ + " %02X%02X%02X%02X %02X%02X%02X%02X" \ + " %02X%02X%02X%02X %02X%02X%02X%02X" \ + " %02X%02X%02X%02X %02X%02X%02X%02X\n", \ + bytes_written, b[0], b[1], b[2], b[3], b[4], b[5], b[6], b[7], b[8], b[9], b[10], b[11], \ + b[12], b[13], b[14], b[15], b[16], b[17], b[18], b[19], b[20], b[21], b[22], b[23], \ + b[24], b[25], b[26], b[27], b[28], b[29], b[30], b[31]); \ bytes_written += 32; \ } \ \ /* start partial line */ \ if (len > bytes_written) { \ - HDfprintf(stdout, "%04zX ", bytes_written); \ + fprintf(stdout, "%04zX ", bytes_written); \ } \ \ /* partial line blocks */ \ while ((len - bytes_written) >= 4) { \ - HDfprintf(stdout, " %02X%02X%02X%02X", (buf)[bytes_written], (buf)[bytes_written + 1], \ - (buf)[bytes_written + 2], (buf)[bytes_written + 3]); \ + fprintf(stdout, " %02X%02X%02X%02X", (buf)[bytes_written], (buf)[bytes_written + 1], \ + (buf)[bytes_written + 2], (buf)[bytes_written + 3]); \ bytes_written += 4; \ } \ \ /* block separator before partial block */ \ if (len > bytes_written) { \ - HDfprintf(stdout, " "); \ + fprintf(stdout, " "); \ } \ \ /* partial block individual bytes */ \ while (len > bytes_written) { \ - HDfprintf(stdout, "%02X", (buf)[bytes_written++]); \ + fprintf(stdout, "%02X", (buf)[bytes_written++]); \ } \ \ /* end partial line */ \ - HDfprintf(stdout, "\n"); \ - HDfprintf(stdout, "```\n"); \ + fprintf(stdout, "\n"); \ + fprintf(stdout, "```\n"); \ HDfflush(stdout); \ } while (0) #else @@ -131,7 +131,7 @@ typedef struct H5FD_mirror_t { #if MIRROR_DEBUG_OP_CALLS #define LOG_OP_CALL(name) \ do { \ - HDprintf("called %s()\n", (name)); \ + printf("called %s()\n", (name)); \ HDfflush(stdout); \ } while (0) #else diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c index 46fc971..47375df 100644 --- a/src/H5FDmpio.c +++ b/src/H5FDmpio.c @@ -750,7 +750,7 @@ H5FD_set_mpio_atomicity(H5FD_t *_file, hbool_t flag) #ifdef H5FDmpio_DEBUG if (H5FD_mpio_debug_t_flag) - HDfprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank); + fprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank); #endif /* set atomicity value */ @@ -760,7 +760,7 @@ H5FD_set_mpio_atomicity(H5FD_t *_file, hbool_t flag) done: #ifdef H5FDmpio_DEBUG if (H5FD_mpio_debug_t_flag) - HDfprintf(stderr, "%s: (%d) Leaving\n", __func__, file->mpi_rank); + fprintf(stderr, "%s: (%d) Leaving\n", __func__, file->mpi_rank); #endif FUNC_LEAVE_NOAPI(ret_value) @@ -793,7 +793,7 @@ H5FD_get_mpio_atomicity(H5FD_t *_file, hbool_t *flag) #ifdef H5FDmpio_DEBUG if (H5FD_mpio_debug_t_flag) - HDfprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank); + fprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank); #endif /* Get atomicity value */ @@ -808,7 +808,7 @@ H5FD_get_mpio_atomicity(H5FD_t *_file, hbool_t *flag) done: #ifdef H5FDmpio_DEBUG if (H5FD_mpio_debug_t_flag) - HDfprintf(stderr, "%s: (%d) Leaving\n", __func__, file->mpi_rank); + fprintf(stderr, "%s: (%d) Leaving\n", __func__, file->mpi_rank); #endif FUNC_LEAVE_NOAPI(ret_value) @@ -879,8 +879,8 @@ H5FD__mpio_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t H5_ATTR H5FD_mpio_debug_t_flag = (H5FD_mpio_debug_flags_s[(int)'t'] && (H5FD_mpio_debug_rank_s < 0 || H5FD_mpio_debug_rank_s == mpi_rank)); if (H5FD_mpio_debug_t_flag) - HDfprintf(stderr, "%s: (%d) Entering - name = \"%s\", flags = 0x%x, fapl_id = %d, maxaddr = %lu\n", - __func__, mpi_rank, name, flags, (int)fapl_id, (unsigned long)maxaddr); + fprintf(stderr, "%s: (%d) Entering - name = \"%s\", flags = 0x%x, fapl_id = %d, maxaddr = %lu\n", + __func__, mpi_rank, name, flags, (int)fapl_id, (unsigned long)maxaddr); #endif /* Convert HDF5 flags to MPI-IO flags */ @@ -1017,7 +1017,7 @@ done: #ifdef H5FDmpio_DEBUG if (H5FD_mpio_debug_t_flag) - HDfprintf(stderr, "%s: (%d) Leaving\n", __func__, mpi_rank); + fprintf(stderr, "%s: (%d) Leaving\n", __func__, mpi_rank); #endif FUNC_LEAVE_NOAPI(ret_value) @@ -1050,7 +1050,7 @@ H5FD__mpio_close(H5FD_t *_file) #ifdef H5FDmpio_DEBUG if (H5FD_mpio_debug_t_flag) - HDfprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank); + fprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank); #endif /* Sanity checks */ @@ -1069,7 +1069,7 @@ H5FD__mpio_close(H5FD_t *_file) done: #ifdef H5FDmpio_DEBUG if (H5FD_mpio_debug_t_flag) - HDfprintf(stderr, "%s: (%d) Leaving\n", __func__, mpi_rank); + fprintf(stderr, "%s: (%d) Leaving\n", __func__, mpi_rank); #endif FUNC_LEAVE_NOAPI(ret_value) @@ -1289,7 +1289,7 @@ H5FD__mpio_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU #ifdef H5FDmpio_DEBUG if (H5FD_mpio_debug_t_flag) - HDfprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank); + fprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank); #endif /* Sanity checks */ @@ -1349,7 +1349,7 @@ H5FD__mpio_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU #ifdef H5FDmpio_DEBUG if (H5FD_mpio_debug_r_flag) - HDfprintf(stderr, "%s: (%d) using MPIO collective mode\n", __func__, file->mpi_rank); + fprintf(stderr, "%s: (%d) using MPIO collective mode\n", __func__, file->mpi_rank); #endif /* Get the collective_opt property to check whether the application wants to do IO individually. */ if (H5CX_get_mpio_coll_opt(&coll_opt_mode) < 0) @@ -1358,13 +1358,13 @@ H5FD__mpio_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU if (coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO) { #ifdef H5FDmpio_DEBUG if (H5FD_mpio_debug_r_flag) - HDfprintf(stderr, "%s: (%d) doing MPI collective IO\n", __func__, file->mpi_rank); + fprintf(stderr, "%s: (%d) doing MPI collective IO\n", __func__, file->mpi_rank); #endif /* Check whether we should read from rank 0 and broadcast to other ranks */ if (H5CX_get_mpio_rank0_bcast()) { #ifdef H5FDmpio_DEBUG if (H5FD_mpio_debug_r_flag) - HDfprintf(stderr, "%s: (%d) doing read-rank0-and-MPI_Bcast\n", __func__, file->mpi_rank); + fprintf(stderr, "%s: (%d) doing read-rank0-and-MPI_Bcast\n", __func__, file->mpi_rank); #endif /* Indicate path we've taken */ rank0_bcast = TRUE; @@ -1390,7 +1390,7 @@ H5FD__mpio_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU else { #ifdef H5FDmpio_DEBUG if (H5FD_mpio_debug_r_flag) - HDfprintf(stderr, "%s: (%d) doing MPI independent IO\n", __func__, file->mpi_rank); + fprintf(stderr, "%s: (%d) doing MPI independent IO\n", __func__, file->mpi_rank); #endif /* Perform independent read operation */ @@ -1424,7 +1424,7 @@ H5FD__mpio_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU #ifdef H5FDmpio_DEBUG if (H5FD_mpio_debug_r_flag) - HDfprintf(stderr, "%s: (%d) doing MPI independent IO\n", __func__, file->mpi_rank); + fprintf(stderr, "%s: (%d) doing MPI independent IO\n", __func__, file->mpi_rank); #endif /* Perform independent read operation */ @@ -1484,8 +1484,8 @@ H5FD__mpio_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU #ifdef H5FDmpio_DEBUG if (H5FD_mpio_debug_r_flag) - HDfprintf(stderr, "%s: (%d) mpi_off = %ld bytes_read = %lld type = %s\n", __func__, file->mpi_rank, - (long)mpi_off, (long long)bytes_read, H5FD__mem_t_to_str(type)); + fprintf(stderr, "%s: (%d) mpi_off = %ld bytes_read = %lld type = %s\n", __func__, file->mpi_rank, + (long)mpi_off, (long long)bytes_read, H5FD__mem_t_to_str(type)); #endif /* @@ -1500,7 +1500,7 @@ done: #ifdef H5FDmpio_DEBUG if (H5FD_mpio_debug_t_flag) - HDfprintf(stderr, "%s: (%d) Leaving\n", __func__, file->mpi_rank); + fprintf(stderr, "%s: (%d) Leaving\n", __func__, file->mpi_rank); #endif FUNC_LEAVE_NOAPI(ret_value) @@ -1559,7 +1559,7 @@ H5FD__mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, h #ifdef H5FDmpio_DEBUG if (H5FD_mpio_debug_t_flag) - HDfprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank); + fprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank); #endif /* Sanity checks */ @@ -1617,7 +1617,7 @@ H5FD__mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, h #ifdef H5FDmpio_DEBUG if (H5FD_mpio_debug_w_flag) - HDfprintf(stderr, "%s: (%d) using MPIO collective mode\n", __func__, file->mpi_rank); + fprintf(stderr, "%s: (%d) using MPIO collective mode\n", __func__, file->mpi_rank); #endif /* Get the collective_opt property to check whether the application wants to do IO individually. */ @@ -1627,7 +1627,7 @@ H5FD__mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, h if (coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO) { #ifdef H5FDmpio_DEBUG if (H5FD_mpio_debug_w_flag) - HDfprintf(stderr, "%s: (%d) doing MPI collective IO\n", __func__, file->mpi_rank); + fprintf(stderr, "%s: (%d) doing MPI collective IO\n", __func__, file->mpi_rank); #endif /* Perform collective write operation */ if (MPI_SUCCESS != @@ -1647,7 +1647,7 @@ H5FD__mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, h #ifdef H5FDmpio_DEBUG if (H5FD_mpio_debug_w_flag) - HDfprintf(stderr, "%s: (%d) doing MPI independent IO\n", __func__, file->mpi_rank); + fprintf(stderr, "%s: (%d) doing MPI independent IO\n", __func__, file->mpi_rank); #endif /* Perform independent write operation */ if (MPI_SUCCESS != @@ -1678,7 +1678,7 @@ H5FD__mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, h #ifdef H5FDmpio_DEBUG if (H5FD_mpio_debug_w_flag) - HDfprintf(stderr, "%s: (%d) doing MPI independent IO\n", __func__, file->mpi_rank); + fprintf(stderr, "%s: (%d) doing MPI independent IO\n", __func__, file->mpi_rank); #endif /* Perform independent write operation */ @@ -1711,8 +1711,8 @@ H5FD__mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, h #ifdef H5FDmpio_DEBUG if (H5FD_mpio_debug_w_flag) - HDfprintf(stderr, "%s: (%d) mpi_off = %ld bytes_written = %lld type = %s\n", __func__, - file->mpi_rank, (long)mpi_off, (long long)bytes_written, H5FD__mem_t_to_str(type)); + fprintf(stderr, "%s: (%d) mpi_off = %ld bytes_written = %lld type = %s\n", __func__, file->mpi_rank, + (long)mpi_off, (long long)bytes_written, H5FD__mem_t_to_str(type)); #endif /* Each process will keep track of its perceived EOF value locally, and @@ -1732,7 +1732,7 @@ done: #ifdef H5FDmpio_DEBUG if (H5FD_mpio_debug_t_flag) - HDfprintf(stderr, "%s: (%d) Leaving: ret_value = %d\n", __func__, file->mpi_rank, ret_value); + fprintf(stderr, "%s: (%d) Leaving: ret_value = %d\n", __func__, file->mpi_rank, ret_value); #endif FUNC_LEAVE_NOAPI(ret_value) @@ -2158,7 +2158,7 @@ H5FD__mpio_read_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t cou #ifdef H5FDmpio_DEBUG if (H5FD_mpio_debug_t_flag) - HDfprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank); + fprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank); #endif /* Sanity checks */ @@ -2207,7 +2207,7 @@ H5FD__mpio_read_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t cou #ifdef H5FDmpio_DEBUG if (H5FD_mpio_debug_r_flag) - HDfprintf(stdout, "%s: mpi_off = %ld size_i = %d\n", __func__, (long)mpi_off, size_i); + fprintf(stdout, "%s: mpi_off = %ld size_i = %d\n", __func__, (long)mpi_off, size_i); #endif /* Setup the file view. */ @@ -2228,18 +2228,18 @@ H5FD__mpio_read_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t cou /* Read the data. */ #ifdef H5FDmpio_DEBUG if (H5FD_mpio_debug_r_flag) - HDfprintf(stdout, "%s: using MPIO collective mode\n", __func__); + fprintf(stdout, "%s: using MPIO collective mode\n", __func__); #endif if (coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO) { #ifdef H5FDmpio_DEBUG if (H5FD_mpio_debug_r_flag) - HDfprintf(stdout, "%s: doing MPI collective IO\n", __func__); + fprintf(stdout, "%s: doing MPI collective IO\n", __func__); #endif /* Check whether we should read from rank 0 and broadcast to other ranks */ if (H5CX_get_mpio_rank0_bcast()) { #ifdef H5FDmpio_DEBUG if (H5FD_mpio_debug_r_flag) - HDfprintf(stdout, "%s: doing read-rank0-and-MPI_Bcast\n", __func__); + fprintf(stdout, "%s: doing read-rank0-and-MPI_Bcast\n", __func__); #endif /* Indicate path we've taken */ rank0_bcast = TRUE; @@ -2259,7 +2259,7 @@ H5FD__mpio_read_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t cou else if (size_i > 0) { #ifdef H5FDmpio_DEBUG if (H5FD_mpio_debug_r_flag) - HDfprintf(stdout, "%s: doing MPI independent IO\n", __func__); + fprintf(stdout, "%s: doing MPI independent IO\n", __func__); #endif if (MPI_SUCCESS != @@ -2363,7 +2363,7 @@ H5FD__mpio_read_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t cou #ifdef H5FDmpio_DEBUG if (H5FD_mpio_debug_r_flag) - HDfprintf(stdout, "%s: doing MPI independent IO\n", __func__); + fprintf(stdout, "%s: doing MPI independent IO\n", __func__); #endif /* Loop over vector elements */ @@ -2473,7 +2473,7 @@ done: #ifdef H5FDmpio_DEBUG if (H5FD_mpio_debug_t_flag) - HDfprintf(stdout, "%s: Leaving, proc %d: ret_value = %d\n", __func__, file->mpi_rank, ret_value); + fprintf(stdout, "%s: Leaving, proc %d: ret_value = %d\n", __func__, file->mpi_rank, ret_value); #endif FUNC_LEAVE_NOAPI(ret_value) @@ -2550,7 +2550,7 @@ H5FD__mpio_write_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t co #ifdef H5FDmpio_DEBUG if (H5FD_mpio_debug_t_flag) - HDfprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank); + fprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank); #endif /* Sanity checks */ @@ -2616,7 +2616,7 @@ H5FD__mpio_write_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t co #ifdef H5FDmpio_DEBUG if (H5FD_mpio_debug_w_flag) - HDfprintf(stdout, "%s: mpi_off = %ld size_i = %d\n", __func__, (long)mpi_off, size_i); + fprintf(stdout, "%s: mpi_off = %ld size_i = %d\n", __func__, (long)mpi_off, size_i); #endif /* Setup the file view. */ @@ -2636,13 +2636,13 @@ H5FD__mpio_write_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t co /* Write the data. */ #ifdef H5FDmpio_DEBUG if (H5FD_mpio_debug_w_flag) - HDfprintf(stdout, "%s: using MPIO collective mode\n", __func__); + fprintf(stdout, "%s: using MPIO collective mode\n", __func__); #endif if (coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO) { #ifdef H5FDmpio_DEBUG if (H5FD_mpio_debug_w_flag) - HDfprintf(stdout, "%s: doing MPI collective IO\n", __func__); + fprintf(stdout, "%s: doing MPI collective IO\n", __func__); #endif if (MPI_SUCCESS != (mpi_code = MPI_File_write_at_all(file->f, mpi_off, mpi_bufs_base, size_i, @@ -2658,7 +2658,7 @@ H5FD__mpio_write_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t co else if (size_i > 0) { #ifdef H5FDmpio_DEBUG if (H5FD_mpio_debug_w_flag) - HDfprintf(stdout, "%s: doing MPI independent IO\n", __func__); + fprintf(stdout, "%s: doing MPI independent IO\n", __func__); #endif if (MPI_SUCCESS != @@ -2691,7 +2691,7 @@ H5FD__mpio_write_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t co #ifdef H5FDmpio_DEBUG if (H5FD_mpio_debug_w_flag) - HDfprintf(stdout, "%s: doing MPI independent IO\n", __func__); + fprintf(stdout, "%s: doing MPI independent IO\n", __func__); #endif /* Loop over vector elements */ @@ -2782,7 +2782,7 @@ done: #ifdef H5FDmpio_DEBUG if (H5FD_mpio_debug_t_flag) - HDfprintf(stdout, "%s: Leaving, proc %d: ret_value = %d\n", __func__, file->mpi_rank, ret_value); + fprintf(stdout, "%s: Leaving, proc %d: ret_value = %d\n", __func__, file->mpi_rank, ret_value); #endif FUNC_LEAVE_NOAPI(ret_value) @@ -2814,7 +2814,7 @@ H5FD__mpio_flush(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing) #ifdef H5FDmpio_DEBUG if (H5FD_mpio_debug_t_flag) - HDfprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank); + fprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank); #endif /* Sanity checks */ @@ -2829,7 +2829,7 @@ H5FD__mpio_flush(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing) done: #ifdef H5FDmpio_DEBUG if (H5FD_mpio_debug_t_flag) - HDfprintf(stderr, "%s: (%d) Leaving\n", __func__, file->mpi_rank); + fprintf(stderr, "%s: (%d) Leaving\n", __func__, file->mpi_rank); #endif FUNC_LEAVE_NOAPI(ret_value) @@ -2871,7 +2871,7 @@ H5FD__mpio_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR #ifdef H5FDmpio_DEBUG if (H5FD_mpio_debug_t_flag) - HDfprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank); + fprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank); #endif /* Sanity checks */ @@ -2942,7 +2942,7 @@ H5FD__mpio_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR done: #ifdef H5FDmpio_DEBUG if (H5FD_mpio_debug_t_flag) - HDfprintf(stderr, "%s: (%d) Leaving\n", __func__, file->mpi_rank); + fprintf(stderr, "%s: (%d) Leaving\n", __func__, file->mpi_rank); #endif FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5FDros3.c b/src/H5FDros3.c index a0c7203..ad9825c 100644 --- a/src/H5FDros3.c +++ b/src/H5FDros3.c @@ -306,7 +306,7 @@ H5FD_ros3_init(void) FUNC_ENTER_NOAPI(H5I_INVALID_HID) #if ROS3_DEBUG - HDfprintf(stdout, "H5FD_ros3_init() called.\n"); + fprintf(stdout, "H5FD_ros3_init() called.\n"); #endif if (H5I_VFL != H5I_get_type(H5FD_ROS3_g)) { @@ -350,7 +350,7 @@ H5FD__ros3_term(void) FUNC_ENTER_PACKAGE_NOERR #if ROS3_DEBUG - HDfprintf(stdout, "H5FD__ros3_term() called.\n"); + fprintf(stdout, "H5FD__ros3_term() called.\n"); #endif /* Reset VFL ID */ @@ -386,7 +386,7 @@ H5Pset_fapl_ros3(hid_t fapl_id, const H5FD_ros3_fapl_t *fa) assert(fa != NULL); #if ROS3_DEBUG - HDfprintf(stdout, "H5Pset_fapl_ros3() called.\n"); + fprintf(stdout, "H5Pset_fapl_ros3() called.\n"); #endif plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS); @@ -469,7 +469,7 @@ H5Pget_fapl_ros3(hid_t fapl_id, H5FD_ros3_fapl_t *fa_dst /*out*/) H5TRACE2("e", "ix", fapl_id, fa_dst); #if ROS3_DEBUG - HDfprintf(stdout, "H5Pget_fapl_ros3() called.\n"); + fprintf(stdout, "H5Pget_fapl_ros3() called.\n"); #endif if (fa_dst == NULL) @@ -630,7 +630,7 @@ ros3_reset_stats(H5FD_ros3_t *file) FUNC_ENTER_PACKAGE #if ROS3_DEBUG - HDprintf("ros3_reset_stats() called\n"); + printf("ros3_reset_stats() called\n"); #endif if (file == NULL) @@ -698,7 +698,7 @@ H5FD__ros3_open(const char *url, unsigned flags, hid_t fapl_id, haddr_t maxaddr) FUNC_ENTER_PACKAGE #if ROS3_DEBUG - HDfprintf(stdout, "H5FD__ros3_open() called.\n"); + fprintf(stdout, "H5FD__ros3_open() called.\n"); #endif /* Sanity check on file offsets */ @@ -868,20 +868,20 @@ ros3_fprint_stats(FILE *stream, const H5FD_ros3_t *file) * PRINT FILENAME * ******************/ - HDfprintf(stream, "stats for %s://%s", purl->scheme, purl->host); + fprintf(stream, "stats for %s://%s", purl->scheme, purl->host); if (purl->port != NULL && purl->port[0] != '\0') - HDfprintf(stream, ":%s", purl->port); + fprintf(stream, ":%s", purl->port); if (purl->query != NULL && purl->query[0] != '\0') { if (purl->path != NULL && purl->path[0] != '\0') - HDfprintf(stream, "/%s", purl->path); + fprintf(stream, "/%s", purl->path); else - HDfprintf(stream, "/"); - HDfprintf(stream, "?%s", purl->query); + fprintf(stream, "/"); + fprintf(stream, "?%s", purl->query); } else if (purl->path != NULL && purl->path[0] != '\0') { - HDfprintf(stream, "/%s", purl->path); + fprintf(stream, "/%s", purl->path); } - HDfprintf(stream, "\n"); + fprintf(stream, "\n"); /******************* * AGGREGATE STATS * @@ -914,10 +914,10 @@ ros3_fprint_stats(FILE *stream, const H5FD_ros3_t *file) * PRINT OVERVIEW * ******************/ - HDfprintf(stream, "TOTAL READS: %llu (%llu meta, %llu raw)\n", count_raw + count_meta, count_meta, - count_raw); - HDfprintf(stream, "TOTAL BYTES: %llu (%llu meta, %llu raw)\n", bytes_raw + bytes_meta, bytes_meta, - bytes_raw); + fprintf(stream, "TOTAL READS: %llu (%llu meta, %llu raw)\n", count_raw + count_meta, count_meta, + count_raw); + fprintf(stream, "TOTAL BYTES: %llu (%llu meta, %llu raw)\n", bytes_raw + bytes_meta, bytes_meta, + bytes_raw); if (count_raw + count_meta == 0) goto done; @@ -926,60 +926,60 @@ ros3_fprint_stats(FILE *stream, const H5FD_ros3_t *file) * PRINT AGGREGATE STATS * *************************/ - HDfprintf(stream, "SIZES meta raw\n"); - HDfprintf(stream, " min "); + fprintf(stream, "SIZES meta raw\n"); + fprintf(stream, " min "); if (count_meta == 0) - HDfprintf(stream, " 0.000 "); + fprintf(stream, " 0.000 "); else { re_dub = (double)min_meta; for (suffix_i = 0; re_dub >= 1024.0; suffix_i++) re_dub /= 1024.0; assert(suffix_i < sizeof(suffixes)); - HDfprintf(stream, "%8.3lf%c ", re_dub, suffixes[suffix_i]); + fprintf(stream, "%8.3lf%c ", re_dub, suffixes[suffix_i]); } if (count_raw == 0) - HDfprintf(stream, " 0.000 \n"); + fprintf(stream, " 0.000 \n"); else { re_dub = (double)min_raw; for (suffix_i = 0; re_dub >= 1024.0; suffix_i++) re_dub /= 1024.0; assert(suffix_i < sizeof(suffixes)); - HDfprintf(stream, "%8.3lf%c\n", re_dub, suffixes[suffix_i]); + fprintf(stream, "%8.3lf%c\n", re_dub, suffixes[suffix_i]); } - HDfprintf(stream, " avg "); + fprintf(stream, " avg "); re_dub = (double)average_meta; for (suffix_i = 0; re_dub >= 1024.0; suffix_i++) re_dub /= 1024.0; assert(suffix_i < sizeof(suffixes)); - HDfprintf(stream, "%8.3lf%c ", re_dub, suffixes[suffix_i]); + fprintf(stream, "%8.3lf%c ", re_dub, suffixes[suffix_i]); re_dub = (double)average_raw; for (suffix_i = 0; re_dub >= 1024.0; suffix_i++) re_dub /= 1024.0; assert(suffix_i < sizeof(suffixes)); - HDfprintf(stream, "%8.3lf%c\n", re_dub, suffixes[suffix_i]); + fprintf(stream, "%8.3lf%c\n", re_dub, suffixes[suffix_i]); - HDfprintf(stream, " max "); + fprintf(stream, " max "); re_dub = (double)max_meta; for (suffix_i = 0; re_dub >= 1024.0; suffix_i++) re_dub /= 1024.0; assert(suffix_i < sizeof(suffixes)); - HDfprintf(stream, "%8.3lf%c ", re_dub, suffixes[suffix_i]); + fprintf(stream, "%8.3lf%c ", re_dub, suffixes[suffix_i]); re_dub = (double)max_raw; for (suffix_i = 0; re_dub >= 1024.0; suffix_i++) re_dub /= 1024.0; assert(suffix_i < sizeof(suffixes)); - HDfprintf(stream, "%8.3lf%c\n", re_dub, suffixes[suffix_i]); + fprintf(stream, "%8.3lf%c\n", re_dub, suffixes[suffix_i]); /****************************** * PRINT INDIVIDUAL BIN STATS * ******************************/ - HDfprintf(stream, "BINS # of reads total bytes average size\n"); - HDfprintf(stream, " up-to meta raw meta raw meta raw\n"); + fprintf(stream, "BINS # of reads total bytes average size\n"); + fprintf(stream, " up-to meta raw meta raw meta raw\n"); for (i = 0; i <= ROS3_STATS_BIN_COUNT; i++) { const ros3_statsbin *m; @@ -1003,10 +1003,10 @@ ros3_fprint_stats(FILE *stream, const H5FD_ros3_t *file) if (i == ROS3_STATS_BIN_COUNT) { range_end = ros3_stats_boundaries[i - 1]; - HDfprintf(stream, ">"); + fprintf(stream, ">"); } else - HDfprintf(stream, " "); + fprintf(stream, " "); bm_val = (double)m->bytes; for (suffix_i = 0; bm_val >= 1024.0; suffix_i++) @@ -1039,14 +1039,14 @@ ros3_fprint_stats(FILE *stream, const H5FD_ros3_t *file) re_dub /= 1024.0; assert(suffix_i < sizeof(suffixes)); - HDfprintf(stream, " %8.3f%c %7d %7d %8.3f%c %8.3f%c %8.3f%c %8.3f%c\n", re_dub, - suffixes[suffix_i], /* bin ceiling */ - m->count, /* metadata reads */ - r->count, /* raw data reads */ - bm_val, bm_suffix, /* metadata bytes */ - br_val, br_suffix, /* raw data bytes */ - am_val, am_suffix, /* metadata average */ - ar_val, ar_suffix); /* raw data average */ + fprintf(stream, " %8.3f%c %7d %7d %8.3f%c %8.3f%c %8.3f%c %8.3f%c\n", re_dub, + suffixes[suffix_i], /* bin ceiling */ + m->count, /* metadata reads */ + r->count, /* raw data reads */ + bm_val, bm_suffix, /* metadata bytes */ + br_val, br_suffix, /* raw data bytes */ + am_val, am_suffix, /* metadata average */ + ar_val, ar_suffix); /* raw data average */ HDfflush(stream); } @@ -1083,7 +1083,7 @@ H5FD__ros3_close(H5FD_t H5_ATTR_UNUSED *_file) FUNC_ENTER_PACKAGE #if ROS3_DEBUG - HDfprintf(stdout, "H5FD__ros3_close() called.\n"); + fprintf(stdout, "H5FD__ros3_close() called.\n"); #endif /* Sanity checks */ @@ -1152,7 +1152,7 @@ H5FD__ros3_cmp(const H5FD_t *_f1, const H5FD_t *_f2) FUNC_ENTER_PACKAGE_NOERR #if ROS3_DEBUG - HDfprintf(stdout, "H5FD__ros3_cmp() called.\n"); + fprintf(stdout, "H5FD__ros3_cmp() called.\n"); #endif assert(f1->s3r_handle != NULL); @@ -1264,7 +1264,7 @@ H5FD__ros3_query(const H5FD_t H5_ATTR_UNUSED *_file, unsigned long *flags) FUNC_ENTER_PACKAGE_NOERR #if ROS3_DEBUG - HDfprintf(stdout, "H5FD__ros3_query() called.\n"); + fprintf(stdout, "H5FD__ros3_query() called.\n"); #endif /* Set the VFL feature flags that this driver supports */ @@ -1304,7 +1304,7 @@ H5FD__ros3_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type) FUNC_ENTER_PACKAGE_NOERR #if ROS3_DEBUG - HDfprintf(stdout, "H5FD__ros3_get_eoa() called.\n"); + fprintf(stdout, "H5FD__ros3_get_eoa() called.\n"); #endif FUNC_LEAVE_NOAPI(file->eoa) @@ -1335,7 +1335,7 @@ H5FD__ros3_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr) FUNC_ENTER_PACKAGE_NOERR #if ROS3_DEBUG - HDfprintf(stdout, "H5FD__ros3_set_eoa() called.\n"); + fprintf(stdout, "H5FD__ros3_set_eoa() called.\n"); #endif file->eoa = addr; @@ -1369,7 +1369,7 @@ H5FD__ros3_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type) FUNC_ENTER_PACKAGE_NOERR #if ROS3_DEBUG - HDfprintf(stdout, "H5FD__ros3_get_eof() called.\n"); + fprintf(stdout, "H5FD__ros3_get_eof() called.\n"); #endif FUNC_LEAVE_NOAPI(H5FD_s3comms_s3r_get_filesize(file->s3r_handle)) @@ -1401,7 +1401,7 @@ H5FD__ros3_get_handle(H5FD_t *_file, hid_t H5_ATTR_UNUSED fapl, void **file_hand FUNC_ENTER_PACKAGE #if ROS3_DEBUG - HDfprintf(stdout, "H5FD__ros3_get_handle() called.\n"); + fprintf(stdout, "H5FD__ros3_get_handle() called.\n"); #endif if (!file_handle) @@ -1451,7 +1451,7 @@ H5FD__ros3_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU FUNC_ENTER_PACKAGE #if ROS3_DEBUG - HDfprintf(stdout, "H5FD__ros3_read() called.\n"); + fprintf(stdout, "H5FD__ros3_read() called.\n"); #endif assert(file != NULL); @@ -1521,7 +1521,7 @@ H5FD__ros3_write(H5FD_t H5_ATTR_UNUSED *_file, H5FD_mem_t H5_ATTR_UNUSED type, h FUNC_ENTER_PACKAGE #if ROS3_DEBUG - HDfprintf(stdout, "H5FD__ros3_write() called.\n"); + fprintf(stdout, "H5FD__ros3_write() called.\n"); #endif HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, FAIL, "cannot write to read-only file.") @@ -1559,7 +1559,7 @@ H5FD__ros3_truncate(H5FD_t H5_ATTR_UNUSED *_file, hid_t H5_ATTR_UNUSED dxpl_id, FUNC_ENTER_PACKAGE #if ROS3_DEBUG - HDfprintf(stdout, "H5FD__ros3_truncate() called.\n"); + fprintf(stdout, "H5FD__ros3_truncate() called.\n"); #endif HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, FAIL, "cannot truncate read-only file.") diff --git a/src/H5FDs3comms.c b/src/H5FDs3comms.c index 0d6f202..c088fca 100644 --- a/src/H5FDs3comms.c +++ b/src/H5FDs3comms.c @@ -222,13 +222,13 @@ H5FD_s3comms_hrb_node_set(hrb_node_t **L, const char *name, const char *value) FUNC_ENTER_NOAPI_NOINIT #if S3COMMS_DEBUG - HDfprintf(stdout, "called H5FD_s3comms_hrb_node_set."); - HDprintf("NAME: %s\n", name); - HDprintf("VALUE: %s\n", value); - HDprintf("LIST:\n->"); + fprintf(stdout, "called H5FD_s3comms_hrb_node_set."); + printf("NAME: %s\n", name); + printf("VALUE: %s\n", value); + printf("LIST:\n->"); for (node_ptr = (*L); node_ptr != NULL; node_ptr = node_ptr->next) - HDfprintf(stdout, "{%s}\n->", node_ptr->cat); - HDprintf("(null)\n"); + fprintf(stdout, "{%s}\n->", node_ptr->cat); + printf("(null)\n"); HDfflush(stdout); node_ptr = NULL; #endif @@ -301,7 +301,7 @@ H5FD_s3comms_hrb_node_set(hrb_node_t **L, const char *name, const char *value) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "trying to remove node from empty list") else { #if S3COMMS_DEBUG - HDprintf("CREATE NEW\n"); + printf("CREATE NEW\n"); HDfflush(stdout); #endif /******************* @@ -332,7 +332,7 @@ H5FD_s3comms_hrb_node_set(hrb_node_t **L, const char *name, const char *value) if (value == NULL) { #if S3COMMS_DEBUG - HDprintf("REMOVE HEAD\n"); + printf("REMOVE HEAD\n"); HDfflush(stdout); #endif /*************** @@ -342,39 +342,39 @@ H5FD_s3comms_hrb_node_set(hrb_node_t **L, const char *name, const char *value) *L = node_ptr->next; #if S3COMMS_DEBUG - HDprintf("FREEING CAT (node)\n"); + printf("FREEING CAT (node)\n"); HDfflush(stdout); #endif H5MM_xfree(node_ptr->cat); #if S3COMMS_DEBUG - HDprintf("FREEING LOWERNAME (node)\n"); + printf("FREEING LOWERNAME (node)\n"); HDfflush(stdout); #endif H5MM_xfree(node_ptr->lowername); #if S3COMMS_DEBUG - HDprintf("FREEING NAME (node)\n"); + printf("FREEING NAME (node)\n"); HDfflush(stdout); #endif H5MM_xfree(node_ptr->name); #if S3COMMS_DEBUG - HDprintf("FREEING VALUE (node)\n"); + printf("FREEING VALUE (node)\n"); HDfflush(stdout); #endif H5MM_xfree(node_ptr->value); #if S3COMMS_DEBUG - HDprintf("MAGIC OK? %s\n", (node_ptr->magic == S3COMMS_HRB_NODE_MAGIC) ? "YES" : "NO"); + printf("MAGIC OK? %s\n", (node_ptr->magic == S3COMMS_HRB_NODE_MAGIC) ? "YES" : "NO"); HDfflush(stdout); #endif assert(node_ptr->magic == S3COMMS_HRB_NODE_MAGIC); node_ptr->magic += 1ul; #if S3COMMS_DEBUG - HDprintf("FREEING POINTER\n"); + printf("FREEING POINTER\n"); HDfflush(stdout); #endif H5MM_xfree(node_ptr); #if S3COMMS_DEBUG - HDprintf("FREEING WORKING LOWERNAME\n"); + printf("FREEING WORKING LOWERNAME\n"); HDfflush(stdout); #endif H5MM_xfree(lowername); @@ -382,7 +382,7 @@ H5FD_s3comms_hrb_node_set(hrb_node_t **L, const char *name, const char *value) } else { #if S3COMMS_DEBUG - HDprintf("MODIFY HEAD\n"); + printf("MODIFY HEAD\n"); HDfflush(stdout); #endif /*************** @@ -412,7 +412,7 @@ H5FD_s3comms_hrb_node_set(hrb_node_t **L, const char *name, const char *value) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "trying to remove a node 'before' head") else { #if S3COMMS_DEBUG - HDprintf("PREPEND NEW HEAD\n"); + printf("PREPEND NEW HEAD\n"); HDfflush(stdout); #endif /******************* @@ -441,7 +441,7 @@ H5FD_s3comms_hrb_node_set(hrb_node_t **L, const char *name, const char *value) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "trying to remove absent node") else { #if S3COMMS_DEBUG - HDprintf("APPEND A NODE\n"); + printf("APPEND A NODE\n"); HDfflush(stdout); #endif /******************* @@ -464,7 +464,7 @@ H5FD_s3comms_hrb_node_set(hrb_node_t **L, const char *name, const char *value) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "trying to remove absent node") else { #if S3COMMS_DEBUG - HDprintf("INSERT A NODE\n"); + printf("INSERT A NODE\n"); HDfflush(stdout); #endif /******************* @@ -493,7 +493,7 @@ H5FD_s3comms_hrb_node_set(hrb_node_t **L, const char *name, const char *value) node_ptr->next = tmp->next; #if S3COMMS_DEBUG - HDprintf("REMOVE A NODE\n"); + printf("REMOVE A NODE\n"); HDfflush(stdout); #endif H5MM_xfree(tmp->cat); @@ -510,7 +510,7 @@ H5FD_s3comms_hrb_node_set(hrb_node_t **L, const char *name, const char *value) } else { #if S3COMMS_DEBUG - HDprintf("MODIFY A NODE\n"); + printf("MODIFY A NODE\n"); HDfflush(stdout); #endif /***************** @@ -609,7 +609,7 @@ H5FD_s3comms_hrb_destroy(hrb_t **_buf) FUNC_ENTER_NOAPI_NOINIT #if S3COMMS_DEBUG - HDfprintf(stdout, "called H5FD_s3comms_hrb_destroy.\n"); + fprintf(stdout, "called H5FD_s3comms_hrb_destroy.\n"); #endif if (_buf != NULL && *_buf != NULL) { @@ -673,7 +673,7 @@ H5FD_s3comms_hrb_init_request(const char *_verb, const char *_resource, const ch FUNC_ENTER_NOAPI_NOINIT #if S3COMMS_DEBUG - HDfprintf(stdout, "called H5FD_s3comms_hrb_init_request.\n"); + fprintf(stdout, "called H5FD_s3comms_hrb_init_request.\n"); #endif if (_resource == NULL) @@ -780,7 +780,7 @@ H5FD_s3comms_s3r_close(s3r_t *handle) FUNC_ENTER_NOAPI_NOINIT #if S3COMMS_DEBUG - HDfprintf(stdout, "called H5FD_s3comms_s3r_close.\n"); + fprintf(stdout, "called H5FD_s3comms_s3r_close.\n"); #endif if (handle == NULL) @@ -885,7 +885,7 @@ H5FD_s3comms_s3r_getsize(s3r_t *handle) FUNC_ENTER_NOAPI_NOINIT #if S3COMMS_DEBUG - HDfprintf(stdout, "called H5FD_s3comms_s3r_getsize.\n"); + fprintf(stdout, "called H5FD_s3comms_s3r_getsize.\n"); #endif if (handle == NULL) @@ -934,7 +934,7 @@ H5FD_s3comms_s3r_getsize(s3r_t *handle) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "No HTTP metadata") #if S3COMMS_DEBUG else - HDfprintf(stderr, "GETSIZE: OK\n"); + fprintf(stderr, "GETSIZE: OK\n"); #endif /****************** @@ -1034,7 +1034,7 @@ H5FD_s3comms_s3r_open(const char *url, const char *region, const char *id, const FUNC_ENTER_NOAPI_NOINIT #if S3COMMS_DEBUG - HDfprintf(stdout, "called H5FD_s3comms_s3r_open.\n"); + fprintf(stdout, "called H5FD_s3comms_s3r_open.\n"); #endif if (url == NULL || url[0] == '\0') @@ -1221,7 +1221,7 @@ H5FD_s3comms_s3r_read(s3r_t *handle, haddr_t offset, size_t len, void *dest) FUNC_ENTER_NOAPI_NOINIT #if S3COMMS_DEBUG - HDfprintf(stdout, "called H5FD_s3comms_s3r_read.\n"); + fprintf(stdout, "called H5FD_s3comms_s3r_read.\n"); #endif /************************************** @@ -1282,8 +1282,8 @@ H5FD_s3comms_s3r_read(s3r_t *handle, haddr_t offset, size_t len, void *dest) } #if S3COMMS_DEBUG - HDfprintf(stderr, "%s: Bytes %" PRIuHADDR " - %" PRIuHADDR ", Request Size: %zu\n", handle->httpverb, - offset, offset + len, len); + fprintf(stderr, "%s: Bytes %" PRIuHADDR " - %" PRIuHADDR ", Request Size: %zu\n", handle->httpverb, + offset, offset + len, len); #endif /******************* @@ -1465,8 +1465,8 @@ H5FD_s3comms_s3r_read(s3r_t *handle, haddr_t offset, size_t len, void *dest) if (p_status != CURLE_OK) { if (CURLE_OK != curl_easy_getinfo(curlh, CURLINFO_RESPONSE_CODE, &httpcode)) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem getting response code") - HDfprintf(stderr, "CURL ERROR CODE: %d\nHTTP CODE: %d\n", p_status, httpcode); - HDfprintf(stderr, "%s\n", curl_easy_strerror(p_status)); + fprintf(stderr, "CURL ERROR CODE: %d\nHTTP CODE: %d\n", p_status, httpcode); + fprintf(stderr, "%s\n", curl_easy_strerror(p_status)); HGOTO_ERROR(H5E_VFL, H5E_CANTOPENFILE, FAIL, "problem while performing request."); } if (CURLE_OK != curl_easy_setopt(curlh, CURLOPT_ERRORBUFFER, NULL)) @@ -1481,19 +1481,19 @@ H5FD_s3comms_s3r_read(s3r_t *handle, haddr_t offset, size_t len, void *dest) #if S3COMMS_DEBUG if (dest != NULL) { - HDfprintf(stderr, "len: %d\n", (int)len); - HDfprintf(stderr, "CHECKING FOR BUFFER OVERFLOW\n"); + fprintf(stderr, "len: %d\n", (int)len); + fprintf(stderr, "CHECKING FOR BUFFER OVERFLOW\n"); if (sds == NULL) - HDfprintf(stderr, "sds is NULL!\n"); + fprintf(stderr, "sds is NULL!\n"); else { - HDfprintf(stderr, "sds: 0x%lx\n", (long long)sds); - HDfprintf(stderr, "sds->size: %d\n", (int)sds->size); + fprintf(stderr, "sds: 0x%lx\n", (long long)sds); + fprintf(stderr, "sds->size: %d\n", (int)sds->size); if (len > sds->size) - HDfprintf(stderr, "buffer overwrite\n"); + fprintf(stderr, "buffer overwrite\n"); } } else - HDfprintf(stderr, "performed on entire file\n"); + fprintf(stderr, "performed on entire file\n"); #endif done: @@ -1639,7 +1639,7 @@ H5FD_s3comms_aws_canonical_request(char *canonical_request_dest, int _cr_size, c FUNC_ENTER_NOAPI_NOINIT #if S3COMMS_DEBUG - HDfprintf(stdout, "called H5FD_s3comms_aws_canonical_request.\n"); + fprintf(stdout, "called H5FD_s3comms_aws_canonical_request.\n"); #endif if (http_request == NULL) @@ -1746,7 +1746,7 @@ H5FD_s3comms_bytes_to_hex(char *dest, const unsigned char *msg, size_t msg_len, FUNC_ENTER_NOAPI_NOINIT #if S3COMMS_DEBUG - HDfprintf(stdout, "called H5FD_s3comms_bytes_to_hex.\n"); + fprintf(stdout, "called H5FD_s3comms_bytes_to_hex.\n"); #endif if (dest == NULL) @@ -1790,7 +1790,7 @@ H5FD_s3comms_free_purl(parsed_url_t *purl) FUNC_ENTER_NOAPI_NOINIT_NOERR #if S3COMMS_DEBUG - HDprintf("called H5FD_s3comms_free_purl.\n"); + printf("called H5FD_s3comms_free_purl.\n"); #endif if (purl != NULL) { @@ -1853,7 +1853,7 @@ H5FD_s3comms_HMAC_SHA256(const unsigned char *key, size_t key_len, const char *m FUNC_ENTER_NOAPI_NOINIT #if S3COMMS_DEBUG - HDfprintf(stdout, "called H5FD_s3comms_HMAC_SHA256.\n"); + fprintf(stdout, "called H5FD_s3comms_HMAC_SHA256.\n"); #endif if (dest == NULL) @@ -1943,7 +1943,7 @@ H5FD__s3comms_load_aws_creds_from_file(FILE *file, const char *profile_name, cha FUNC_ENTER_PACKAGE #if S3COMMS_DEBUG - HDfprintf(stdout, "called load_aws_creds_from_file.\n"); + fprintf(stdout, "called load_aws_creds_from_file.\n"); #endif /* format target line for start of profile */ @@ -2063,7 +2063,7 @@ H5FD_s3comms_load_aws_profile(const char *profile_name, char *key_id_out, char * FUNC_ENTER_NOAPI_NOINIT #if S3COMMS_DEBUG - HDfprintf(stdout, "called H5FD_s3comms_load_aws_profile.\n"); + fprintf(stdout, "called H5FD_s3comms_load_aws_profile.\n"); #endif #ifdef H5_HAVE_WIN32_API @@ -2148,7 +2148,7 @@ H5FD_s3comms_nlowercase(char *dest, const char *s, size_t len) FUNC_ENTER_NOAPI_NOINIT #if S3COMMS_DEBUG - HDfprintf(stdout, "called H5FD_s3comms_nlowercase.\n"); + fprintf(stdout, "called H5FD_s3comms_nlowercase.\n"); #endif if (dest == NULL) @@ -2211,7 +2211,7 @@ H5FD_s3comms_parse_url(const char *str, parsed_url_t **_purl) FUNC_ENTER_NOAPI_NOINIT #if S3COMMS_DEBUG - HDprintf("called H5FD_s3comms_parse_url.\n"); + printf("called H5FD_s3comms_parse_url.\n"); #endif if (str == NULL || *str == '\0') @@ -2427,7 +2427,7 @@ H5FD_s3comms_percent_encode_char(char *repr, const unsigned char c, size_t *repr FUNC_ENTER_NOAPI_NOINIT #if S3COMMS_DEBUG - HDfprintf(stdout, "called H5FD_s3comms_percent_encode_char.\n"); + fprintf(stdout, "called H5FD_s3comms_percent_encode_char.\n"); #endif if (repr == NULL) @@ -2435,8 +2435,8 @@ H5FD_s3comms_percent_encode_char(char *repr, const unsigned char c, size_t *repr #if S3COMMS_DEBUG H5FD_s3comms_bytes_to_hex((char *)hex, s, 1, FALSE); - HDfprintf(stdout, " CHAR: \'%s\'\n", s); - HDfprintf(stdout, " CHAR-HEX: \"%s\"\n", hex); + fprintf(stdout, " CHAR: \'%s\'\n", s); + fprintf(stdout, " CHAR-HEX: \"%s\"\n", hex); #endif if (c <= (unsigned char)0x7f) { @@ -2444,7 +2444,7 @@ H5FD_s3comms_percent_encode_char(char *repr, const unsigned char c, size_t *repr * and single percent-code */ #if S3COMMS_DEBUG - HDfprintf(stdout, " SINGLE-BYTE\n"); + fprintf(stdout, " SINGLE-BYTE\n"); #endif *repr_len = 3; chars_written = HDsnprintf(repr, 4, "%%%02X", c); @@ -2459,7 +2459,7 @@ H5FD_s3comms_percent_encode_char(char *repr, const unsigned char c, size_t *repr unsigned int stack_size = 0; unsigned char stack[4] = {0, 0, 0, 0}; #if S3COMMS_DEBUG - HDfprintf(stdout, " MULTI-BYTE\n"); + fprintf(stdout, " MULTI-BYTE\n"); #endif stack_size = 0; k = (unsigned int)c; @@ -2479,13 +2479,13 @@ H5FD_s3comms_percent_encode_char(char *repr, const unsigned char c, size_t *repr */ #if S3COMMS_DEBUG - HDfprintf(stdout, " STACK:\n {\n"); + fprintf(stdout, " STACK:\n {\n"); for (i = 0; i < stack_size; i++) { H5FD_s3comms_bytes_to_hex((char *)hex, (&stack[i]), 1, FALSE); hex[2] = 0; - HDfprintf(stdout, " %s,\n", hex); + fprintf(stdout, " %s,\n", hex); } - HDfprintf(stdout, " }\n"); + fprintf(stdout, " }\n"); #endif /**************** @@ -2575,7 +2575,7 @@ H5FD_s3comms_signing_key(unsigned char *md, const char *secret, const char *regi FUNC_ENTER_NOAPI_NOINIT #if S3COMMS_DEBUG - HDfprintf(stdout, "called H5FD_s3comms_signing_key.\n"); + fprintf(stdout, "called H5FD_s3comms_signing_key.\n"); #endif if (md == NULL) @@ -2667,7 +2667,7 @@ H5FD_s3comms_tostringtosign(char *dest, const char *req, const char *now, const FUNC_ENTER_NOAPI_NOINIT #if S3COMMS_DEBUG - HDfprintf(stdout, "called H5FD_s3comms_tostringtosign.\n"); + fprintf(stdout, "called H5FD_s3comms_tostringtosign.\n"); #endif if (dest == NULL) @@ -2754,7 +2754,7 @@ H5FD_s3comms_trim(char *dest, char *s, size_t s_len, size_t *n_written) FUNC_ENTER_NOAPI_NOINIT #if S3COMMS_DEBUG - HDfprintf(stdout, "called H5FD_s3comms_trim.\n"); + fprintf(stdout, "called H5FD_s3comms_trim.\n"); #endif if (dest == NULL) @@ -2844,7 +2844,7 @@ H5FD_s3comms_uriencode(char *dest, const char *s, size_t s_len, hbool_t encode_s FUNC_ENTER_NOAPI_NOINIT #if S3COMMS_DEBUG - HDfprintf(stdout, "H5FD_s3comms_uriencode called.\n"); + fprintf(stdout, "H5FD_s3comms_uriencode called.\n"); #endif if (s == NULL) diff --git a/src/H5FDspace.c b/src/H5FDspace.c index 8b75292..99430ce 100644 --- a/src/H5FDspace.c +++ b/src/H5FDspace.c @@ -147,7 +147,7 @@ H5FD__alloc_real(H5FD_t *file, H5FD_mem_t type, hsize_t size, haddr_t *frag_addr FUNC_ENTER_PACKAGE #ifdef H5FD_ALLOC_DEBUG - HDfprintf(stderr, "%s: type = %u, size = %" PRIuHSIZE "\n", __func__, (unsigned)type, size); + fprintf(stderr, "%s: type = %u, size = %" PRIuHSIZE "\n", __func__, (unsigned)type, size); #endif /* H5FD_ALLOC_DEBUG */ /* check args */ @@ -210,7 +210,7 @@ H5FD__alloc_real(H5FD_t *file, H5FD_mem_t type, hsize_t size, haddr_t *frag_addr done: #ifdef H5FD_ALLOC_DEBUG - HDfprintf(stderr, "%s: ret_value = %" PRIuHADDR "\n", __func__, ret_value); + fprintf(stderr, "%s: ret_value = %" PRIuHADDR "\n", __func__, ret_value); #endif /* H5FD_ALLOC_DEBUG */ FUNC_LEAVE_NOAPI(ret_value) } /* end H5FD__alloc_real() */ @@ -286,8 +286,8 @@ H5FD__free_real(H5FD_t *file, H5FD_mem_t type, haddr_t addr, hsize_t size) assert(size > 0); #ifdef H5FD_ALLOC_DEBUG - HDfprintf(stderr, "%s: type = %u, addr = %" PRIuHADDR ", size = %" PRIuHSIZE "\n", __func__, - (unsigned)type, addr, size); + fprintf(stderr, "%s: type = %u, addr = %" PRIuHADDR ", size = %" PRIuHSIZE "\n", __func__, (unsigned)type, + addr, size); #endif /* H5FD_ALLOC_DEBUG */ /* Sanity checking */ @@ -304,7 +304,7 @@ H5FD__free_real(H5FD_t *file, H5FD_mem_t type, haddr_t addr, hsize_t size) /* Check for file driver 'free' callback and call it if available */ if (file->cls->free) { #ifdef H5FD_ALLOC_DEBUG - HDfprintf(stderr, "%s: Letting VFD free space\n", __func__); + fprintf(stderr, "%s: Letting VFD free space\n", __func__); #endif /* H5FD_ALLOC_DEBUG */ if ((file->cls->free)(file, type, H5CX_get_dxpl(), addr, size) < 0) HGOTO_ERROR(H5E_VFL, H5E_CANTFREE, FAIL, "driver free request failed") @@ -317,11 +317,11 @@ H5FD__free_real(H5FD_t *file, H5FD_mem_t type, haddr_t addr, hsize_t size) eoa = file->cls->get_eoa(file, type); #ifdef H5FD_ALLOC_DEBUG - HDfprintf(stderr, "%s: eoa = %" PRIuHADDR "\n", __func__, eoa); + fprintf(stderr, "%s: eoa = %" PRIuHADDR "\n", __func__, eoa); #endif /* H5FD_ALLOC_DEBUG */ if (eoa == (addr + size)) { #ifdef H5FD_ALLOC_DEBUG - HDfprintf(stderr, "%s: Reducing file size to = %" PRIuHADDR "\n", __func__, addr); + fprintf(stderr, "%s: Reducing file size to = %" PRIuHADDR "\n", __func__, addr); #endif /* H5FD_ALLOC_DEBUG */ if (file->cls->set_eoa(file, type, addr) < 0) HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, "set end of space allocation request failed") @@ -330,8 +330,8 @@ H5FD__free_real(H5FD_t *file, H5FD_mem_t type, haddr_t addr, hsize_t size) else { /* leak memory */ #ifdef H5FD_ALLOC_DEBUG - HDfprintf(stderr, "%s: LEAKED MEMORY!!! type = %u, addr = %" PRIuHADDR ", size = %" PRIuHSIZE "\n", - __func__, (unsigned)type, addr, size); + fprintf(stderr, "%s: LEAKED MEMORY!!! type = %u, addr = %" PRIuHADDR ", size = %" PRIuHSIZE "\n", + __func__, (unsigned)type, addr, size); #endif /* H5FD_ALLOC_DEBUG */ } /* end else */ diff --git a/src/H5FDsplitter.c b/src/H5FDsplitter.c index 1159694..70a3caf 100644 --- a/src/H5FDsplitter.c +++ b/src/H5FDsplitter.c @@ -89,7 +89,7 @@ typedef struct H5FD_splitter_t { #if H5FD_SPLITTER_DEBUG_OP_CALLS #define H5FD_SPLITTER_LOG_CALL(name) \ do { \ - HDprintf("called %s()\n", (name)); \ + printf("called %s()\n", (name)); \ HDfflush(stdout); \ } while (0) #else diff --git a/src/H5FDsubfiling/H5FDioc.c b/src/H5FDsubfiling/H5FDioc.c index 2211e6e..190c8c4 100644 --- a/src/H5FDsubfiling/H5FDioc.c +++ b/src/H5FDsubfiling/H5FDioc.c @@ -91,7 +91,7 @@ typedef struct H5FD_ioc_t { #ifdef H5FD_IOC_DEBUG #define H5FD_IOC_LOG_CALL(name) \ do { \ - HDprintf("called %s()\n", (name)); \ + printf("called %s()\n", (name)); \ HDfflush(stdout); \ } while (0) #else @@ -1501,7 +1501,7 @@ H5FD__ioc_del(const char *name, hid_t fapl) if (NULL == (config_file = HDfopen(tmp_filename, "r"))) { if (ENOENT == errno) { #ifdef H5FD_IOC_DEBUG - HDprintf("** WARNING: couldn't delete Subfiling configuration file '%s'\n", tmp_filename); + printf("** WARNING: couldn't delete Subfiling configuration file '%s'\n", tmp_filename); #endif H5_SUBFILING_GOTO_DONE(SUCCEED); @@ -1540,7 +1540,7 @@ H5FD__ioc_del(const char *name, hid_t fapl) if (HDremove(tmp_filename) < 0) { #ifdef H5FD_IOC_DEBUG - HDprintf("** WARNING: couldn't delete subfile '%s'\n", tmp_filename); + printf("** WARNING: couldn't delete subfile '%s'\n", tmp_filename); #endif if (ENOENT != errno) diff --git a/src/H5FDsubfiling/H5FDioc_threads.c b/src/H5FDsubfiling/H5FDioc_threads.c index 579b686..64529b9 100644 --- a/src/H5FDsubfiling/H5FDioc_threads.c +++ b/src/H5FDsubfiling/H5FDioc_threads.c @@ -195,7 +195,7 @@ initialize_ioc_threads(void *_sf_context) #ifdef H5FD_IOC_DEBUG if (sf_context->topology->ioc_idx == 0) { - HDprintf("%s: time = %lf seconds\n", __func__, (t_end - t_start)); + printf("%s: time = %lf seconds\n", __func__, (t_end - t_start)); HDfflush(stdout); } #endif @@ -1047,8 +1047,8 @@ ioc_file_write_data(int fd, int64_t file_offset, void *data_buffer, int64_t data bytes_remaining -= bytes_written; #ifdef H5FD_IOC_DEBUG - HDprintf("[ioc(%d) %s]: wrote %ld bytes, remaining=%ld, file_offset=%" PRId64 "\n", ioc_idx, - __func__, bytes_written, bytes_remaining, file_offset); + printf("[ioc(%d) %s]: wrote %ld bytes, remaining=%ld, file_offset=%" PRId64 "\n", ioc_idx, + __func__, bytes_written, bytes_remaining, file_offset); #endif this_data += bytes_written; @@ -1099,8 +1099,8 @@ ioc_file_read_data(int fd, int64_t file_offset, void *data_buffer, int64_t data_ bytes_remaining -= bytes_read; #ifdef H5FD_IOC_DEBUG - HDprintf("[ioc(%d) %s]: read %ld bytes, remaining=%ld, file_offset=%" PRId64 "\n", ioc_idx, - __func__, bytes_read, bytes_remaining, file_offset); + printf("[ioc(%d) %s]: read %ld bytes, remaining=%ld, file_offset=%" PRId64 "\n", ioc_idx, + __func__, bytes_read, bytes_remaining, file_offset); #endif this_buffer += bytes_read; @@ -1116,8 +1116,8 @@ ioc_file_read_data(int fd, int64_t file_offset, void *data_buffer, int64_t data_ else { if (retries == 0) { #ifdef H5FD_IOC_DEBUG - HDprintf("[ioc(%d) %s]: TIMEOUT: file_offset=%" PRId64 ", data_size=%ld\n", ioc_idx, __func__, - file_offset, data_size); + printf("[ioc(%d) %s]: TIMEOUT: file_offset=%" PRId64 ", data_size=%ld\n", ioc_idx, __func__, + file_offset, data_size); #endif H5_SUBFILING_SYS_GOTO_ERROR(H5E_IO, H5E_READERROR, -1, "HDpread failed"); @@ -1176,8 +1176,8 @@ ioc_file_truncate(sf_work_request_t *msg) H5_SUBFILING_MPI_GOTO_ERROR(FAIL, "MPI_Send failed", mpi_code); #ifdef H5FD_IOC_DEBUG - HDprintf("[ioc(%d) %s]: truncated subfile to %lld bytes. ret = %d\n", ioc_idx, __func__, - (long long)length, errno); + printf("[ioc(%d) %s]: truncated subfile to %lld bytes. ret = %d\n", ioc_idx, __func__, (long long)length, + errno); HDfflush(stdout); #endif diff --git a/src/H5FDsubfiling/H5FDsubfiling.c b/src/H5FDsubfiling/H5FDsubfiling.c index e75b2f4..59a193e 100644 --- a/src/H5FDsubfiling/H5FDsubfiling.c +++ b/src/H5FDsubfiling/H5FDsubfiling.c @@ -393,8 +393,8 @@ H5FD__subfiling_term(void) } #ifdef H5FD_SUBFILING_DEBUG else - HDprintf("** WARNING **: HDF5 is terminating the Subfiling VFD after MPI_Finalize() was " - "called - an HDF5 ID was probably left unclosed\n"); + printf("** WARNING **: HDF5 is terminating the Subfiling VFD after MPI_Finalize() was " + "called - an HDF5 ID was probably left unclosed\n"); #endif } diff --git a/src/H5FDsubfiling/H5subfiling_common.c b/src/H5FDsubfiling/H5subfiling_common.c index 2874e64..6302b08 100644 --- a/src/H5FDsubfiling/H5subfiling_common.c +++ b/src/H5FDsubfiling/H5subfiling_common.c @@ -268,7 +268,7 @@ H5_get_subfiling_object(int64_t object_id) } #ifdef H5_SUBFILING_DEBUG else - HDprintf("%s: Unknown subfiling object type for ID %" PRId64 "\n", __func__, object_id); + printf("%s: Unknown subfiling object type for ID %" PRId64 "\n", __func__, object_id); #endif done: @@ -990,7 +990,7 @@ init_app_topology(H5FD_subfiling_params_t *subfiling_config, MPI_Comm comm, MPI_ errno = 0; ioc_select_val = HDstrtol(env_value, NULL, 0); if ((ERANGE == errno)) { - HDprintf("invalid value '%s' for " H5FD_SUBFILING_IOC_PER_NODE "\n", env_value); + printf("invalid value '%s' for " H5FD_SUBFILING_IOC_PER_NODE "\n", env_value); ioc_select_val = 1; } @@ -1017,9 +1017,9 @@ init_app_topology(H5FD_subfiling_params_t *subfiling_config, MPI_Comm comm, MPI_ errno = 0; ioc_select_val = HDstrtol(ioc_sel_str, NULL, 0); if ((ERANGE == errno) || (ioc_select_val <= 0)) { - HDprintf("invalid IOC selection strategy string '%s' for strategy " - "SELECT_IOC_EVERY_NTH_RANK; defaulting to SELECT_IOC_ONE_PER_NODE\n", - ioc_sel_str); + printf("invalid IOC selection strategy string '%s' for strategy " + "SELECT_IOC_EVERY_NTH_RANK; defaulting to SELECT_IOC_ONE_PER_NODE\n", + ioc_sel_str); ioc_select_val = 1; ioc_selection_type = SELECT_IOC_ONE_PER_NODE; @@ -1053,9 +1053,9 @@ init_app_topology(H5FD_subfiling_params_t *subfiling_config, MPI_Comm comm, MPI_ errno = 0; ioc_select_val = HDstrtol(ioc_sel_str, NULL, 0); if ((ERANGE == errno) || (ioc_select_val <= 0)) { - HDprintf("invalid IOC selection strategy string '%s' for strategy SELECT_IOC_TOTAL; " - "defaulting to SELECT_IOC_ONE_PER_NODE\n", - ioc_sel_str); + printf("invalid IOC selection strategy string '%s' for strategy SELECT_IOC_TOTAL; " + "defaulting to SELECT_IOC_ONE_PER_NODE\n", + ioc_sel_str); ioc_select_val = 1; ioc_selection_type = SELECT_IOC_ONE_PER_NODE; @@ -3122,7 +3122,7 @@ H5_subfiling_log(int64_t sf_context_id, const char *fmt, ...) /* Retrieve the subfiling object for the newly-created context ID */ if (NULL == (sf_context = H5_get_subfiling_object(sf_context_id))) { - HDprintf("%s: couldn't get subfiling object from context ID\n", __func__); + printf("%s: couldn't get subfiling object from context ID\n", __func__); goto done; } @@ -198,9 +198,9 @@ H5FL_term_package(void) /* Dump information about all the outstanding allocations */ while (trk != NULL) { /* Print information about the outstanding block */ - HDfprintf(stderr, "%s: Outstanding allocation:\n", __func__); - HDfprintf(stderr, "\tPtr: %p, File: %s, Function: %s, Line: %d\n", - (((unsigned char *)trk) + sizeof(H5FL_track_t)), trk->file, trk->func, trk->line); + fprintf(stderr, "%s: Outstanding allocation:\n", __func__); + fprintf(stderr, "\tPtr: %p, File: %s, Function: %s, Line: %d\n", + (((unsigned char *)trk) + sizeof(H5FL_track_t)), trk->file, trk->func, trk->line); H5CS_print_stack(trk->stack, stderr); /* Advance to next node */ @@ -622,8 +622,8 @@ H5FL__reg_term(void) tmp = H5FL_reg_gc_head.first->next; #ifdef H5FL_DEBUG - HDprintf("%s: head->name = %s, head->allocated = %d\n", __func__, H5FL_reg_gc_head.first->list->name, - (int)H5FL_reg_gc_head.first->list->allocated); + printf("%s: head->name = %s, head->allocated = %d\n", __func__, H5FL_reg_gc_head.first->list->name, + (int)H5FL_reg_gc_head.first->list->allocated); #endif /* H5FL_DEBUG */ /* Check if the list has allocations outstanding */ if (H5FL_reg_gc_head.first->list->allocated > 0) { @@ -1323,8 +1323,8 @@ H5FL__blk_term(void) tmp = H5FL_blk_gc_head.first->next; #ifdef H5FL_DEBUG - HDprintf("%s: head->name = %s, head->allocated = %d\n", __func__, H5FL_blk_gc_head.first->pq->name, - (int)H5FL_blk_gc_head.first->pq->allocated); + printf("%s: head->name = %s, head->allocated = %d\n", __func__, H5FL_blk_gc_head.first->pq->name, + (int)H5FL_blk_gc_head.first->pq->allocated); #endif /* H5FL_DEBUG */ /* Check if the list has allocations outstanding */ @@ -1866,8 +1866,8 @@ H5FL__arr_term(void) /* Check if the list has allocations outstanding */ #ifdef H5FL_DEBUG - HDprintf("%s: head->name = %s, head->allocated = %d\n", __func__, H5FL_arr_gc_head.first->list->name, - (int)H5FL_arr_gc_head.first->list->allocated); + printf("%s: head->name = %s, head->allocated = %d\n", __func__, H5FL_arr_gc_head.first->list->name, + (int)H5FL_arr_gc_head.first->list->allocated); #endif /* H5FL_DEBUG */ if (H5FL_arr_gc_head.first->list->allocated > 0) { /* Add free list to the list of nodes with allocations open still */ @@ -2457,8 +2457,8 @@ H5FL__fac_term_all(void) tmp = H5FL_fac_gc_head.first->next; #ifdef H5FL_DEBUG - HDprintf("%s: head->size = %d, head->allocated = %d\n", __func__, - (int)H5FL_fac_gc_head.first->list->size, (int)H5FL_fac_gc_head.first->list->allocated); + printf("%s: head->size = %d, head->allocated = %d\n", __func__, + (int)H5FL_fac_gc_head.first->list->size, (int)H5FL_fac_gc_head.first->list->allocated); #endif /* H5FL_DEBUG */ /* The list cannot have any allocations outstanding */ @@ -96,7 +96,7 @@ H5FS_create(H5F_t *f, haddr_t *fs_addr, const H5FS_create_t *fs_create, uint16_t FUNC_ENTER_NOAPI(NULL) #ifdef H5FS_DEBUG - HDfprintf(stderr, "%s: Creating free space manager, nclasses = %Zu\n", __func__, nclasses); + fprintf(stderr, "%s: Creating free space manager, nclasses = %Zu\n", __func__, nclasses); #endif /* H5FS_DEBUG */ /* Check arguments. */ @@ -142,8 +142,8 @@ H5FS_create(H5F_t *f, haddr_t *fs_addr, const H5FS_create_t *fs_create, uint16_t /* Set the return value */ ret_value = fspace; #ifdef H5FS_DEBUG - HDfprintf(stderr, "%s: fspace = %p, fspace->addr = %" PRIuHADDR "\n", __func__, (void *)fspace, - fspace->addr); + fprintf(stderr, "%s: fspace = %p, fspace->addr = %" PRIuHADDR "\n", __func__, (void *)fspace, + fspace->addr); #endif /* H5FS_DEBUG */ done: @@ -152,7 +152,7 @@ done: HDONE_ERROR(H5E_FSPACE, H5E_CANTFREE, NULL, "unable to destroy free space header") #ifdef H5FS_DEBUG - HDfprintf(stderr, "%s: Leaving, ret_value = %p\n", __func__, (void *)ret_value); + fprintf(stderr, "%s: Leaving, ret_value = %p\n", __func__, (void *)ret_value); #endif /* H5FS_DEBUG */ FUNC_LEAVE_NOAPI(ret_value) } /* H5FS_create() */ @@ -180,8 +180,8 @@ H5FS_open(H5F_t *f, haddr_t fs_addr, uint16_t nclasses, const H5FS_section_class FUNC_ENTER_NOAPI(NULL) #ifdef H5FS_DEBUG - HDfprintf(stderr, "%s: Opening free space manager, fs_addr = %" PRIuHADDR ", nclasses = %Zu\n", __func__, - fs_addr, nclasses); + fprintf(stderr, "%s: Opening free space manager, fs_addr = %" PRIuHADDR ", nclasses = %Zu\n", __func__, + fs_addr, nclasses); #endif /* H5FS_DEBUG */ /* Check arguments. */ @@ -201,11 +201,11 @@ H5FS_open(H5F_t *f, haddr_t fs_addr, uint16_t nclasses, const H5FS_section_class (fspace = (H5FS_t *)H5AC_protect(f, H5AC_FSPACE_HDR, fs_addr, &cache_udata, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_FSPACE, H5E_CANTPROTECT, NULL, "unable to load free space header") #ifdef H5FS_DEBUG - HDfprintf(stderr, "%s: fspace->sect_addr = %" PRIuHADDR "\n", __func__, fspace->sect_addr); - HDfprintf(stderr, "%s: fspace->sect_size = %" PRIuHSIZE "\n", __func__, fspace->sect_size); - HDfprintf(stderr, "%s: fspace->alloc_sect_size = %" PRIuHSIZE "\n", __func__, fspace->alloc_sect_size); - HDfprintf(stderr, "%s: fspace->sinfo = %p\n", __func__, (void *)fspace->sinfo); - HDfprintf(stderr, "%s: fspace->rc = %u\n", __func__, fspace->rc); + fprintf(stderr, "%s: fspace->sect_addr = %" PRIuHADDR "\n", __func__, fspace->sect_addr); + fprintf(stderr, "%s: fspace->sect_size = %" PRIuHSIZE "\n", __func__, fspace->sect_size); + fprintf(stderr, "%s: fspace->alloc_sect_size = %" PRIuHSIZE "\n", __func__, fspace->alloc_sect_size); + fprintf(stderr, "%s: fspace->sinfo = %p\n", __func__, (void *)fspace->sinfo); + fprintf(stderr, "%s: fspace->rc = %u\n", __func__, fspace->rc); #endif /* H5FS_DEBUG */ /* Increment the reference count on the free space manager header */ @@ -248,7 +248,7 @@ H5FS_delete(H5F_t *f, haddr_t fs_addr) FUNC_ENTER_NOAPI(FAIL) #ifdef H5FS_DEBUG - HDfprintf(stderr, "%s: Deleting free space manager, fs_addr = %" PRIuHADDR "\n", __func__, fs_addr); + fprintf(stderr, "%s: Deleting free space manager, fs_addr = %" PRIuHADDR "\n", __func__, fs_addr); #endif /* H5FS_DEBUG */ /* Check arguments. */ @@ -275,36 +275,36 @@ H5FS_delete(H5F_t *f, haddr_t fs_addr) HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "unable to check metadata cache status for free space section info") - HDfprintf(stderr, "%s: fspace_status = %0x: ", __func__, fspace_status); + fprintf(stderr, "%s: fspace_status = %0x: ", __func__, fspace_status); if (fspace_status) { hbool_t printed = FALSE; if (fspace_status & H5AC_ES__IN_CACHE) { - HDfprintf(stderr, "H5AC_ES__IN_CACHE"); + fprintf(stderr, "H5AC_ES__IN_CACHE"); printed = TRUE; } /* end if */ if (fspace_status & H5AC_ES__IS_DIRTY) { - HDfprintf(stderr, "%sH5AC_ES__IS_DIRTY", (printed ? " | " : "")); + fprintf(stderr, "%sH5AC_ES__IS_DIRTY", (printed ? " | " : "")); printed = TRUE; } /* end if */ if (fspace_status & H5AC_ES__IS_PROTECTED) { - HDfprintf(stderr, "%sH5AC_ES__IS_PROTECTED", (printed ? " | " : "")); + fprintf(stderr, "%sH5AC_ES__IS_PROTECTED", (printed ? " | " : "")); printed = TRUE; } /* end if */ if (fspace_status & H5AC_ES__IS_PINNED) { - HDfprintf(stderr, "%sH5AC_ES__IS_PINNED", (printed ? " | " : "")); + fprintf(stderr, "%sH5AC_ES__IS_PINNED", (printed ? " | " : "")); printed = TRUE; } /* end if */ if (fspace_status & H5AC_ES__IS_FLUSH_DEP_PARENT) { - HDfprintf(stderr, "%sH5AC_ES__IS_FLUSH_DEP_PARENT", (printed ? " | " : "")); + fprintf(stderr, "%sH5AC_ES__IS_FLUSH_DEP_PARENT", (printed ? " | " : "")); printed = TRUE; } /* end if */ if (fspace_status & H5AC_ES__IS_FLUSH_DEP_CHILD) { - HDfprintf(stderr, "%sH5AC_ES__IS_FLUSH_DEP_CHILD", (printed ? " | " : "")); + fprintf(stderr, "%sH5AC_ES__IS_FLUSH_DEP_CHILD", (printed ? " | " : "")); printed = TRUE; } /* end if */ } /* end if */ - HDfprintf(stderr, "\n"); + fprintf(stderr, "\n"); } #endif /* H5FS_DEBUG */ @@ -318,7 +318,7 @@ H5FS_delete(H5F_t *f, haddr_t fs_addr) /* Delete serialized section storage, if there are any */ #ifdef H5FS_DEBUG - HDfprintf(stderr, "%s: fspace->sect_addr = %" PRIuHADDR "\n", __func__, fspace->sect_addr); + fprintf(stderr, "%s: fspace->sect_addr = %" PRIuHADDR "\n", __func__, fspace->sect_addr); #endif /* H5FS_DEBUG */ if (fspace->serial_sect_count > 0) { unsigned sinfo_status = 0; /* Free space section info's status in the metadata cache */ @@ -339,7 +339,7 @@ H5FS_delete(H5F_t *f, haddr_t fs_addr) assert(!(sinfo_status & H5AC_ES__IS_PROTECTED)); #ifdef H5FS_DEBUG - HDfprintf(stderr, "%s: Expunging free space section info from cache\n", __func__); + fprintf(stderr, "%s: Expunging free space section info from cache\n", __func__); #endif /* H5FS_DEBUG */ /* Evict the free space section info from the metadata cache */ /* (Free file space) */ @@ -358,12 +358,12 @@ H5FS_delete(H5F_t *f, haddr_t fs_addr) } /* end block */ #ifdef H5FS_DEBUG - HDfprintf(stderr, "%s: Done expunging free space section info from cache\n", __func__); + fprintf(stderr, "%s: Done expunging free space section info from cache\n", __func__); #endif /* H5FS_DEBUG */ } /* end if */ else { #ifdef H5FS_DEBUG - HDfprintf(stderr, "%s: Deleting free space section info from file\n", __func__); + fprintf(stderr, "%s: Deleting free space section info from file\n", __func__); #endif /* H5FS_DEBUG */ /* Release the space in the file */ if (!H5F_IS_TMP_ADDR(f, fspace->sect_addr)) @@ -404,27 +404,26 @@ H5FS_close(H5F_t *f, H5FS_t *fspace) assert(f); assert(fspace); #ifdef H5FS_DEBUG - HDfprintf(stderr, "%s: Entering, fspace = %p, fspace->addr = %" PRIuHADDR ", fspace->sinfo = %p\n", - __func__, (void *)fspace, fspace->addr, (void *)fspace->sinfo); + fprintf(stderr, "%s: Entering, fspace = %p, fspace->addr = %" PRIuHADDR ", fspace->sinfo = %p\n", + __func__, (void *)fspace, fspace->addr, (void *)fspace->sinfo); #endif /* H5FS_DEBUG */ /* Check if section info is valid */ /* (i.e. the header "owns" the section info and it's not in the cache) */ if (fspace->sinfo) { #ifdef H5FS_DEBUG - HDfprintf(stderr, - "%s: fspace->tot_sect_count = %" PRIuHSIZE ", fspace->serial_sect_count = %" PRIuHSIZE - ", fspace->sect_addr = %" PRIuHADDR ", fspace->rc = %u\n", - __func__, fspace->tot_sect_count, fspace->serial_sect_count, fspace->sect_addr, fspace->rc); - HDfprintf(stderr, - "%s: fspace->alloc_sect_size = %" PRIuHSIZE ", fspace->sect_size = %" PRIuHSIZE "\n", - __func__, fspace->alloc_sect_size, fspace->sect_size); + fprintf(stderr, + "%s: fspace->tot_sect_count = %" PRIuHSIZE ", fspace->serial_sect_count = %" PRIuHSIZE + ", fspace->sect_addr = %" PRIuHADDR ", fspace->rc = %u\n", + __func__, fspace->tot_sect_count, fspace->serial_sect_count, fspace->sect_addr, fspace->rc); + fprintf(stderr, "%s: fspace->alloc_sect_size = %" PRIuHSIZE ", fspace->sect_size = %" PRIuHSIZE "\n", + __func__, fspace->alloc_sect_size, fspace->sect_size); #endif /* H5FS_DEBUG */ /* If there are sections to serialize, update them */ /* (if the free space manager is persistent) */ if (fspace->serial_sect_count > 0 && H5_addr_defined(fspace->addr)) { #ifdef H5FS_DEBUG - HDfprintf(stderr, "%s: Real sections to store in file\n", __func__); + fprintf(stderr, "%s: Real sections to store in file\n", __func__); #endif /* H5FS_DEBUG */ if (fspace->sinfo->dirty) { /* Check if the section info is "floating" */ @@ -463,7 +462,7 @@ H5FS_close(H5F_t *f, H5FS_t *fspace) } /* end if */ else { #ifdef H5FS_DEBUG - HDfprintf(stderr, "%s: NOT storing section info in file\n", __func__); + fprintf(stderr, "%s: NOT storing section info in file\n", __func__); #endif /* H5FS_DEBUG */ /* Check if space for the section info is allocated */ if (H5_addr_defined(fspace->sect_addr)) { @@ -472,7 +471,7 @@ H5FS_close(H5F_t *f, H5FS_t *fspace) assert(H5_addr_defined(fspace->addr)); #ifdef H5FS_DEBUG - HDfprintf(stderr, "%s: Section info allocated though\n", __func__); + fprintf(stderr, "%s: Section info allocated though\n", __func__); #endif /* H5FS_DEBUG */ /* Check if the section info is for the free space in the file */ /* (NOTE: This is the "bootstrapping" special case for the @@ -484,13 +483,12 @@ H5FS_close(H5F_t *f, H5FS_t *fspace) htri_t status; /* "can absorb" status for section into */ #ifdef H5FS_DEBUG - HDfprintf(stderr, "%s: Section info is for file free space\n", __func__); + fprintf(stderr, "%s: Section info is for file free space\n", __func__); #endif /* H5FS_DEBUG */ /* Try to shrink the file or absorb the section info into a block aggregator */ if (H5F_IS_TMP_ADDR(f, fspace->sect_addr)) { #ifdef H5FS_DEBUG - HDfprintf(stderr, "%s: Section info in temp. address space went 'go away'\n", - __func__); + fprintf(stderr, "%s: Section info in temp. address space went 'go away'\n", __func__); #endif /* H5FS_DEBUG */ /* Reset section info in header */ fspace->sect_addr = HADDR_UNDEF; @@ -511,13 +509,13 @@ H5FS_close(H5F_t *f, H5FS_t *fspace) * header to record it */ #ifdef H5FS_DEBUG - HDfprintf(stderr, "%s: Section info can't 'go away', header will own it\n", - __func__); + fprintf(stderr, "%s: Section info can't 'go away', header will own it\n", + __func__); #endif /* H5FS_DEBUG */ } /* end if */ else { #ifdef H5FS_DEBUG - HDfprintf(stderr, "%s: Section info went 'go away'\n", __func__); + fprintf(stderr, "%s: Section info went 'go away'\n", __func__); #endif /* H5FS_DEBUG */ /* Reset section info in header */ fspace->sect_addr = HADDR_UNDEF; @@ -536,7 +534,7 @@ H5FS_close(H5F_t *f, H5FS_t *fspace) fspace->alloc_sect_size; /* Previous size of section info in file */ #ifdef H5FS_DEBUG - HDfprintf(stderr, "%s: Section info is NOT for file free space\n", __func__); + fprintf(stderr, "%s: Section info is NOT for file free space\n", __func__); #endif /* H5FS_DEBUG */ /* Reset section info in header */ fspace->sect_addr = HADDR_UNDEF; @@ -576,7 +574,7 @@ H5FS_close(H5F_t *f, H5FS_t *fspace) done: #ifdef H5FS_DEBUG - HDfprintf(stderr, "%s: Leaving, ret_value = %d, fspace->rc = %u\n", __func__, ret_value, fspace->rc); + fprintf(stderr, "%s: Leaving, ret_value = %d, fspace->rc = %u\n", __func__, ret_value, fspace->rc); #endif /* H5FS_DEBUG */ FUNC_LEAVE_NOAPI(ret_value) } /* H5FS_close() */ @@ -709,8 +707,8 @@ H5FS__incr(H5FS_t *fspace) FUNC_ENTER_PACKAGE #ifdef H5FS_DEBUG - HDfprintf(stderr, "%s: Entering, fpace->addr = %" PRIuHADDR ", fspace->rc = %u\n", __func__, fspace->addr, - fspace->rc); + fprintf(stderr, "%s: Entering, fpace->addr = %" PRIuHADDR ", fspace->rc = %u\n", __func__, fspace->addr, + fspace->rc); #endif /* H5FS_DEBUG */ /* @@ -749,8 +747,8 @@ H5FS__decr(H5FS_t *fspace) FUNC_ENTER_PACKAGE #ifdef H5FS_DEBUG - HDfprintf(stderr, "%s: Entering, fpace->addr = %" PRIuHADDR ", fspace->rc = %u\n", __func__, fspace->addr, - fspace->rc); + fprintf(stderr, "%s: Entering, fpace->addr = %" PRIuHADDR ", fspace->rc = %u\n", __func__, fspace->addr, + fspace->rc); #endif /* H5FS_DEBUG */ /* diff --git a/src/H5FSdbg.c b/src/H5FSdbg.c index b1cd0b2..631ed7a 100644 --- a/src/H5FSdbg.c +++ b/src/H5FSdbg.c @@ -111,37 +111,37 @@ H5FS_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth) HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, FAIL, "unable to load free space header") /* Print opening message */ - HDfprintf(stream, "%*sFree Space Header...\n", indent, ""); + fprintf(stream, "%*sFree Space Header...\n", indent, ""); /* * Print the values. */ - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Free space client:", - (fspace->client == H5FS_CLIENT_FHEAP_ID - ? "Fractal heap" - : (fspace->client == H5FS_CLIENT_FILE_ID ? "File" : "Unknown"))); - HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, - "Total free space tracked:", fspace->tot_space); - HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, - "Total number of free space sections tracked:", fspace->tot_sect_count); - HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, - "Number of serializable free space sections tracked:", fspace->serial_sect_count); - HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, - "Number of ghost free space sections tracked:", fspace->ghost_sect_count); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, - "Number of free space section classes:", (unsigned)fspace->nclasses); - HDfprintf(stream, "%*s%-*s %u%%\n", indent, "", fwidth, "Shrink percent:", fspace->shrink_percent); - HDfprintf(stream, "%*s%-*s %u%%\n", indent, "", fwidth, "Expand percent:", fspace->expand_percent); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, - "# of bits for section address space:", fspace->max_sect_addr); - HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, - "Maximum section size:", fspace->max_sect_size); - HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, - "Serialized sections address:", fspace->sect_addr); - HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, - "Serialized sections size used:", fspace->sect_size); - HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, - "Serialized sections size allocated:", fspace->alloc_sect_size); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Free space client:", + (fspace->client == H5FS_CLIENT_FHEAP_ID + ? "Fractal heap" + : (fspace->client == H5FS_CLIENT_FILE_ID ? "File" : "Unknown"))); + fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, + "Total free space tracked:", fspace->tot_space); + fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, + "Total number of free space sections tracked:", fspace->tot_sect_count); + fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, + "Number of serializable free space sections tracked:", fspace->serial_sect_count); + fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, + "Number of ghost free space sections tracked:", fspace->ghost_sect_count); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, + "Number of free space section classes:", (unsigned)fspace->nclasses); + fprintf(stream, "%*s%-*s %u%%\n", indent, "", fwidth, "Shrink percent:", fspace->shrink_percent); + fprintf(stream, "%*s%-*s %u%%\n", indent, "", fwidth, "Expand percent:", fspace->expand_percent); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, + "# of bits for section address space:", fspace->max_sect_addr); + fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, + "Maximum section size:", fspace->max_sect_size); + fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, + "Serialized sections address:", fspace->sect_addr); + fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, + "Serialized sections size used:", fspace->sect_size); + fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, + "Serialized sections size allocated:", fspace->alloc_sect_size); done: if (fspace && H5AC_unprotect(f, H5AC_FSPACE_HDR, addr, fspace, H5AC__NO_FLAGS_SET) < 0) @@ -247,7 +247,7 @@ H5FS_sects_debug(H5F_t *f, haddr_t H5_ATTR_UNUSED addr, FILE *stream, int indent fspace = NULL; /* Print opening message */ - HDfprintf(stream, "%*sFree Space Sections...\n", indent, ""); + fprintf(stream, "%*sFree Space Sections...\n", indent, ""); /* * Print the values. @@ -265,7 +265,7 @@ H5FS_sects_debug(H5F_t *f, haddr_t H5_ATTR_UNUSED addr, FILE *stream, int indent case H5FS_NUM_CLIENT_ID: default: - HDfprintf(stream, "Unknown client!\n"); + fprintf(stream, "Unknown client!\n"); break; } /* end switch */ diff --git a/src/H5FSsection.c b/src/H5FSsection.c index 920fe88..60d0cc3 100644 --- a/src/H5FSsection.c +++ b/src/H5FSsection.c @@ -122,7 +122,7 @@ H5FS__sinfo_new(H5F_t *f, H5FS_t *fspace) assert(f); assert(fspace); #ifdef H5FS_SINFO_DEBUG - HDfprintf(stderr, "%s: fspace->addr = %" PRIuHADDR "\n", __func__, fspace->addr); + fprintf(stderr, "%s: fspace->addr = %" PRIuHADDR "\n", __func__, fspace->addr); #endif /* H5FS_SINFO_DEBUG */ /* Allocate the free space header */ @@ -135,11 +135,11 @@ H5FS__sinfo_new(H5F_t *f, H5FS_t *fspace) sinfo->sect_off_size = (fspace->max_sect_addr + 7) / 8; sinfo->sect_len_size = H5VM_limit_enc_size((uint64_t)fspace->max_sect_size); #ifdef H5FS_SINFO_DEBUG - HDfprintf(stderr, "%s: fspace->max_sect_size = %" PRIuHSIZE "\n", __func__, fspace->max_sect_size); - HDfprintf(stderr, "%s: fspace->max_sect_addr = %u\n", __func__, fspace->max_sect_addr); - HDfprintf(stderr, "%s: sinfo->nbins = %u\n", __func__, sinfo->nbins); - HDfprintf(stderr, "%s: sinfo->sect_off_size = %u, sinfo->sect_len_size = %u\n", __func__, - sinfo->sect_off_size, sinfo->sect_len_size); + fprintf(stderr, "%s: fspace->max_sect_size = %" PRIuHSIZE "\n", __func__, fspace->max_sect_size); + fprintf(stderr, "%s: fspace->max_sect_addr = %u\n", __func__, fspace->max_sect_addr); + fprintf(stderr, "%s: sinfo->nbins = %u\n", __func__, sinfo->nbins); + fprintf(stderr, "%s: sinfo->sect_off_size = %u, sinfo->sect_len_size = %u\n", __func__, + sinfo->sect_off_size, sinfo->sect_len_size); #endif /* H5FS_SINFO_DEBUG */ /* Allocate space for the section size bins */ @@ -199,12 +199,12 @@ H5FS__sinfo_lock(H5F_t *f, H5FS_t *fspace, unsigned accmode) FUNC_ENTER_PACKAGE #ifdef H5FS_SINFO_DEBUG - HDfprintf(stderr, - "%s: Called, fspace->addr = %" PRIuHADDR ", fspace->sinfo = %p, fspace->sect_addr = %" PRIuHADDR - "\n", - __func__, fspace->addr, (void *)fspace->sinfo, fspace->sect_addr); - HDfprintf(stderr, "%s: fspace->alloc_sect_size = %" PRIuHSIZE ", fspace->sect_size = %" PRIuHSIZE "\n", - __func__, fspace->alloc_sect_size, fspace->sect_size); + fprintf(stderr, + "%s: Called, fspace->addr = %" PRIuHADDR ", fspace->sinfo = %p, fspace->sect_addr = %" PRIuHADDR + "\n", + __func__, fspace->addr, (void *)fspace->sinfo, fspace->sect_addr); + fprintf(stderr, "%s: fspace->alloc_sect_size = %" PRIuHSIZE ", fspace->sect_size = %" PRIuHSIZE "\n", + __func__, fspace->alloc_sect_size, fspace->sect_size); #endif /* H5FS_SINFO_DEBUG */ /* Check arguments. */ @@ -252,8 +252,8 @@ H5FS__sinfo_lock(H5F_t *f, H5FS_t *fspace, unsigned accmode) assert(H5_addr_defined(fspace->addr)); #ifdef H5FS_SINFO_DEBUG - HDfprintf(stderr, "%s: Reading in existing sections, fspace->sect_addr = %" PRIuHADDR "\n", - __func__, fspace->sect_addr); + fprintf(stderr, "%s: Reading in existing sections, fspace->sect_addr = %" PRIuHADDR "\n", + __func__, fspace->sect_addr); #endif /* H5FS_SINFO_DEBUG */ /* Protect the free space sections */ cache_udata.f = f; @@ -268,7 +268,7 @@ H5FS__sinfo_lock(H5F_t *f, H5FS_t *fspace, unsigned accmode) } /* end if */ else { #ifdef H5FS_SINFO_DEBUG - HDfprintf(stderr, "%s: Creating new section info\n", __func__); + fprintf(stderr, "%s: Creating new section info\n", __func__); #endif /* H5FS_SINFO_DEBUG */ /* Sanity check */ assert(fspace->tot_sect_count == 0); @@ -290,12 +290,12 @@ H5FS__sinfo_lock(H5F_t *f, H5FS_t *fspace, unsigned accmode) done: #ifdef H5FS_SINFO_DEBUG - HDfprintf(stderr, - "%s: Leaving, fspace->addr = %" PRIuHADDR - ", fspace->sinfo = %p, fspace->sect_addr = %" PRIuHADDR "\n", - __func__, fspace->addr, (void *)fspace->sinfo, fspace->sect_addr); - HDfprintf(stderr, "%s: fspace->alloc_sect_size = %" PRIuHSIZE ", fspace->sect_size = %" PRIuHSIZE "\n", - __func__, fspace->alloc_sect_size, fspace->sect_size); + fprintf(stderr, + "%s: Leaving, fspace->addr = %" PRIuHADDR ", fspace->sinfo = %p, fspace->sect_addr = %" PRIuHADDR + "\n", + __func__, fspace->addr, (void *)fspace->sinfo, fspace->sect_addr); + fprintf(stderr, "%s: fspace->alloc_sect_size = %" PRIuHSIZE ", fspace->sect_size = %" PRIuHSIZE "\n", + __func__, fspace->alloc_sect_size, fspace->sect_size); #endif /* H5FS_SINFO_DEBUG */ FUNC_LEAVE_NOAPI(ret_value) } /* H5FS__sinfo_lock() */ @@ -334,16 +334,14 @@ H5FS__sinfo_unlock(H5F_t *f, H5FS_t *fspace, hbool_t modified) FUNC_ENTER_PACKAGE #ifdef H5FS_SINFO_DEBUG - HDfprintf(stderr, - "%s: Called, modified = %d, fspace->addr = %" PRIuHADDR ", fspace->sect_addr = %" PRIuHADDR - "\n", - __func__, modified, fspace->addr, fspace->sect_addr); - HDfprintf( - stderr, - "%s: fspace->sinfo_lock_count = %u, fspace->sinfo_modified = %d, fspace->sinfo_protected = %d\n", - __func__, fspace->sinfo_lock_count, fspace->sinfo_modified, fspace->sinfo_protected); - HDfprintf(stderr, "%s: fspace->alloc_sect_size = %" PRIuHSIZE ", fspace->sect_size = %" PRIuHSIZE "\n", - __func__, fspace->alloc_sect_size, fspace->sect_size); + fprintf(stderr, + "%s: Called, modified = %d, fspace->addr = %" PRIuHADDR ", fspace->sect_addr = %" PRIuHADDR "\n", + __func__, modified, fspace->addr, fspace->sect_addr); + fprintf(stderr, + "%s: fspace->sinfo_lock_count = %u, fspace->sinfo_modified = %d, fspace->sinfo_protected = %d\n", + __func__, fspace->sinfo_lock_count, fspace->sinfo_modified, fspace->sinfo_protected); + fprintf(stderr, "%s: fspace->alloc_sect_size = %" PRIuHSIZE ", fspace->sect_size = %" PRIuHSIZE "\n", + __func__, fspace->alloc_sect_size, fspace->sect_size); #endif /* H5FS_SINFO_DEBUG */ /* Check arguments. */ @@ -418,7 +416,7 @@ H5FS__sinfo_unlock(H5F_t *f, H5FS_t *fspace, hbool_t modified) /* (Possibly dirty) */ /* (Possibly taking ownership from the cache) */ #ifdef H5FS_SINFO_DEBUG - HDfprintf(stderr, "%s: Unprotecting section info, cache_flags = %u\n", __func__, cache_flags); + fprintf(stderr, "%s: Unprotecting section info, cache_flags = %u\n", __func__, cache_flags); #endif /* H5FS_SINFO_DEBUG */ if (H5AC_unprotect(f, H5AC_FSPACE_SINFO, fspace->sect_addr, fspace->sinfo, cache_flags) < 0) HGOTO_ERROR(H5E_FSPACE, H5E_CANTUNPROTECT, FAIL, "unable to release free space section info") @@ -429,14 +427,14 @@ H5FS__sinfo_unlock(H5F_t *f, H5FS_t *fspace, hbool_t modified) /* Check if header is taking ownership of section info */ if ((cache_flags & H5AC__TAKE_OWNERSHIP_FLAG)) { #ifdef H5FS_SINFO_DEBUG - HDfprintf(stderr, "%s: Taking ownership of section info\n", __func__); + fprintf(stderr, "%s: Taking ownership of section info\n", __func__); #endif /* H5FS_SINFO_DEBUG */ /* Set flag to release section info space in file */ release_sinfo_space = TRUE; } /* end if */ else { #ifdef H5FS_SINFO_DEBUG - HDfprintf(stderr, "%s: Relinquishing section info ownership\n", __func__); + fprintf(stderr, "%s: Relinquishing section info ownership\n", __func__); #endif /* H5FS_SINFO_DEBUG */ /* Free space header relinquished ownership of section info */ fspace->sinfo = NULL; @@ -494,10 +492,10 @@ H5FS__sinfo_unlock(H5F_t *f, H5FS_t *fspace, hbool_t modified) "unable to mark free space header as dirty") #ifdef H5FS_SINFO_DEBUG - HDfprintf(stderr, - "%s: Freeing section info on disk, old_sect_addr = %" PRIuHADDR - ", old_alloc_sect_size = %" PRIuHSIZE "\n", - __func__, old_sect_addr, old_alloc_sect_size); + fprintf(stderr, + "%s: Freeing section info on disk, old_sect_addr = %" PRIuHADDR + ", old_alloc_sect_size = %" PRIuHSIZE "\n", + __func__, old_sect_addr, old_alloc_sect_size); #endif /* H5FS_SINFO_DEBUG */ /* Release space for section info in file */ if (!H5F_IS_TMP_ADDR(f, old_sect_addr)) @@ -508,7 +506,7 @@ H5FS__sinfo_unlock(H5F_t *f, H5FS_t *fspace, hbool_t modified) done: #ifdef H5FS_SINFO_DEBUG - HDfprintf(stderr, "%s: Leaving, ret_value = %d\n", __func__, ret_value); + fprintf(stderr, "%s: Leaving, ret_value = %d\n", __func__, ret_value); #endif /* H5FS_SINFO_DEBUG */ FUNC_LEAVE_NOAPI(ret_value) } /* H5FS__sinfo_unlock() */ @@ -1349,9 +1347,9 @@ H5FS_sect_add(H5F_t *f, H5FS_t *fspace, H5FS_section_info_t *sect, unsigned flag FUNC_ENTER_NOAPI(FAIL) #ifdef H5FS_SINFO_DEBUG - HDfprintf(stderr, "%s: *sect = {%" PRIuHADDR ", %" PRIuHSIZE ", %u, %s}\n", __func__, sect->addr, - sect->size, sect->type, - (sect->state == H5FS_SECT_LIVE ? "H5FS_SECT_LIVE" : "H5FS_SECT_SERIALIZED")); + fprintf(stderr, "%s: *sect = {%" PRIuHADDR ", %" PRIuHSIZE ", %u, %s}\n", __func__, sect->addr, + sect->size, sect->type, + (sect->state == H5FS_SECT_LIVE ? "H5FS_SECT_LIVE" : "H5FS_SECT_SERIALIZED")); #endif /* H5FS_SINFO_DEBUG */ /* Check arguments. */ @@ -1374,7 +1372,7 @@ H5FS_sect_add(H5F_t *f, H5FS_t *fspace, H5FS_section_info_t *sect, unsigned flag /* Check for merging returned space with existing section node */ if (flags & H5FS_ADD_RETURNED_SPACE) { #ifdef H5FS_SINFO_DEBUG - HDfprintf(stderr, "%s: Returning space\n", __func__); + fprintf(stderr, "%s: Returning space\n", __func__); #endif /* H5FS_SINFO_DEBUG */ /* Attempt to merge returned section with existing sections */ @@ -1391,7 +1389,7 @@ H5FS_sect_add(H5F_t *f, H5FS_t *fspace, H5FS_section_info_t *sect, unsigned flag HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, "can't insert free space section into skip list") #ifdef H5FS_SINFO_DEBUG - HDfprintf(stderr, "%s: fspace->tot_space = %" PRIuHSIZE "\n", __func__, fspace->tot_space); + fprintf(stderr, "%s: fspace->tot_space = %" PRIuHSIZE "\n", __func__, fspace->tot_space); #endif /* H5FS_SINFO_DEBUG */ /* Mark free space sections as changed */ /* (if adding sections while deserializing sections, don't set the flag) */ @@ -1408,7 +1406,7 @@ done: H5FS__assert(fspace); #endif /* H5FS_DEBUG_ASSERT */ #ifdef H5FS_SINFO_DEBUG - HDfprintf(stderr, "%s: Leaving, ret_value = %d\n", __func__, ret_value); + fprintf(stderr, "%s: Leaving, ret_value = %d\n", __func__, ret_value); #endif /* H5FS_SINFO_DEBUG */ FUNC_LEAVE_NOAPI(ret_value) } /* H5FS_sect_add() */ @@ -1436,8 +1434,8 @@ H5FS_sect_try_extend(H5F_t *f, H5FS_t *fspace, haddr_t addr, hsize_t size, hsize FUNC_ENTER_NOAPI(FAIL) #ifdef H5FS_SINFO_DEBUG - HDfprintf(stderr, "%s: addr = %" PRIuHADDR ", size = %" PRIuHSIZE ", extra_requested = %" PRIuHSIZE "\n", - __func__, addr, size, extra_requested); + fprintf(stderr, "%s: addr = %" PRIuHADDR ", size = %" PRIuHSIZE ", extra_requested = %" PRIuHSIZE "\n", + __func__, addr, size, extra_requested); #endif /* H5FS_SINFO_DEBUG */ /* Check arguments. */ @@ -1449,10 +1447,9 @@ H5FS_sect_try_extend(H5F_t *f, H5FS_t *fspace, haddr_t addr, hsize_t size, hsize /* Check for any sections on free space list */ #ifdef H5FS_SINFO_DEBUG - HDfprintf(stderr, "%s: fspace->tot_sect_count = %" PRIuHSIZE "\n", __func__, fspace->tot_sect_count); - HDfprintf(stderr, "%s: fspace->serial_sect_count = %" PRIuHSIZE "\n", __func__, - fspace->serial_sect_count); - HDfprintf(stderr, "%s: fspace->ghost_sect_count = %" PRIuHSIZE "\n", __func__, fspace->ghost_sect_count); + fprintf(stderr, "%s: fspace->tot_sect_count = %" PRIuHSIZE "\n", __func__, fspace->tot_sect_count); + fprintf(stderr, "%s: fspace->serial_sect_count = %" PRIuHSIZE "\n", __func__, fspace->serial_sect_count); + fprintf(stderr, "%s: fspace->ghost_sect_count = %" PRIuHSIZE "\n", __func__, fspace->ghost_sect_count); #endif /* H5FS_SINFO_DEBUG */ if (fspace->tot_sect_count > 0) { H5FS_section_info_t *sect; /* Temporary free space section */ diff --git a/src/H5Fdbg.c b/src/H5Fdbg.c index f425820..2d22efa 100644 --- a/src/H5Fdbg.c +++ b/src/H5Fdbg.c @@ -64,55 +64,55 @@ H5F_debug(H5F_t *f, FILE *stream, int indent, int fwidth) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get userblock size") /* debug */ - HDfprintf(stream, "%*sFile Super Block...\n", indent, ""); + fprintf(stream, "%*sFile Super Block...\n", indent, ""); - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "File name (as opened):", H5F_OPEN_NAME(f)); - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, - "File name (after resolving symlinks):", H5F_ACTUAL_NAME(f)); - HDfprintf(stream, "%*s%-*s 0x%08x\n", indent, "", fwidth, "File access flags", f->shared->flags); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "File open reference count:", f->shared->nrefs); - HDfprintf(stream, "%*s%-*s %" PRIuHADDR " (abs)\n", indent, "", fwidth, - "Address of super block:", f->shared->sblock->base_addr); - HDfprintf(stream, "%*s%-*s %" PRIuHSIZE " bytes\n", indent, "", fwidth, - "Size of userblock:", userblock_size); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "File name (as opened):", H5F_OPEN_NAME(f)); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, + "File name (after resolving symlinks):", H5F_ACTUAL_NAME(f)); + fprintf(stream, "%*s%-*s 0x%08x\n", indent, "", fwidth, "File access flags", f->shared->flags); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "File open reference count:", f->shared->nrefs); + fprintf(stream, "%*s%-*s %" PRIuHADDR " (abs)\n", indent, "", fwidth, + "Address of super block:", f->shared->sblock->base_addr); + fprintf(stream, "%*s%-*s %" PRIuHSIZE " bytes\n", indent, "", fwidth, + "Size of userblock:", userblock_size); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, - "Superblock version number:", f->shared->sblock->super_vers); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, + "Superblock version number:", f->shared->sblock->super_vers); /* Hard-wired versions */ - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, - "Free list version number:", (unsigned)HDF5_FREESPACE_VERSION); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, - "Root group symbol table entry version number:", (unsigned)HDF5_OBJECTDIR_VERSION); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, - "Shared header version number:", (unsigned)HDF5_SHAREDHEADER_VERSION); - - HDfprintf(stream, "%*s%-*s %u bytes\n", indent, "", fwidth, - "Size of file offsets (haddr_t type):", (unsigned)f->shared->sizeof_addr); - HDfprintf(stream, "%*s%-*s %u bytes\n", indent, "", fwidth, - "Size of file lengths (hsize_t type):", (unsigned)f->shared->sizeof_size); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, - "Symbol table leaf node 1/2 rank:", f->shared->sblock->sym_leaf_k); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, - "Symbol table internal node 1/2 rank:", f->shared->sblock->btree_k[H5B_SNODE_ID]); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, - "Indexed storage internal node 1/2 rank:", f->shared->sblock->btree_k[H5B_CHUNK_ID]); - HDfprintf(stream, "%*s%-*s 0x%02x\n", indent, "", fwidth, - "File status flags:", (unsigned)(f->shared->sblock->status_flags)); - HDfprintf(stream, "%*s%-*s %" PRIuHADDR " (rel)\n", indent, "", fwidth, - "Superblock extension address:", f->shared->sblock->ext_addr); - HDfprintf(stream, "%*s%-*s %" PRIuHADDR " (rel)\n", indent, "", fwidth, - "Shared object header message table address:", f->shared->sohm_addr); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, - "Shared object header message version number:", (unsigned)f->shared->sohm_vers); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, - "Number of shared object header message indexes:", (unsigned)f->shared->sohm_nindexes); - - HDfprintf(stream, "%*s%-*s %" PRIuHADDR " (rel)\n", indent, "", fwidth, - "Address of driver information block:", f->shared->sblock->driver_addr); - - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, - "Root group symbol table entry:", f->shared->root_grp ? "" : "(none)"); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, + "Free list version number:", (unsigned)HDF5_FREESPACE_VERSION); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, + "Root group symbol table entry version number:", (unsigned)HDF5_OBJECTDIR_VERSION); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, + "Shared header version number:", (unsigned)HDF5_SHAREDHEADER_VERSION); + + fprintf(stream, "%*s%-*s %u bytes\n", indent, "", fwidth, + "Size of file offsets (haddr_t type):", (unsigned)f->shared->sizeof_addr); + fprintf(stream, "%*s%-*s %u bytes\n", indent, "", fwidth, + "Size of file lengths (hsize_t type):", (unsigned)f->shared->sizeof_size); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, + "Symbol table leaf node 1/2 rank:", f->shared->sblock->sym_leaf_k); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, + "Symbol table internal node 1/2 rank:", f->shared->sblock->btree_k[H5B_SNODE_ID]); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, + "Indexed storage internal node 1/2 rank:", f->shared->sblock->btree_k[H5B_CHUNK_ID]); + fprintf(stream, "%*s%-*s 0x%02x\n", indent, "", fwidth, + "File status flags:", (unsigned)(f->shared->sblock->status_flags)); + fprintf(stream, "%*s%-*s %" PRIuHADDR " (rel)\n", indent, "", fwidth, + "Superblock extension address:", f->shared->sblock->ext_addr); + fprintf(stream, "%*s%-*s %" PRIuHADDR " (rel)\n", indent, "", fwidth, + "Shared object header message table address:", f->shared->sohm_addr); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, + "Shared object header message version number:", (unsigned)f->shared->sohm_vers); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, + "Number of shared object header message indexes:", (unsigned)f->shared->sohm_nindexes); + + fprintf(stream, "%*s%-*s %" PRIuHADDR " (rel)\n", indent, "", fwidth, + "Address of driver information block:", f->shared->sblock->driver_addr); + + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, + "Root group symbol table entry:", f->shared->root_grp ? "" : "(none)"); if (f->shared->root_grp) { if (f->shared->sblock->root_ent) /* Use real root group symbol table entry */ H5G__ent_debug(f->shared->sblock->root_ent, stream, indent + 3, MAX(0, fwidth - 3), NULL); diff --git a/src/H5Gbtree2.c b/src/H5Gbtree2.c index 3094386..4b5b308 100644 --- a/src/H5Gbtree2.c +++ b/src/H5Gbtree2.c @@ -335,9 +335,9 @@ H5G__dense_btree2_name_debug(FILE *stream, int indent, int fwidth, const void *_ FUNC_ENTER_PACKAGE_NOERR - HDfprintf(stream, "%*s%-*s {%x, ", indent, "", fwidth, "Record:", (unsigned)nrecord->hash); + fprintf(stream, "%*s%-*s {%x, ", indent, "", fwidth, "Record:", (unsigned)nrecord->hash); for (u = 0; u < H5G_DENSE_FHEAP_ID_LEN; u++) - HDfprintf(stderr, "%02x%s", nrecord->id[u], (u < (H5G_DENSE_FHEAP_ID_LEN - 1) ? " " : "}\n")); + fprintf(stderr, "%02x%s", nrecord->id[u], (u < (H5G_DENSE_FHEAP_ID_LEN - 1) ? " " : "}\n")); FUNC_LEAVE_NOAPI(SUCCEED) } /* H5G__dense_btree2_name_debug() */ @@ -483,9 +483,9 @@ H5G__dense_btree2_corder_debug(FILE *stream, int indent, int fwidth, const void FUNC_ENTER_PACKAGE_NOERR - HDfprintf(stream, "%*s%-*s {%llu, ", indent, "", fwidth, "Record:", (unsigned long long)nrecord->corder); + fprintf(stream, "%*s%-*s {%llu, ", indent, "", fwidth, "Record:", (unsigned long long)nrecord->corder); for (u = 0; u < H5G_DENSE_FHEAP_ID_LEN; u++) - HDfprintf(stderr, "%02x%s", nrecord->id[u], (u < (H5G_DENSE_FHEAP_ID_LEN - 1) ? " " : "}\n")); + fprintf(stderr, "%02x%s", nrecord->id[u], (u < (H5G_DENSE_FHEAP_ID_LEN - 1) ? " " : "}\n")); FUNC_LEAVE_NOAPI(SUCCEED) } /* H5G__dense_btree2_corder_debug() */ diff --git a/src/H5Gent.c b/src/H5Gent.c index 2a4b693..0fdfd84 100644 --- a/src/H5Gent.c +++ b/src/H5Gent.c @@ -527,47 +527,47 @@ H5G__ent_debug(const H5G_entry_t *ent, FILE *stream, int indent, int fwidth, con nested_indent = indent + 3; nested_fwidth = MAX(0, fwidth - 3); - HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth, - "Name offset into private heap:", (unsigned long)(ent->name_off)); + fprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth, + "Name offset into private heap:", (unsigned long)(ent->name_off)); - HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Object header address:", ent->header); + fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Object header address:", ent->header); - HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "Cache info type:"); + fprintf(stream, "%*s%-*s ", indent, "", fwidth, "Cache info type:"); switch (ent->type) { case H5G_NOTHING_CACHED: - HDfprintf(stream, "Nothing Cached\n"); + fprintf(stream, "Nothing Cached\n"); break; case H5G_CACHED_STAB: - HDfprintf(stream, "Symbol Table\n"); + fprintf(stream, "Symbol Table\n"); - HDfprintf(stream, "%*s%-*s\n", indent, "", fwidth, "Cached entry information:"); - HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", nested_indent, "", nested_fwidth, - "B-tree address:", ent->cache.stab.btree_addr); + fprintf(stream, "%*s%-*s\n", indent, "", fwidth, "Cached entry information:"); + fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", nested_indent, "", nested_fwidth, + "B-tree address:", ent->cache.stab.btree_addr); - HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", nested_indent, "", nested_fwidth, - "Heap address:", ent->cache.stab.heap_addr); + fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", nested_indent, "", nested_fwidth, + "Heap address:", ent->cache.stab.heap_addr); break; case H5G_CACHED_SLINK: - HDfprintf(stream, "Symbolic Link\n"); - HDfprintf(stream, "%*s%-*s\n", indent, "", fwidth, "Cached information:"); - HDfprintf(stream, "%*s%-*s %lu\n", nested_indent, "", nested_fwidth, - "Link value offset:", (unsigned long)(ent->cache.slink.lval_offset)); + fprintf(stream, "Symbolic Link\n"); + fprintf(stream, "%*s%-*s\n", indent, "", fwidth, "Cached information:"); + fprintf(stream, "%*s%-*s %lu\n", nested_indent, "", nested_fwidth, + "Link value offset:", (unsigned long)(ent->cache.slink.lval_offset)); if (heap) { lval = (const char *)H5HL_offset_into(heap, ent->cache.slink.lval_offset); - HDfprintf(stream, "%*s%-*s %s\n", nested_indent, "", nested_fwidth, - "Link value:", (lval == NULL) ? "" : lval); + fprintf(stream, "%*s%-*s %s\n", nested_indent, "", nested_fwidth, + "Link value:", (lval == NULL) ? "" : lval); } /* end if */ else - HDfprintf(stream, "%*s%-*s\n", nested_indent, "", nested_fwidth, - "Warning: Invalid heap address given, name not displayed!"); + fprintf(stream, "%*s%-*s\n", nested_indent, "", nested_fwidth, + "Warning: Invalid heap address given, name not displayed!"); break; case H5G_CACHED_ERROR: case H5G_NCACHED: default: - HDfprintf(stream, "*** Unknown symbol type %d\n", ent->type); + fprintf(stream, "*** Unknown symbol type %d\n", ent->type); break; } /* end switch */ diff --git a/src/H5Gnode.c b/src/H5Gnode.c index c68a919..5068498 100644 --- a/src/H5Gnode.c +++ b/src/H5Gnode.c @@ -224,18 +224,18 @@ H5G__node_debug_key(FILE *stream, int indent, int fwidth, const void *_key, cons assert(key); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Heap offset:", (unsigned)key->offset); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Heap offset:", (unsigned)key->offset); if (udata->heap) { const char *s; - HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "Name:"); + fprintf(stream, "%*s%-*s ", indent, "", fwidth, "Name:"); if ((s = (const char *)H5HL_offset_into(udata->heap, key->offset)) != NULL) - HDfprintf(stream, "%s\n", s); + fprintf(stream, "%s\n", s); } /* end if */ else - HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "Cannot get name; heap address not specified\n"); + fprintf(stream, "%*s%-*s ", indent, "", fwidth, "Cannot get name; heap address not specified\n"); FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5G__node_debug_key() */ @@ -1478,28 +1478,27 @@ H5G_node_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, had HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, FAIL, "unable to debug B-tree node"); } /* end if */ else { - HDfprintf(stream, "%*sSymbol Table Node...\n", indent, ""); - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, - "Dirty:", sn->cache_info.is_dirty ? "Yes" : "No"); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, - "Size of Node (in bytes):", (unsigned)sn->node_size); - HDfprintf(stream, "%*s%-*s %u of %u\n", indent, "", fwidth, "Number of Symbols:", sn->nsyms, - (unsigned)(2 * H5F_SYM_LEAF_K(f))); + fprintf(stream, "%*sSymbol Table Node...\n", indent, ""); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Dirty:", sn->cache_info.is_dirty ? "Yes" : "No"); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, + "Size of Node (in bytes):", (unsigned)sn->node_size); + fprintf(stream, "%*s%-*s %u of %u\n", indent, "", fwidth, "Number of Symbols:", sn->nsyms, + (unsigned)(2 * H5F_SYM_LEAF_K(f))); indent += 3; fwidth = MAX(0, fwidth - 3); for (u = 0; u < sn->nsyms; u++) { - HDfprintf(stream, "%*sSymbol %u:\n", indent - 3, "", u); + fprintf(stream, "%*sSymbol %u:\n", indent - 3, "", u); if (heap) { const char *s = (const char *)H5HL_offset_into(heap, sn->entry[u].name_off); if (s) - HDfprintf(stream, "%*s%-*s `%s'\n", indent, "", fwidth, "Name:", s); + fprintf(stream, "%*s%-*s `%s'\n", indent, "", fwidth, "Name:", s); } /* end if */ else - HDfprintf(stream, "%*s%-*s\n", indent, "", fwidth, - "Warning: Invalid heap address given, name not displayed!"); + fprintf(stream, "%*s%-*s\n", indent, "", fwidth, + "Warning: Invalid heap address given, name not displayed!"); H5G__ent_debug(sn->entry + u, stream, indent, fwidth, heap); } /* end for */ @@ -436,7 +436,7 @@ H5HF_get_obj_len(H5HF_t *fh, const void *_id, size_t *obj_len_p) HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't get 'tiny' object's length") } /* end if */ else { - HDfprintf(stderr, "%s: Heap ID type not supported yet!\n", __func__); + fprintf(stderr, "%s: Heap ID type not supported yet!\n", __func__); HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet") } /* end else */ @@ -496,7 +496,7 @@ H5HF_get_obj_off(H5HF_t *fh, const void *_id, hsize_t *obj_off_p) *obj_off_p = (hsize_t)0; } /* end if */ else { - HDfprintf(stderr, "%s: Heap ID type not supported yet!\n", __func__); + fprintf(stderr, "%s: Heap ID type not supported yet!\n", __func__); HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet") } /* end else */ @@ -559,7 +559,7 @@ H5HF_read(H5HF_t *fh, const void *_id, void *obj /*out*/) HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't read 'tiny' object from fractal heap") } /* end if */ else { - HDfprintf(stderr, "%s: Heap ID type not supported yet!\n", __func__); + fprintf(stderr, "%s: Heap ID type not supported yet!\n", __func__); HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet") } /* end else */ @@ -635,7 +635,7 @@ H5HF_write(H5HF_t *fh, void *_id, hbool_t H5_ATTR_UNUSED *id_changed, const void HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "modifying 'tiny' object not supported yet") } /* end if */ else { - HDfprintf(stderr, "%s: Heap ID type not supported yet!\n", __func__); + fprintf(stderr, "%s: Heap ID type not supported yet!\n", __func__); HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet") } /* end else */ @@ -703,7 +703,7 @@ H5HF_op(H5HF_t *fh, const void *_id, H5HF_operator_t op, void *op_data) HGOTO_ERROR(H5E_HEAP, H5E_CANTOPERATE, FAIL, "can't operate on 'tiny' object from fractal heap") } /* end if */ else { - HDfprintf(stderr, "%s: Heap ID type not supported yet!\n", __func__); + fprintf(stderr, "%s: Heap ID type not supported yet!\n", __func__); HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet") } /* end else */ @@ -766,7 +766,7 @@ H5HF_remove(H5HF_t *fh, const void *_id) HGOTO_ERROR(H5E_HEAP, H5E_CANTREMOVE, FAIL, "can't remove 'tiny' object from fractal heap") } /* end if */ else { - HDfprintf(stderr, "%s: Heap ID type not supported yet!\n", __func__); + fprintf(stderr, "%s: Heap ID type not supported yet!\n", __func__); HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet") } /* end else */ diff --git a/src/H5HFbtree2.c b/src/H5HFbtree2.c index 41c2322..fc43fe0 100644 --- a/src/H5HFbtree2.c +++ b/src/H5HFbtree2.c @@ -434,8 +434,8 @@ H5HF__huge_bt2_indir_debug(FILE *stream, int indent, int fwidth, const void *_nr FUNC_ENTER_PACKAGE_NOERR - HDfprintf(stream, "%*s%-*s {%" PRIuHADDR ", %" PRIuHSIZE ", %" PRIuHSIZE "}\n", indent, "", fwidth, - "Record:", nrecord->addr, nrecord->len, nrecord->id); + fprintf(stream, "%*s%-*s {%" PRIuHADDR ", %" PRIuHSIZE ", %" PRIuHSIZE "}\n", indent, "", fwidth, + "Record:", nrecord->addr, nrecord->len, nrecord->id); FUNC_LEAVE_NOAPI(SUCCEED) } /* H5HF__huge_bt2_indir_debug() */ @@ -636,9 +636,9 @@ H5HF__huge_bt2_filt_indir_debug(FILE *stream, int indent, int fwidth, const void FUNC_ENTER_PACKAGE_NOERR - HDfprintf(stream, "%*s%-*s {%" PRIuHADDR ", %" PRIuHSIZE ", %x, %" PRIuHSIZE ", %" PRIuHSIZE "}\n", - indent, "", fwidth, "Record:", nrecord->addr, nrecord->len, nrecord->filter_mask, - nrecord->obj_size, nrecord->id); + fprintf(stream, "%*s%-*s {%" PRIuHADDR ", %" PRIuHSIZE ", %x, %" PRIuHSIZE ", %" PRIuHSIZE "}\n", indent, + "", fwidth, "Record:", nrecord->addr, nrecord->len, nrecord->filter_mask, nrecord->obj_size, + nrecord->id); FUNC_LEAVE_NOAPI(SUCCEED) } /* H5HF__huge_bt2_filt_indir_debug() */ @@ -819,8 +819,8 @@ H5HF__huge_bt2_dir_debug(FILE *stream, int indent, int fwidth, const void *_nrec FUNC_ENTER_PACKAGE_NOERR - HDfprintf(stream, "%*s%-*s {%" PRIuHADDR ", %" PRIuHSIZE "}\n", indent, "", fwidth, - "Record:", nrecord->addr, nrecord->len); + fprintf(stream, "%*s%-*s {%" PRIuHADDR ", %" PRIuHSIZE "}\n", indent, "", fwidth, + "Record:", nrecord->addr, nrecord->len); FUNC_LEAVE_NOAPI(SUCCEED) } /* H5HF__huge_bt2_dir_debug() */ @@ -1030,8 +1030,8 @@ H5HF__huge_bt2_filt_dir_debug(FILE *stream, int indent, int fwidth, const void * FUNC_ENTER_PACKAGE_NOERR - HDfprintf(stream, "%*s%-*s {%" PRIuHADDR ", %" PRIuHSIZE ", %x, %" PRIuHSIZE "}\n", indent, "", fwidth, - "Record:", nrecord->addr, nrecord->len, nrecord->filter_mask, nrecord->obj_size); + fprintf(stream, "%*s%-*s {%" PRIuHADDR ", %" PRIuHSIZE ", %x, %" PRIuHSIZE "}\n", indent, "", fwidth, + "Record:", nrecord->addr, nrecord->len, nrecord->filter_mask, nrecord->obj_size); FUNC_LEAVE_NOAPI(SUCCEED) } /* H5HF__huge_bt2_filt_dir_debug() */ diff --git a/src/H5HFdbg.c b/src/H5HFdbg.c index 8fb8b24..541764e 100644 --- a/src/H5HFdbg.c +++ b/src/H5HFdbg.c @@ -139,7 +139,7 @@ H5HF_id_print(H5HF_t *fh, const void *_id, FILE *stream, int indent, int fwidth) id_type = 'T'; } /* end if */ else { - HDfprintf(stderr, "%s: Heap ID type not supported yet!\n", __func__); + fprintf(stderr, "%s: Heap ID type not supported yet!\n", __func__); HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet") } /* end else */ @@ -152,8 +152,8 @@ H5HF_id_print(H5HF_t *fh, const void *_id, FILE *stream, int indent, int fwidth) HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't retrieve heap ID length") /* Display the heap ID */ - HDfprintf(stream, "%*s%-*s (%c, %" PRIuHSIZE " , %zu)\n", indent, "", fwidth, - "Heap ID info: (type, offset, length)", id_type, obj_off, obj_len); + fprintf(stream, "%*s%-*s (%c, %" PRIuHSIZE " , %zu)\n", indent, "", fwidth, + "Heap ID info: (type, offset, length)", id_type, obj_off, obj_len); done: FUNC_LEAVE_NOAPI(ret_value) @@ -188,31 +188,30 @@ H5HF__dtable_debug(const H5HF_dtable_t *dtable, FILE *stream, int indent, int fw * Print the values. */ /* Creation parameter values */ - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Doubling table width:", dtable->cparam.width); - HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, - "Starting block size:", dtable->cparam.start_block_size); - HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, - "Max. direct block size:", dtable->cparam.max_direct_size); - HDfprintf(stream, "%*s%-*s %u (bits)\n", indent, "", fwidth, - "Max. index size:", dtable->cparam.max_index); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, - "Starting # of rows in root indirect block:", dtable->cparam.start_root_rows); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Doubling table width:", dtable->cparam.width); + fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, + "Starting block size:", dtable->cparam.start_block_size); + fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, + "Max. direct block size:", dtable->cparam.max_direct_size); + fprintf(stream, "%*s%-*s %u (bits)\n", indent, "", fwidth, "Max. index size:", dtable->cparam.max_index); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, + "Starting # of rows in root indirect block:", dtable->cparam.start_root_rows); /* Run-time varying parameter values */ - HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, - "Table's root address:", dtable->table_addr); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, - "Current # of rows in root indirect block:", dtable->curr_root_rows); + fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, + "Table's root address:", dtable->table_addr); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, + "Current # of rows in root indirect block:", dtable->curr_root_rows); /* Computed values */ - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, - "Max. # of rows in root indirect block:", dtable->max_root_rows); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, - "Max. # of direct rows in any indirect block:", dtable->max_direct_rows); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, - "# of bits for IDs in first row:", dtable->first_row_bits); - HDfprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth, - "# of IDs in first row:", dtable->num_id_first_row); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, + "Max. # of rows in root indirect block:", dtable->max_root_rows); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, + "Max. # of direct rows in any indirect block:", dtable->max_direct_rows); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, + "# of bits for IDs in first row:", dtable->first_row_bits); + fprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth, + "# of IDs in first row:", dtable->num_id_first_row); FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5HF__dtable_debug() */ @@ -243,70 +242,70 @@ H5HF_hdr_print(const H5HF_hdr_t *hdr, hbool_t dump_internal, FILE *stream, int i assert(fwidth >= 0); /* Print opening message */ - HDfprintf(stream, "%*sFractal Heap Header...\n", indent, ""); + fprintf(stream, "%*sFractal Heap Header...\n", indent, ""); /* * Print the values. */ - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, - "Heap is:", hdr->man_dtable.curr_root_rows > 0 ? "Indirect" : "Direct"); - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, - "Objects stored in 'debugging' format:", hdr->debug_objs ? "TRUE" : "FALSE"); - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, - "'Write once' flag:", hdr->write_once ? "TRUE" : "FALSE"); - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, - "'Huge' object IDs have wrapped:", hdr->huge_ids_wrapped ? "TRUE" : "FALSE"); - HDfprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth, - "Free space in managed blocks:", hdr->total_man_free); - HDfprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth, - "Managed space data block size:", hdr->man_size); - HDfprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth, - "Total managed space allocated:", hdr->man_alloc_size); - HDfprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth, - "Offset of managed space iterator:", hdr->man_iter_off); - HDfprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth, - "Number of managed objects in heap:", hdr->man_nobjs); - HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, - "Address of free space manager for managed blocks:", hdr->fs_addr); - HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth, - "Max. size of managed object:", (unsigned long)hdr->max_man_size); - HDfprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth, - "'Huge' object space used:", hdr->huge_size); - HDfprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth, - "Number of 'huge' objects in heap:", hdr->huge_nobjs); - HDfprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth, - "ID of next 'huge' object:", hdr->huge_next_id); - HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, - "Address of v2 B-tree for 'huge' objects:", hdr->huge_bt2_addr); - HDfprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth, - "'Tiny' object space used:", hdr->tiny_size); - HDfprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth, - "Number of 'tiny' objects in heap:", hdr->tiny_nobjs); - - HDfprintf(stream, "%*sManaged Objects Doubling-Table Info...\n", indent, ""); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, + "Heap is:", hdr->man_dtable.curr_root_rows > 0 ? "Indirect" : "Direct"); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, + "Objects stored in 'debugging' format:", hdr->debug_objs ? "TRUE" : "FALSE"); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, + "'Write once' flag:", hdr->write_once ? "TRUE" : "FALSE"); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, + "'Huge' object IDs have wrapped:", hdr->huge_ids_wrapped ? "TRUE" : "FALSE"); + fprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth, + "Free space in managed blocks:", hdr->total_man_free); + fprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth, + "Managed space data block size:", hdr->man_size); + fprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth, + "Total managed space allocated:", hdr->man_alloc_size); + fprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth, + "Offset of managed space iterator:", hdr->man_iter_off); + fprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth, + "Number of managed objects in heap:", hdr->man_nobjs); + fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, + "Address of free space manager for managed blocks:", hdr->fs_addr); + fprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth, + "Max. size of managed object:", (unsigned long)hdr->max_man_size); + fprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth, + "'Huge' object space used:", hdr->huge_size); + fprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth, + "Number of 'huge' objects in heap:", hdr->huge_nobjs); + fprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth, + "ID of next 'huge' object:", hdr->huge_next_id); + fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, + "Address of v2 B-tree for 'huge' objects:", hdr->huge_bt2_addr); + fprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth, + "'Tiny' object space used:", hdr->tiny_size); + fprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth, + "Number of 'tiny' objects in heap:", hdr->tiny_nobjs); + + fprintf(stream, "%*sManaged Objects Doubling-Table Info...\n", indent, ""); H5HF__dtable_debug(&hdr->man_dtable, stream, indent + 3, MAX(0, fwidth - 3)); /* Print information about I/O filters */ if (hdr->filter_len > 0) { - HDfprintf(stream, "%*sI/O filter Info...\n", indent, ""); + fprintf(stream, "%*sI/O filter Info...\n", indent, ""); if (hdr->man_dtable.curr_root_rows == 0) { - HDfprintf(stream, "%*s%-*s %zu\n", indent + 3, "", MAX(0, fwidth - 3), - "Compressed size of root direct block:", hdr->pline_root_direct_size); - HDfprintf(stream, "%*s%-*s %x\n", indent + 3, "", MAX(0, fwidth - 3), - "Filter mask for root direct block:", hdr->pline_root_direct_filter_mask); + fprintf(stream, "%*s%-*s %zu\n", indent + 3, "", MAX(0, fwidth - 3), + "Compressed size of root direct block:", hdr->pline_root_direct_size); + fprintf(stream, "%*s%-*s %x\n", indent + 3, "", MAX(0, fwidth - 3), + "Filter mask for root direct block:", hdr->pline_root_direct_filter_mask); } /* end if */ H5O_debug_id(H5O_PLINE_ID, hdr->f, &(hdr->pline), stream, indent + 3, MAX(0, fwidth - 3)); } /* end if */ /* Print internal (runtime) information, if requested */ if (dump_internal) { - HDfprintf(stream, "%*sFractal Heap Header Internal Information:\n", indent, ""); + fprintf(stream, "%*sFractal Heap Header Internal Information:\n", indent, ""); /* Dump root iblock, if there is one */ - HDfprintf(stream, "%*s%-*s %x\n", indent + 3, "", MAX(0, fwidth - 3), - "Root indirect block flags:", hdr->root_iblock_flags); - HDfprintf(stream, "%*s%-*s %p\n", indent + 3, "", MAX(0, fwidth - 3), - "Root indirect block pointer:", (void *)hdr->root_iblock); + fprintf(stream, "%*s%-*s %x\n", indent + 3, "", MAX(0, fwidth - 3), + "Root indirect block flags:", hdr->root_iblock_flags); + fprintf(stream, "%*s%-*s %p\n", indent + 3, "", MAX(0, fwidth - 3), + "Root indirect block pointer:", (void *)hdr->root_iblock); if (hdr->root_iblock) H5HF_iblock_print(hdr->root_iblock, dump_internal, stream, indent + 3, fwidth); } /* end if */ @@ -417,8 +416,8 @@ H5HF_dblock_debug_cb(H5FS_section_info_t *_sect, void *_udata) len = end - start; HDsnprintf(temp_str, sizeof(temp_str), "Section #%u:", (unsigned)udata->sect_count); - HDfprintf(udata->stream, "%*s%-*s %8zu, %8zu\n", udata->indent + 3, "", MAX(0, udata->fwidth - 9), - temp_str, start, len); + fprintf(udata->stream, "%*s%-*s %8zu, %8zu\n", udata->indent + 3, "", MAX(0, udata->fwidth - 9), + temp_str, start, len); udata->sect_count++; /* Mark this node's free space & check for overlaps w/other sections */ @@ -431,7 +430,7 @@ H5HF_dblock_debug_cb(H5FS_section_info_t *_sect, void *_udata) /* Flag overlaps */ if (overlap) - HDfprintf(udata->stream, "***THAT FREE BLOCK OVERLAPPED A PREVIOUS ONE!\n"); + fprintf(udata->stream, "***THAT FREE BLOCK OVERLAPPED A PREVIOUS ONE!\n"); else udata->amount_free += len; } /* end if */ @@ -486,17 +485,17 @@ H5HF_dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, FAIL, "unable to load fractal heap direct block") /* Print opening message */ - HDfprintf(stream, "%*sFractal Heap Direct Block...\n", indent, ""); + fprintf(stream, "%*sFractal Heap Direct Block...\n", indent, ""); /* * Print the values. */ - HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, - "Address of fractal heap that owns this block:", hdr->heap_addr); - HDfprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth, - "Offset of direct block in heap:", dblock->block_off); + fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, + "Address of fractal heap that owns this block:", hdr->heap_addr); + fprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth, + "Offset of direct block in heap:", dblock->block_off); blk_prefix_size = H5HF_MAN_ABS_DIRECT_OVERHEAD(hdr); - HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Size of block header:", blk_prefix_size); + fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Size of block header:", blk_prefix_size); /* Allocate space for the free space markers */ if (NULL == (marker = (uint8_t *)H5MM_calloc(dblock->size))) @@ -521,7 +520,7 @@ H5HF_dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, udata.amount_free = 0; /* Print header */ - HDfprintf(stream, "%*sFree Blocks (offset, size):\n", indent, ""); + fprintf(stream, "%*sFree Blocks (offset, size):\n", indent, ""); /* Iterate over the free space sections, to detect overlaps with this block */ if (H5FS_sect_iterate(f, hdr->fspace, H5HF_dblock_debug_cb, &udata) < 0) @@ -536,14 +535,14 @@ H5HF_dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, /* Check for no free space */ if (amount_free == 0) - HDfprintf(stream, "%*s<none>\n", indent + 3, ""); + fprintf(stream, "%*s<none>\n", indent + 3, ""); } /* end if */ else amount_free = 0; - HDfprintf(stream, "%*s%-*s %.2f%%\n", indent, "", fwidth, "Percent of available space for data used:", - (100.0 * (double)((dblock->size - blk_prefix_size) - amount_free) / - (double)(dblock->size - blk_prefix_size))); + fprintf(stream, "%*s%-*s %.2f%%\n", indent, "", fwidth, "Percent of available space for data used:", + (100.0 * (double)((dblock->size - blk_prefix_size) - amount_free) / + (double)(dblock->size - blk_prefix_size))); /* * Print the data in a VMS-style octal dump. @@ -594,44 +593,44 @@ H5HF_iblock_print(const H5HF_indirect_t *iblock, hbool_t dump_internal, FILE *st hdr = iblock->hdr; /* Print opening message */ - HDfprintf(stream, "%*sFractal Heap Indirect Block...\n", indent, ""); + fprintf(stream, "%*sFractal Heap Indirect Block...\n", indent, ""); /* * Print the values. */ - HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, - "Address of fractal heap that owns this block:", hdr->heap_addr); - HDfprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth, - "Offset of indirect block in heap:", iblock->block_off); - HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Size of indirect block:", iblock->size); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Current # of rows:", iblock->nrows); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Max. # of rows:", iblock->max_rows); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, - "Max direct block rows:", hdr->man_dtable.max_direct_rows); + fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, + "Address of fractal heap that owns this block:", hdr->heap_addr); + fprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth, + "Offset of indirect block in heap:", iblock->block_off); + fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Size of indirect block:", iblock->size); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Current # of rows:", iblock->nrows); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Max. # of rows:", iblock->max_rows); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, + "Max direct block rows:", hdr->man_dtable.max_direct_rows); /* Print the entry tables */ if (hdr->filter_len > 0) - HDfprintf(stream, "%*sDirect Block Entries: (address/compressed size/filter mask)\n", indent, ""); + fprintf(stream, "%*sDirect Block Entries: (address/compressed size/filter mask)\n", indent, ""); else - HDfprintf(stream, "%*sDirect Block Entries: (address)\n", indent, ""); + fprintf(stream, "%*sDirect Block Entries: (address)\n", indent, ""); for (u = 0; u < hdr->man_dtable.max_direct_rows && u < iblock->nrows; u++) { HDsnprintf(temp_str, sizeof(temp_str), "Row #%u: (block size: %lu)", (unsigned)u, (unsigned long)hdr->man_dtable.row_block_size[u]); - HDfprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3), temp_str); + fprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3), temp_str); for (v = 0; v < hdr->man_dtable.cparam.width; v++) { size_t off = (u * hdr->man_dtable.cparam.width) + v; HDsnprintf(temp_str, sizeof(temp_str), "Col #%u:", (unsigned)v); if (hdr->filter_len > 0) - HDfprintf(stream, "%*s%-*s %9" PRIuHADDR "/%6zu/%x\n", indent + 6, "", MAX(0, fwidth - 6), - temp_str, iblock->ents[off].addr, iblock->filt_ents[off].size, - iblock->filt_ents[off].filter_mask); + fprintf(stream, "%*s%-*s %9" PRIuHADDR "/%6zu/%x\n", indent + 6, "", MAX(0, fwidth - 6), + temp_str, iblock->ents[off].addr, iblock->filt_ents[off].size, + iblock->filt_ents[off].filter_mask); else - HDfprintf(stream, "%*s%-*s %9" PRIuHADDR "\n", indent + 6, "", MAX(0, fwidth - 6), temp_str, - iblock->ents[off].addr); + fprintf(stream, "%*s%-*s %9" PRIuHADDR "\n", indent + 6, "", MAX(0, fwidth - 6), temp_str, + iblock->ents[off].addr); } /* end for */ } /* end for */ - HDfprintf(stream, "%*sIndirect Block Entries:\n", indent, ""); + fprintf(stream, "%*sIndirect Block Entries:\n", indent, ""); if (iblock->nrows > hdr->man_dtable.max_direct_rows) { unsigned first_row_bits; /* Number of bits used bit addresses in first row */ unsigned num_indirect_rows; /* Number of rows of blocks in each indirect block */ @@ -642,30 +641,29 @@ H5HF_iblock_print(const H5HF_indirect_t *iblock, hbool_t dump_internal, FILE *st num_indirect_rows = (H5VM_log2_gen(hdr->man_dtable.row_block_size[u]) - first_row_bits) + 1; HDsnprintf(temp_str, sizeof(temp_str), "Row #%u: (# of rows: %u)", (unsigned)u, num_indirect_rows); - HDfprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3), temp_str); + fprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3), temp_str); for (v = 0; v < hdr->man_dtable.cparam.width; v++) { size_t off = (u * hdr->man_dtable.cparam.width) + v; HDsnprintf(temp_str, sizeof(temp_str), "Col #%u:", (unsigned)v); - HDfprintf(stream, "%*s%-*s %9" PRIuHADDR "\n", indent + 6, "", MAX(0, fwidth - 6), temp_str, - iblock->ents[off].addr); + fprintf(stream, "%*s%-*s %9" PRIuHADDR "\n", indent + 6, "", MAX(0, fwidth - 6), temp_str, + iblock->ents[off].addr); } /* end for */ } /* end for */ } /* end if */ else - HDfprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3), "<none>"); + fprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3), "<none>"); /* Print internal (runtime) information, if requested */ if (dump_internal) { - HDfprintf(stream, "%*sFractal Indirect Block Internal Information:\n", indent, ""); + fprintf(stream, "%*sFractal Indirect Block Internal Information:\n", indent, ""); /* Print general information */ - HDfprintf(stream, "%*s%-*s %zu\n", indent + 3, "", MAX(0, fwidth - 3), - "Reference count:", iblock->rc); + fprintf(stream, "%*s%-*s %zu\n", indent + 3, "", MAX(0, fwidth - 3), "Reference count:", iblock->rc); /* Print parent's information */ - HDfprintf(stream, "%*s%-*s %p\n", indent + 3, "", MAX(0, fwidth - 3), - "Parent indirect block address:", (void *)iblock->parent); + fprintf(stream, "%*s%-*s %p\n", indent + 3, "", MAX(0, fwidth - 3), + "Parent indirect block address:", (void *)iblock->parent); if (iblock->parent) H5HF_iblock_print(iblock->parent, TRUE, stream, indent + 6, fwidth); } /* end if */ @@ -758,17 +756,16 @@ H5HF_sects_debug_cb(H5FS_section_info_t *_sect, void *_udata) assert(udata); /* Print generic section information */ - HDfprintf( - udata->stream, "%*s%-*s %s\n", udata->indent, "", udata->fwidth, "Section type:", - (sect->sect_info.type == H5HF_FSPACE_SECT_SINGLE - ? "single" - : (sect->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW - ? "first row" - : (sect->sect_info.type == H5HF_FSPACE_SECT_NORMAL_ROW ? "normal row" : "unknown")))); - HDfprintf(udata->stream, "%*s%-*s %" PRIuHADDR "\n", udata->indent, "", udata->fwidth, - "Section address:", sect->sect_info.addr); - HDfprintf(udata->stream, "%*s%-*s %" PRIuHSIZE "\n", udata->indent, "", udata->fwidth, - "Section size:", sect->sect_info.size); + fprintf(udata->stream, "%*s%-*s %s\n", udata->indent, "", udata->fwidth, "Section type:", + (sect->sect_info.type == H5HF_FSPACE_SECT_SINGLE + ? "single" + : (sect->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW + ? "first row" + : (sect->sect_info.type == H5HF_FSPACE_SECT_NORMAL_ROW ? "normal row" : "unknown")))); + fprintf(udata->stream, "%*s%-*s %" PRIuHADDR "\n", udata->indent, "", udata->fwidth, + "Section address:", sect->sect_info.addr); + fprintf(udata->stream, "%*s%-*s %" PRIuHSIZE "\n", udata->indent, "", udata->fwidth, + "Section size:", sect->sect_info.size); /* Dump section-specific debugging information */ if (H5FS_sect_debug(udata->fspace, _sect, udata->stream, udata->indent + 3, MAX(0, udata->fwidth - 3)) < diff --git a/src/H5HFdblock.c b/src/H5HFdblock.c index 32acc42..191dd3d 100644 --- a/src/H5HFdblock.c +++ b/src/H5HFdblock.c @@ -393,10 +393,9 @@ H5HF__man_dblock_new(H5HF_hdr_t *hdr, size_t request, H5HF_free_section_t **ret_ /* Check for skipping over blocks */ if (min_dblock_size > next_size) { - HDfprintf( - stderr, - "%s: Skipping direct block sizes not supported, min_dblock_size = %zu, next_size = %zu\n", - __func__, min_dblock_size, next_size); + fprintf(stderr, + "%s: Skipping direct block sizes not supported, min_dblock_size = %zu, next_size = %zu\n", + __func__, min_dblock_size, next_size); HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "skipping direct block sizes not supported yet") } /* end if */ diff --git a/src/H5HFsection.c b/src/H5HFsection.c index 6624bdb..89f397e 100644 --- a/src/H5HFsection.c +++ b/src/H5HFsection.c @@ -2034,14 +2034,14 @@ H5HF__sect_row_debug(const H5FS_section_info_t *_sect, FILE *stream, int indent, assert(sect); /* Print indirect section information */ - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Row:", sect->u.row.row); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Column:", sect->u.row.col); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Number of entries:", sect->u.row.num_entries); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Row:", sect->u.row.row); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Column:", sect->u.row.col); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Number of entries:", sect->u.row.num_entries); /* If this is a first row section display information about underlying indirect section */ if (sect->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW) { /* Print indirect section header */ - HDfprintf(stream, "%*s%-*s\n", indent, "", fwidth, "Underlying indirect section:"); + fprintf(stream, "%*s%-*s\n", indent, "", fwidth, "Underlying indirect section:"); H5HF__sect_indirect_debug(sect->u.row.under, stream, indent + 3, MAX(0, fwidth - 3)); } /* end if */ @@ -4094,9 +4094,9 @@ H5HF__sect_indirect_debug(const H5HF_free_section_t *sect, FILE *stream, int ind assert(sect); /* Print indirect section information */ - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Row:", sect->u.indirect.row); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Column:", sect->u.indirect.col); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Number of entries:", sect->u.indirect.num_entries); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Row:", sect->u.indirect.row); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Column:", sect->u.indirect.col); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Number of entries:", sect->u.indirect.num_entries); FUNC_LEAVE_NOAPI(SUCCEED) } /* H5HF__sect_indirect_debug() */ diff --git a/src/H5HGdbg.c b/src/H5HGdbg.c index c3a5255..a5b6665 100644 --- a/src/H5HGdbg.c +++ b/src/H5HGdbg.c @@ -92,10 +92,10 @@ H5HG_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth) if (NULL == (h = H5HG__protect(f, addr, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect global heap collection"); - HDfprintf(stream, "%*sGlobal Heap Collection...\n", indent, ""); - HDfprintf(stream, "%*s%-*s %d\n", indent, "", fwidth, "Dirty:", (int)(h->cache_info.is_dirty)); - HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth, - "Total collection size in file:", (unsigned long)(h->size)); + fprintf(stream, "%*sGlobal Heap Collection...\n", indent, ""); + fprintf(stream, "%*s%-*s %d\n", indent, "", fwidth, "Dirty:", (int)(h->cache_info.is_dirty)); + fprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth, + "Total collection size in file:", (unsigned long)(h->size)); for (u = 1, nused = 0, maxobj = 0; u < h->nused; u++) if (h->obj[u].begin) { @@ -103,45 +103,45 @@ H5HG_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth) if (u > maxobj) maxobj = u; } - HDfprintf(stream, "%*s%-*s %u/%lu/", indent, "", fwidth, "Objects defined/allocated/max:", nused, - (unsigned long)h->nalloc); + fprintf(stream, "%*s%-*s %u/%lu/", indent, "", fwidth, "Objects defined/allocated/max:", nused, + (unsigned long)h->nalloc); if (nused) - HDfprintf(stream, "%u\n", maxobj); + fprintf(stream, "%u\n", maxobj); else - HDfprintf(stream, "NA\n"); + fprintf(stream, "NA\n"); - HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth, "Free space:", (unsigned long)(h->obj[0].size)); + fprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth, "Free space:", (unsigned long)(h->obj[0].size)); for (u = 1; u < h->nused; u++) if (h->obj[u].begin) { char buf[64]; HDsnprintf(buf, sizeof(buf), "Object %u", u); - HDfprintf(stream, "%*s%s\n", indent, "", buf); - HDfprintf(stream, "%*s%-*s %lu\n", indent + 3, "", MIN(fwidth - 3, 0), - "Obffset in block:", (unsigned long)(h->obj[u].begin - h->chunk)); - HDfprintf(stream, "%*s%-*s %d\n", indent + 3, "", MIN(fwidth - 3, 0), - "Reference count:", h->obj[u].nrefs); - HDfprintf(stream, "%*s%-*s %lu/%lu\n", indent + 3, "", MIN(fwidth - 3, 0), - "Size of object body:", (unsigned long)(h->obj[u].size), - (unsigned long)H5HG_ALIGN(h->obj[u].size)); + fprintf(stream, "%*s%s\n", indent, "", buf); + fprintf(stream, "%*s%-*s %lu\n", indent + 3, "", MIN(fwidth - 3, 0), + "Obffset in block:", (unsigned long)(h->obj[u].begin - h->chunk)); + fprintf(stream, "%*s%-*s %d\n", indent + 3, "", MIN(fwidth - 3, 0), + "Reference count:", h->obj[u].nrefs); + fprintf(stream, "%*s%-*s %lu/%lu\n", indent + 3, "", MIN(fwidth - 3, 0), + "Size of object body:", (unsigned long)(h->obj[u].size), + (unsigned long)H5HG_ALIGN(h->obj[u].size)); p = h->obj[u].begin + H5HG_SIZEOF_OBJHDR(f); for (j = 0; j < h->obj[u].size; j += 16) { - HDfprintf(stream, "%*s%04u: ", indent + 6, "", j); + fprintf(stream, "%*s%04u: ", indent + 6, "", j); for (k = 0; k < 16; k++) { if (8 == k) - HDfprintf(stream, " "); + fprintf(stream, " "); if (j + k < h->obj[u].size) - HDfprintf(stream, "%02x ", p[j + k]); + fprintf(stream, "%02x ", p[j + k]); else HDfputs(" ", stream); } for (k = 0; k < 16 && j + k < h->obj[u].size; k++) { if (8 == k) - HDfprintf(stream, " "); + fprintf(stream, " "); HDfputc(p[j + k] > ' ' && p[j + k] <= '~' ? p[j + k] : '.', stream); } - HDfprintf(stream, "\n"); + fprintf(stream, "\n"); } } @@ -675,8 +675,8 @@ H5HL_insert(H5F_t *f, H5HL_t *heap, size_t buf_size, const void *buf, size_t *of if (last_fl->size < H5HL_SIZEOF_FREE(f)) { #ifdef H5HL_DEBUG if (H5DEBUG(HL) && last_fl->size) { - HDfprintf(H5DEBUG(HL), "H5HL: lost %lu bytes at line %d\n", - (unsigned long)(last_fl->size), __LINE__); + fprintf(H5DEBUG(HL), "H5HL: lost %lu bytes at line %d\n", (unsigned long)(last_fl->size), + __LINE__); } #endif last_fl = H5HL__remove_free(heap, last_fl); @@ -702,16 +702,16 @@ H5HL_insert(H5F_t *f, H5HL_t *heap, size_t buf_size, const void *buf, size_t *of #ifdef H5HL_DEBUG } else if (H5DEBUG(HL) && need_more > need_size) { - HDfprintf(H5DEBUG(HL), "H5HL_insert: lost %lu bytes at line %d\n", - (unsigned long)(need_more - need_size), __LINE__); + fprintf(H5DEBUG(HL), "H5HL_insert: lost %lu bytes at line %d\n", + (unsigned long)(need_more - need_size), __LINE__); #endif } } #ifdef H5HL_DEBUG if (H5DEBUG(HL)) { - HDfprintf(H5DEBUG(HL), "H5HL: resize mem buf from %lu to %lu bytes\n", - (unsigned long)(old_dblk_size), (unsigned long)(old_dblk_size + need_more)); + fprintf(H5DEBUG(HL), "H5HL: resize mem buf from %lu to %lu bytes\n", + (unsigned long)(old_dblk_size), (unsigned long)(old_dblk_size + need_more)); } #endif if (NULL == (heap->dblk_image = H5FL_BLK_REALLOC(lheap_chunk, heap->dblk_image, heap->dblk_size))) @@ -852,7 +852,7 @@ H5HL_remove(H5F_t *f, H5HL_t *heap, size_t offset, size_t size) if (size < H5HL_SIZEOF_FREE(f)) { #ifdef H5HL_DEBUG if (H5DEBUG(HL)) { - HDfprintf(H5DEBUG(HL), "H5HL: lost %lu bytes\n", (unsigned long)size); + fprintf(H5DEBUG(HL), "H5HL: lost %lu bytes\n", (unsigned long)size); } #endif HGOTO_DONE(SUCCEED) diff --git a/src/H5HLdbg.c b/src/H5HLdbg.c index 86e522d..dcf228f 100644 --- a/src/H5HLdbg.c +++ b/src/H5HLdbg.c @@ -65,10 +65,10 @@ H5HL_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth) if (NULL == (h = (H5HL_t *)H5HL_protect(f, addr, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to load/protect local heap") - HDfprintf(stream, "%*sLocal Heap...\n", indent, ""); - HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Header size (in bytes):", h->prfx_size); - HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Address of heap data:", h->dblk_addr); - HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Data bytes allocated for heap:", h->dblk_size); + fprintf(stream, "%*sLocal Heap...\n", indent, ""); + fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Header size (in bytes):", h->prfx_size); + fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Address of heap data:", h->dblk_addr); + fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Data bytes allocated for heap:", h->dblk_size); /* Traverse the free list and check that all free blocks fall within * the heap and that no two free blocks point to the same region of @@ -77,15 +77,15 @@ H5HL_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth) if (NULL == (marker = (uint8_t *)H5MM_calloc(h->dblk_size))) HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "memory allocation failed") - HDfprintf(stream, "%*sFree Blocks (offset, size):\n", indent, ""); + fprintf(stream, "%*sFree Blocks (offset, size):\n", indent, ""); for (free_block = 0, freelist = h->freelist; freelist; freelist = freelist->next, free_block++) { char temp_str[32]; HDsnprintf(temp_str, sizeof(temp_str), "Block #%d:", free_block); - HDfprintf(stream, "%*s%-*s %8zu, %8zu\n", indent + 3, "", MAX(0, fwidth - 9), temp_str, - freelist->offset, freelist->size); + fprintf(stream, "%*s%-*s %8zu, %8zu\n", indent + 3, "", MAX(0, fwidth - 9), temp_str, + freelist->offset, freelist->size); if ((freelist->offset + freelist->size) > h->dblk_size) - HDfprintf(stream, "***THAT FREE BLOCK IS OUT OF BOUNDS!\n"); + fprintf(stream, "***THAT FREE BLOCK IS OUT OF BOUNDS!\n"); else { int overlap = 0; size_t i; @@ -96,15 +96,15 @@ H5HL_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth) marker[freelist->offset + i] = 1; } if (overlap) - HDfprintf(stream, "***THAT FREE BLOCK OVERLAPPED A PREVIOUS ONE!\n"); + fprintf(stream, "***THAT FREE BLOCK OVERLAPPED A PREVIOUS ONE!\n"); else amount_free += freelist->size; } } if (h->dblk_size) - HDfprintf(stream, "%*s%-*s %.2f%%\n", indent, "", fwidth, "Percent of heap used:", - (100.0 * (double)(h->dblk_size - amount_free) / (double)h->dblk_size)); + fprintf(stream, "%*s%-*s %.2f%%\n", indent, "", fwidth, "Percent of heap used:", + (100.0 * (double)(h->dblk_size - amount_free) / (double)h->dblk_size)); /* Print the data in a VMS-style octal dump */ H5_buffer_dump(stream, indent, h->dblk_image, marker, (size_t)0, h->dblk_size); diff --git a/src/H5Idbg.c b/src/H5Idbg.c index 5fbe29b..4c7d1ec 100644 --- a/src/H5Idbg.c +++ b/src/H5Idbg.c @@ -81,10 +81,10 @@ H5I__id_dump_cb(void *_item, void H5_ATTR_UNUSED *_key, void *_udata) FUNC_ENTER_PACKAGE_NOERR - HDfprintf(stderr, " id = %" PRIdHID "\n", info->id); - HDfprintf(stderr, " count = %u\n", info->count); - HDfprintf(stderr, " obj = 0x%8p\n", info->object); - HDfprintf(stderr, " marked = %d\n", info->marked); + fprintf(stderr, " id = %" PRIdHID "\n", info->id); + fprintf(stderr, " count = %u\n", info->count); + fprintf(stderr, " obj = 0x%8p\n", info->object); + fprintf(stderr, " marked = %d\n", info->marked); /* Get the group location, so we get get the name */ switch (type) { @@ -143,9 +143,9 @@ H5I__id_dump_cb(void *_item, void H5_ATTR_UNUSED *_key, void *_udata) if (path) { if (path->user_path_r) - HDfprintf(stderr, " user_path = %s\n", H5RS_get_str(path->user_path_r)); + fprintf(stderr, " user_path = %s\n", H5RS_get_str(path->user_path_r)); if (path->full_path_r) - HDfprintf(stderr, " full_path = %s\n", H5RS_get_str(path->full_path_r)); + fprintf(stderr, " full_path = %s\n", H5RS_get_str(path->full_path_r)); } FUNC_LEAVE_NOAPI(H5_ITER_CONT) @@ -167,7 +167,7 @@ H5I_dump_ids_for_type(H5I_type_t type) FUNC_ENTER_NOAPI_NOERR - HDfprintf(stderr, "Dumping ID type %d\n", (int)type); + fprintf(stderr, "Dumping ID type %d\n", (int)type); type_info = H5I_type_info_array_g[type]; if (type_info) { @@ -176,21 +176,21 @@ H5I_dump_ids_for_type(H5I_type_t type) H5I_id_info_t *tmp = NULL; /* Header */ - HDfprintf(stderr, " init_count = %u\n", type_info->init_count); - HDfprintf(stderr, " reserved = %u\n", type_info->cls->reserved); - HDfprintf(stderr, " id_count = %llu\n", (unsigned long long)type_info->id_count); - HDfprintf(stderr, " nextid = %llu\n", (unsigned long long)type_info->nextid); + fprintf(stderr, " init_count = %u\n", type_info->init_count); + fprintf(stderr, " reserved = %u\n", type_info->cls->reserved); + fprintf(stderr, " id_count = %llu\n", (unsigned long long)type_info->id_count); + fprintf(stderr, " nextid = %llu\n", (unsigned long long)type_info->nextid); /* List */ if (type_info->id_count > 0) { - HDfprintf(stderr, " List:\n"); + fprintf(stderr, " List:\n"); /* Normally we care about the callback's return value * (H5I_ITER_CONT, etc.), but this is an iteration over all * the IDs so we don't care. * * XXX: Update this to emit an error message on errors? */ - HDfprintf(stderr, " (HASH TABLE)\n"); + fprintf(stderr, " (HASH TABLE)\n"); HASH_ITER(hh, type_info->hash_table, item, tmp) { H5I__id_dump_cb((void *)item, NULL, (void *)&type); @@ -198,7 +198,7 @@ H5I_dump_ids_for_type(H5I_type_t type) } } else - HDfprintf(stderr, "Global type info/tracking pointer for that type is NULL\n"); + fprintf(stderr, "Global type info/tracking pointer for that type is NULL\n"); FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5I_dump_ids_for_type() */ diff --git a/src/H5Iint.c b/src/H5Iint.c index f7b4344..5804c53 100644 --- a/src/H5Iint.c +++ b/src/H5Iint.c @@ -388,10 +388,10 @@ H5I__mark_node(void *_info, void H5_ATTR_UNUSED *key, void *_udata) if (udata->force) { #ifdef H5I_DEBUG if (H5DEBUG(I)) { - HDfprintf(H5DEBUG(I), - "H5I: discard type=%d obj=%p " - "failure ignored\n", - (int)udata->type_info->cls->type, info->object); + fprintf(H5DEBUG(I), + "H5I: discard type=%d obj=%p " + "failure ignored\n", + (int)udata->type_info->cls->type, info->object); } #endif /* H5I_DEBUG */ @@ -411,10 +411,10 @@ H5I__mark_node(void *_info, void H5_ATTR_UNUSED *key, void *_udata) if (udata->force) { #ifdef H5I_DEBUG if (H5DEBUG(I)) { - HDfprintf(H5DEBUG(I), - "H5I: free type=%d obj=%p " - "failure ignored\n", - (int)udata->type_info->cls->type, info->object); + fprintf(H5DEBUG(I), + "H5I: free type=%d obj=%p " + "failure ignored\n", + (int)udata->type_info->cls->type, info->object); } #endif /* H5I_DEBUG */ @@ -538,7 +538,7 @@ H5MF__delete_fstype(H5F_t *f, H5F_mem_page_t type) H5AC_set_ring(fsm_ring, &orig_ring); #ifdef H5MF_ALLOC_DEBUG_MORE - HDfprintf(stderr, "%s: Before deleting free space manager\n", __func__); + fprintf(stderr, "%s: Before deleting free space manager\n", __func__); #endif /* H5MF_ALLOC_DEBUG_MORE */ /* Delete free space manager for this type */ @@ -593,7 +593,7 @@ H5MF__close_fstype(H5F_t *f, H5F_mem_page_t type) assert(f->shared->fs_state[type] != H5F_FS_STATE_CLOSED); #ifdef H5MF_ALLOC_DEBUG_MORE - HDfprintf(stderr, "%s: Before closing free space manager\n", __func__); + fprintf(stderr, "%s: Before closing free space manager\n", __func__); #endif /* H5MF_ALLOC_DEBUG_MORE */ /* Close an existing free space structure for the file */ @@ -649,10 +649,9 @@ H5MF__add_sect(H5F_t *f, H5FD_mem_t alloc_type, H5FS_t *fspace, H5MF_free_sectio H5AC_set_ring(fsm_ring, &orig_ring); #ifdef H5MF_ALLOC_DEBUG_MORE - HDfprintf(stderr, - "%s: adding node, node->sect_info.addr = %" PRIuHADDR ", node->sect_info.size = %" PRIuHSIZE - "\n", - __func__, node->sect_info.addr, node->sect_info.size); + fprintf(stderr, + "%s: adding node, node->sect_info.addr = %" PRIuHADDR ", node->sect_info.size = %" PRIuHSIZE "\n", + __func__, node->sect_info.addr, node->sect_info.size); #endif /* H5MF_ALLOC_DEBUG_MORE */ /* Add the section */ if (H5FS_sect_add(f, fspace, (H5FS_section_info_t *)node, H5FS_ADD_RETURNED_SPACE, &udata) < 0) @@ -704,7 +703,7 @@ H5MF__find_sect(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size, H5FS_t *fspace, h HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "error locating free space in file") #ifdef H5MF_ALLOC_DEBUG_MORE - HDfprintf(stderr, "%s: section found = %d\n", __func__, ret_value); + fprintf(stderr, "%s: section found = %d\n", __func__, ret_value); #endif /* H5MF_ALLOC_DEBUG_MORE */ /* Check for actually finding section */ @@ -719,7 +718,7 @@ H5MF__find_sect(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size, H5FS_t *fspace, h /* Check for eliminating the section */ if (node->sect_info.size == size) { #ifdef H5MF_ALLOC_DEBUG_MORE - HDfprintf(stderr, "%s: freeing node\n", __func__); + fprintf(stderr, "%s: freeing node\n", __func__); #endif /* H5MF_ALLOC_DEBUG_MORE */ /* Free section node */ @@ -732,8 +731,8 @@ H5MF__find_sect(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size, H5FS_t *fspace, h node->sect_info.size -= size; #ifdef H5MF_ALLOC_DEBUG_MORE - HDfprintf(stderr, "%s: re-adding node, node->sect_info.size = %" PRIuHSIZE "\n", __func__, - node->sect_info.size); + fprintf(stderr, "%s: re-adding node, node->sect_info.size = %" PRIuHSIZE "\n", __func__, + node->sect_info.size); #endif /* H5MF_ALLOC_DEBUG_MORE */ /* Re-add the section to the free-space manager */ @@ -776,7 +775,7 @@ H5MF_alloc(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size) FUNC_ENTER_NOAPI_TAG(H5AC__FREESPACE_TAG, HADDR_UNDEF) #ifdef H5MF_ALLOC_DEBUG - HDfprintf(stderr, "%s: alloc_type = %u, size = %" PRIuHSIZE "\n", __func__, (unsigned)alloc_type, size); + fprintf(stderr, "%s: alloc_type = %u, size = %" PRIuHSIZE "\n", __func__, (unsigned)alloc_type, size); #endif /* H5MF_ALLOC_DEBUG */ /* check arguments */ @@ -788,7 +787,7 @@ H5MF_alloc(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size) H5MF__alloc_to_fs_type(f->shared, alloc_type, size, &fs_type); #ifdef H5MF_ALLOC_DEBUG_MORE - HDfprintf(stderr, "%s: Check 1.0\n", __func__); + fprintf(stderr, "%s: Check 1.0\n", __func__); #endif /* H5MF_ALLOC_DEBUG_MORE */ /* Set the ring type in the API context */ @@ -825,7 +824,7 @@ H5MF_alloc(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size) /* If no space is found from the free-space manager, continue further action */ if (!H5_addr_defined(ret_value)) { #ifdef H5MF_ALLOC_DEBUG_MORE - HDfprintf(stderr, "%s: Check 2.0\n", __func__); + fprintf(stderr, "%s: Check 2.0\n", __func__); #endif /* H5MF_ALLOC_DEBUG_MORE */ if (f->shared->fs_strategy == H5F_FSPACE_STRATEGY_PAGE) { assert(f->shared->fs_page_size >= H5F_FILE_SPACE_PAGE_SIZE_MIN); @@ -840,7 +839,7 @@ H5MF_alloc(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size) } /* end if */ assert(H5_addr_defined(ret_value)); #ifdef H5MF_ALLOC_DEBUG_MORE - HDfprintf(stderr, "%s: Check 3.0\n", __func__); + fprintf(stderr, "%s: Check 3.0\n", __func__); #endif /* H5MF_ALLOC_DEBUG_MORE */ done: @@ -849,8 +848,8 @@ done: H5AC_set_ring(orig_ring, NULL); #ifdef H5MF_ALLOC_DEBUG - HDfprintf(stderr, "%s: Leaving: ret_value = %" PRIuHADDR ", size = %" PRIuHSIZE "\n", __func__, ret_value, - size); + fprintf(stderr, "%s: Leaving: ret_value = %" PRIuHADDR ", size = %" PRIuHSIZE "\n", __func__, ret_value, + size); #endif /* H5MF_ALLOC_DEBUG */ #ifdef H5MF_ALLOC_DEBUG_DUMP H5MF__sects_dump(f, stderr); @@ -890,7 +889,7 @@ H5MF__alloc_pagefs(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size) FUNC_ENTER_PACKAGE #ifdef H5MF_ALLOC_DEBUG - HDfprintf(stderr, "%s: alloc_type = %u, size = %" PRIuHSIZE "\n", __func__, (unsigned)alloc_type, size); + fprintf(stderr, "%s: alloc_type = %u, size = %" PRIuHSIZE "\n", __func__, (unsigned)alloc_type, size); #endif /* H5MF_ALLOC_DEBUG */ H5MF__alloc_to_fs_type(f->shared, alloc_type, size, &ptype); @@ -987,8 +986,8 @@ H5MF__alloc_pagefs(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size) done: #ifdef H5MF_ALLOC_DEBUG - HDfprintf(stderr, "%s: Leaving: ret_value = %" PRIuHADDR ", size = %" PRIuHSIZE "\n", __func__, ret_value, - size); + fprintf(stderr, "%s: Leaving: ret_value = %" PRIuHADDR ", size = %" PRIuHSIZE "\n", __func__, ret_value, + size); #endif /* H5MF_ALLOC_DEBUG */ #ifdef H5MF_ALLOC_DEBUG_DUMP H5MF__sects_dump(f, stderr); @@ -1034,7 +1033,7 @@ H5MF_alloc_tmp(H5F_t *f, hsize_t size) FUNC_ENTER_NOAPI(HADDR_UNDEF) #ifdef H5MF_ALLOC_DEBUG - HDfprintf(stderr, "%s: size = %" PRIuHSIZE "\n", __func__, size); + fprintf(stderr, "%s: size = %" PRIuHSIZE "\n", __func__, size); #endif /* H5MF_ALLOC_DEBUG */ /* check args */ @@ -1086,8 +1085,8 @@ H5MF_xfree(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size) FUNC_ENTER_NOAPI_TAG(H5AC__FREESPACE_TAG, FAIL) #ifdef H5MF_ALLOC_DEBUG - HDfprintf(stderr, "%s: Entering - alloc_type = %u, addr = %" PRIuHADDR ", size = %" PRIuHSIZE "\n", - __func__, (unsigned)alloc_type, addr, size); + fprintf(stderr, "%s: Entering - alloc_type = %u, addr = %" PRIuHADDR ", size = %" PRIuHSIZE "\n", + __func__, (unsigned)alloc_type, addr, size); #endif /* H5MF_ALLOC_DEBUG */ /* check arguments */ @@ -1136,13 +1135,13 @@ H5MF_xfree(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size) * space is at the end of the file */ #ifdef H5MF_ALLOC_DEBUG_MORE - HDfprintf(stderr, "%s: fs_addr = %" PRIuHADDR "\n", __func__, f->shared->fs_addr[fs_type]); + fprintf(stderr, "%s: fs_addr = %" PRIuHADDR "\n", __func__, f->shared->fs_addr[fs_type]); #endif /* H5MF_ALLOC_DEBUG_MORE */ if (!H5_addr_defined(f->shared->fs_addr[fs_type])) { htri_t status; /* "can absorb" status for section into */ #ifdef H5MF_ALLOC_DEBUG_MORE - HDfprintf(stderr, "%s: Trying to avoid starting up free space manager\n", __func__); + fprintf(stderr, "%s: Trying to avoid starting up free space manager\n", __func__); #endif /* H5MF_ALLOC_DEBUG_MORE */ /* Try to shrink the file or absorb the block into a block aggregator */ if ((status = H5MF_try_shrink(f, alloc_type, addr, size)) < 0) @@ -1152,9 +1151,8 @@ H5MF_xfree(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size) HGOTO_DONE(SUCCEED) else if (size < f->shared->fs_threshold) { #ifdef H5MF_ALLOC_DEBUG_MORE - HDfprintf(stderr, - "%s: dropping addr = %" PRIuHADDR ", size = %" PRIuHSIZE ", on the floor!\n", - __func__, addr, size); + fprintf(stderr, "%s: dropping addr = %" PRIuHADDR ", size = %" PRIuHSIZE ", on the floor!\n", + __func__, addr, size); #endif /* H5MF_ALLOC_DEBUG_MORE */ HGOTO_DONE(SUCCEED) } /* end else-if */ @@ -1171,8 +1169,8 @@ H5MF_xfree(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size) */ if (f->shared->fs_state[fs_type] == H5F_FS_STATE_DELETING || !H5F_HAVE_FREE_SPACE_MANAGER(f)) { #ifdef H5MF_ALLOC_DEBUG_MORE - HDfprintf(stderr, "%s: dropping addr = %" PRIuHADDR ", size = %" PRIuHSIZE ", on the floor!\n", - __func__, addr, size); + fprintf(stderr, "%s: dropping addr = %" PRIuHADDR ", size = %" PRIuHSIZE ", on the floor!\n", + __func__, addr, size); #endif /* H5MF_ALLOC_DEBUG_MORE */ HGOTO_DONE(SUCCEED) } /* end if */ @@ -1195,7 +1193,7 @@ H5MF_xfree(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size) assert(f->shared->fs_man[fs_type]); #ifdef H5MF_ALLOC_DEBUG_MORE - HDfprintf(stderr, "%s: Before H5FS_sect_add()\n", __func__); + fprintf(stderr, "%s: Before H5FS_sect_add()\n", __func__); #endif /* H5MF_ALLOC_DEBUG_MORE */ /* Add to the free space for the file */ @@ -1204,7 +1202,7 @@ H5MF_xfree(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size) node = NULL; #ifdef H5MF_ALLOC_DEBUG_MORE - HDfprintf(stderr, "%s: After H5FS_sect_add()\n", __func__); + fprintf(stderr, "%s: After H5FS_sect_add()\n", __func__); #endif /* H5MF_ALLOC_DEBUG_MORE */ } /* end if */ else { @@ -1237,7 +1235,7 @@ done: HDONE_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't free simple section node") #ifdef H5MF_ALLOC_DEBUG - HDfprintf(stderr, "%s: Leaving, ret_value = %d\n", __func__, ret_value); + fprintf(stderr, "%s: Leaving, ret_value = %d\n", __func__, ret_value); #endif /* H5MF_ALLOC_DEBUG */ #ifdef H5MF_ALLOC_DEBUG_DUMP H5MF__sects_dump(f, stderr); @@ -1281,10 +1279,10 @@ H5MF_try_extend(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size, hsi FUNC_ENTER_NOAPI_TAG(H5AC__FREESPACE_TAG, FAIL) #ifdef H5MF_ALLOC_DEBUG - HDfprintf(stderr, - "%s: Entering: alloc_type = %u, addr = %" PRIuHADDR ", size = %" PRIuHSIZE - ", extra_requested = %" PRIuHSIZE "\n", - __func__, (unsigned)alloc_type, addr, size, extra_requested); + fprintf(stderr, + "%s: Entering: alloc_type = %u, addr = %" PRIuHADDR ", size = %" PRIuHSIZE + ", extra_requested = %" PRIuHSIZE "\n", + __func__, (unsigned)alloc_type, addr, size, extra_requested); #endif /* H5MF_ALLOC_DEBUG */ /* Sanity check */ @@ -1336,7 +1334,7 @@ H5MF_try_extend(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size, hsi if ((ret_value = H5F__try_extend(f, map_type, end, extra_requested + frag_size)) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTEXTEND, FAIL, "error extending file") #ifdef H5MF_ALLOC_DEBUG_MORE - HDfprintf(stderr, "%s: extended = %d\n", __func__, ret_value); + fprintf(stderr, "%s: extended = %d\n", __func__, ret_value); #endif /* H5MF_ALLOC_DEBUG_MORE */ /* If extending at EOA succeeds: */ @@ -1374,7 +1372,7 @@ H5MF_try_extend(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size, hsi HGOTO_ERROR(H5E_RESOURCE, H5E_CANTEXTEND, FAIL, "error extending aggregation block") #ifdef H5MF_ALLOC_DEBUG_MORE - HDfprintf(stderr, "%s: H5MF__aggr_try_extend = %d\n", __func__, ret_value); + fprintf(stderr, "%s: H5MF__aggr_try_extend = %d\n", __func__, ret_value); #endif /* H5MF_ALLOC_DEBUG_MORE */ } /* end if */ @@ -1400,7 +1398,7 @@ H5MF_try_extend(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size, hsi HGOTO_ERROR(H5E_RESOURCE, H5E_CANTEXTEND, FAIL, "error extending block in free space manager") #ifdef H5MF_ALLOC_DEBUG_MORE - HDfprintf(stderr, "%s: Try to H5FS_sect_try_extend = %d\n", __func__, ret_value); + fprintf(stderr, "%s: Try to H5FS_sect_try_extend = %d\n", __func__, ret_value); #endif /* H5MF_ALLOC_DEBUG_MORE */ } /* end if */ @@ -1411,8 +1409,7 @@ H5MF_try_extend(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size, hsi if (frag_size <= H5F_PGEND_META_THRES(f) && extra_requested <= frag_size) ret_value = TRUE; #ifdef H5MF_ALLOC_DEBUG_MORE - HDfprintf(stderr, "%s: Try to extend into the page end threshold = %d\n", __func__, - ret_value); + fprintf(stderr, "%s: Try to extend into the page end threshold = %d\n", __func__, ret_value); #endif /* H5MF_ALLOC_DEBUG_MORE */ } /* end if */ } /* end if */ @@ -1424,7 +1421,7 @@ done: H5AC_set_ring(orig_ring, NULL); #ifdef H5MF_ALLOC_DEBUG - HDfprintf(stderr, "%s: Leaving: ret_value = %d\n", __func__, ret_value); + fprintf(stderr, "%s: Leaving: ret_value = %d\n", __func__, ret_value); #endif /* H5MF_ALLOC_DEBUG */ #ifdef H5MF_ALLOC_DEBUG_DUMP H5MF__sects_dump(f, stderr); @@ -1459,8 +1456,8 @@ H5MF_try_shrink(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size) FUNC_ENTER_NOAPI_TAG(H5AC__FREESPACE_TAG, FAIL) #ifdef H5MF_ALLOC_DEBUG - HDfprintf(stderr, "%s: Entering - alloc_type = %u, addr = %" PRIuHADDR ", size = %" PRIuHSIZE "\n", - __func__, (unsigned)alloc_type, addr, size); + fprintf(stderr, "%s: Entering - alloc_type = %u, addr = %" PRIuHADDR ", size = %" PRIuHSIZE "\n", + __func__, (unsigned)alloc_type, addr, size); #endif /* H5MF_ALLOC_DEBUG */ /* check arguments */ @@ -1516,7 +1513,7 @@ done: HDONE_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't free simple section node") #ifdef H5MF_ALLOC_DEBUG - HDfprintf(stderr, "%s: Leaving, ret_value = %d\n", __func__, ret_value); + fprintf(stderr, "%s: Leaving, ret_value = %d\n", __func__, ret_value); #endif /* H5MF_ALLOC_DEBUG */ FUNC_LEAVE_NOAPI_TAG(ret_value) } /* end H5MF_try_shrink() */ @@ -1540,7 +1537,7 @@ H5MF_close(H5F_t *f) FUNC_ENTER_NOAPI_TAG(H5AC__FREESPACE_TAG, FAIL) #ifdef H5MF_ALLOC_DEBUG - HDfprintf(stderr, "%s: Entering\n", __func__); + fprintf(stderr, "%s: Entering\n", __func__); #endif /* H5MF_ALLOC_DEBUG */ /* check args */ @@ -1558,7 +1555,7 @@ H5MF_close(H5F_t *f) done: #ifdef H5MF_ALLOC_DEBUG - HDfprintf(stderr, "%s: Leaving\n", __func__); + fprintf(stderr, "%s: Leaving\n", __func__); #endif /* H5MF_ALLOC_DEBUG */ FUNC_LEAVE_NOAPI_TAG(ret_value) } /* end H5MF_close() */ @@ -1584,7 +1581,7 @@ H5MF__close_delete_fstype(H5F_t *f, H5F_mem_page_t type) FUNC_ENTER_PACKAGE #ifdef H5MF_ALLOC_DEBUG - HDfprintf(stderr, "%s: Entering\n", __func__); + fprintf(stderr, "%s: Entering\n", __func__); #endif /* H5MF_ALLOC_DEBUG */ /* check args */ @@ -1596,9 +1593,9 @@ H5MF__close_delete_fstype(H5F_t *f, H5F_mem_page_t type) assert((H5FD_mem_t)type < H5FD_MEM_NTYPES); #ifdef H5MF_ALLOC_DEBUG_MORE - HDfprintf(stderr, "%s: Check 1.0 - f->shared->fs_man[%u] = %p, f->shared->fs_addr[%u] = %" PRIuHADDR "\n", - __func__, (unsigned)type, (void *)f->shared->fs_man[type], (unsigned)type, - f->shared->fs_addr[type]); + fprintf(stderr, "%s: Check 1.0 - f->shared->fs_man[%u] = %p, f->shared->fs_addr[%u] = %" PRIuHADDR "\n", + __func__, (unsigned)type, (void *)f->shared->fs_man[type], (unsigned)type, + f->shared->fs_addr[type]); #endif /* H5MF_ALLOC_DEBUG_MORE */ /* If the free space manager for this type is open, close it */ @@ -1607,9 +1604,9 @@ H5MF__close_delete_fstype(H5F_t *f, H5F_mem_page_t type) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't close the free space manager") #ifdef H5MF_ALLOC_DEBUG_MORE - HDfprintf(stderr, "%s: Check 2.0 - f->shared->fs_man[%u] = %p, f->shared->fs_addr[%u] = %" PRIuHADDR "\n", - __func__, (unsigned)type, (void *)f->shared->fs_man[type], (unsigned)type, - f->shared->fs_addr[type]); + fprintf(stderr, "%s: Check 2.0 - f->shared->fs_man[%u] = %p, f->shared->fs_addr[%u] = %" PRIuHADDR "\n", + __func__, (unsigned)type, (void *)f->shared->fs_man[type], (unsigned)type, + f->shared->fs_addr[type]); #endif /* H5MF_ALLOC_DEBUG_MORE */ /* If there is free space manager info for this type, delete it */ @@ -1619,7 +1616,7 @@ H5MF__close_delete_fstype(H5F_t *f, H5F_mem_page_t type) done: #ifdef H5MF_ALLOC_DEBUG - HDfprintf(stderr, "%s: Leaving\n", __func__); + fprintf(stderr, "%s: Leaving\n", __func__); #endif /* H5MF_ALLOC_DEBUG */ FUNC_LEAVE_NOAPI(ret_value) } /* H5MF__close_delete() */ @@ -1648,7 +1645,7 @@ H5MF_try_close(H5F_t *f) FUNC_ENTER_NOAPI_TAG(H5AC__FREESPACE_TAG, FAIL) #ifdef H5MF_ALLOC_DEBUG - HDfprintf(stderr, "%s: Entering\n", __func__); + fprintf(stderr, "%s: Entering\n", __func__); #endif /* H5MF_ALLOC_DEBUG */ /* check args */ @@ -1727,7 +1724,7 @@ done: H5AC_set_ring(orig_ring, NULL); #ifdef H5MF_ALLOC_DEBUG - HDfprintf(stderr, "%s: Leaving\n", __func__); + fprintf(stderr, "%s: Leaving\n", __func__); #endif /* H5MF_ALLOC_DEBUG */ FUNC_LEAVE_NOAPI_TAG(ret_value) } /* H5MF_try_close() */ @@ -1755,7 +1752,7 @@ H5MF__close_aggrfs(H5F_t *f) FUNC_ENTER_PACKAGE #ifdef H5MF_ALLOC_DEBUG - HDfprintf(stderr, "%s: Entering\n", __func__); + fprintf(stderr, "%s: Entering\n", __func__); #endif /* H5MF_ALLOC_DEBUG */ /* check args */ @@ -1893,7 +1890,7 @@ done: H5AC_set_ring(orig_ring, NULL); #ifdef H5MF_ALLOC_DEBUG - HDfprintf(stderr, "%s: Leaving\n", __func__); + fprintf(stderr, "%s: Leaving\n", __func__); #endif /* H5MF_ALLOC_DEBUG */ FUNC_LEAVE_NOAPI(ret_value) } /* end H5MF__close_aggrfs() */ @@ -1921,7 +1918,7 @@ H5MF__close_pagefs(H5F_t *f) FUNC_ENTER_PACKAGE #ifdef H5MF_ALLOC_DEBUG - HDfprintf(stderr, "%s: Entering\n", __func__); + fprintf(stderr, "%s: Entering\n", __func__); #endif /* H5MF_ALLOC_DEBUG */ /* check args */ @@ -2068,7 +2065,7 @@ done: H5AC_set_ring(orig_ring, NULL); #ifdef H5MF_ALLOC_DEBUG - HDfprintf(stderr, "%s: Leaving\n", __func__); + fprintf(stderr, "%s: Leaving\n", __func__); #endif /* H5MF_ALLOC_DEBUG */ FUNC_LEAVE_NOAPI(ret_value) } /* end H5MF__close_pagefs() */ diff --git a/src/H5MFaggr.c b/src/H5MFaggr.c index 70d807f..1f6a7ec 100644 --- a/src/H5MFaggr.c +++ b/src/H5MFaggr.c @@ -91,7 +91,7 @@ H5MF_aggr_vfd_alloc(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size) FUNC_ENTER_NOAPI(HADDR_UNDEF) #ifdef H5MF_AGGR_DEBUG - HDfprintf(stderr, "%s: alloc_type = %u, size = %" PRIuHSIZE "\n", __func__, (unsigned)alloc_type, size); + fprintf(stderr, "%s: alloc_type = %u, size = %" PRIuHSIZE "\n", __func__, (unsigned)alloc_type, size); #endif /* H5MF_AGGR_DEBUG */ /* check arguments */ @@ -119,8 +119,8 @@ H5MF_aggr_vfd_alloc(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size) done: #ifdef H5MF_AGGR_DEBUG - HDfprintf(stderr, "%s: Leaving: ret_value = %" PRIuHADDR ", size = %" PRIuHSIZE "\n", __func__, ret_value, - size); + fprintf(stderr, "%s: Leaving: ret_value = %" PRIuHADDR ", size = %" PRIuHSIZE "\n", __func__, ret_value, + size); #endif /* H5MF_AGGR_DEBUG */ FUNC_LEAVE_NOAPI(ret_value) @@ -150,7 +150,7 @@ H5MF__aggr_alloc(H5F_t *f, H5F_blk_aggr_t *aggr, H5F_blk_aggr_t *other_aggr, H5F FUNC_ENTER_PACKAGE #ifdef H5MF_AGGR_DEBUG - HDfprintf(stderr, "%s: type = %u, size = %" PRIuHSIZE "\n", __func__, (unsigned)type, size); + fprintf(stderr, "%s: type = %u, size = %" PRIuHSIZE "\n", __func__, (unsigned)type, size); #endif /* H5MF_AGGR_DEBUG */ /* check args */ @@ -199,8 +199,8 @@ H5MF__aggr_alloc(H5F_t *f, H5F_blk_aggr_t *aggr, H5F_blk_aggr_t *other_aggr, H5F H5FD_mem_t alloc_type, other_alloc_type; /* Current aggregator & 'other' aggregator types */ #ifdef H5MF_AGGR_DEBUG - HDfprintf(stderr, "%s: aggr = {%" PRIuHADDR ", %" PRIuHSIZE ", %" PRIuHSIZE "}\n", __func__, - aggr->addr, aggr->tot_size, aggr->size); + fprintf(stderr, "%s: aggr = {%" PRIuHADDR ", %" PRIuHSIZE ", %" PRIuHSIZE "}\n", __func__, + aggr->addr, aggr->tot_size, aggr->size); #endif /* H5MF_AGGR_DEBUG */ /* Turn off alignment if allocation < threshold */ @@ -268,7 +268,7 @@ H5MF__aggr_alloc(H5F_t *f, H5F_blk_aggr_t *aggr, H5F_blk_aggr_t *other_aggr, H5F /* Allocate another block */ #ifdef H5MF_AGGR_DEBUG - HDfprintf(stderr, "%s: Allocating block\n", __func__); + fprintf(stderr, "%s: Allocating block\n", __func__); #endif /* H5MF_AGGR_DEBUG */ if (aggr_frag_size > (ext_size - size)) @@ -388,7 +388,7 @@ H5MF__aggr_alloc(H5F_t *f, H5F_blk_aggr_t *aggr, H5F_blk_aggr_t *other_aggr, H5F done: #ifdef H5MF_AGGR_DEBUG - HDfprintf(stderr, "%s: ret_value = %" PRIuHADDR "\n", __func__, ret_value); + fprintf(stderr, "%s: ret_value = %" PRIuHADDR "\n", __func__, ret_value); #endif /* H5MF_AGGR_DEBUG */ FUNC_LEAVE_NOAPI(ret_value) } /* end H5MF__aggr_alloc() */ @@ -537,11 +537,11 @@ done: if (H5_addr_eq((sect->sect_info.addr + sect->sect_info.size), aggr->addr) || H5_addr_eq((aggr->addr + aggr->size), sect->sect_info.addr)) { #ifdef H5MF_AGGR_DEBUG - HDfprintf(stderr, - "%s: section {%" PRIuHADDR ", %" PRIuHSIZE "} adjoins aggr = {%" PRIuHADDR - ", %" PRIuHSIZE "}\n", - "H5MF__aggr_can_absorb", sect->sect_info.addr, sect->sect_info.size, aggr->addr, - aggr->size); + fprintf(stderr, + "%s: section {%" PRIuHADDR ", %" PRIuHSIZE "} adjoins aggr = {%" PRIuHADDR + ", %" PRIuHSIZE "}\n", + "H5MF__aggr_can_absorb", sect->sect_info.addr, sect->sect_info.size, aggr->addr, + aggr->size); #endif /* H5MF_AGGR_DEBUG */ /* Check if aggregator would get too large and should be absorbed into section */ if ((aggr->size + sect->sect_info.size) >= aggr->alloc_size) @@ -590,11 +590,11 @@ done: /* Check if the section adjoins the beginning or end of the aggregator */ if (H5_addr_eq((sect->sect_info.addr + sect->sect_info.size), aggr->addr)) { #ifdef H5MF_AGGR_DEBUG - HDfprintf(stderr, - "%s: aggr {%" PRIuHADDR ", %" PRIuHSIZE "} adjoins front of section = {%" PRIuHADDR - ", %" PRIuHSIZE "}\n", - "H5MF__aggr_absorb", aggr->addr, aggr->size, sect->sect_info.addr, - sect->sect_info.size); + fprintf(stderr, + "%s: aggr {%" PRIuHADDR ", %" PRIuHSIZE "} adjoins front of section = {%" PRIuHADDR + ", %" PRIuHSIZE "}\n", + "H5MF__aggr_absorb", aggr->addr, aggr->size, sect->sect_info.addr, + sect->sect_info.size); #endif /* H5MF_AGGR_DEBUG */ /* Absorb aggregator onto end of section */ sect->sect_info.size += aggr->size; @@ -604,11 +604,11 @@ done: assert(H5_addr_eq((aggr->addr + aggr->size), sect->sect_info.addr)); #ifdef H5MF_AGGR_DEBUG - HDfprintf(stderr, - "%s: aggr {%" PRIuHADDR ", %" PRIuHSIZE "} adjoins end of section = {%" PRIuHADDR - ", %" PRIuHSIZE "}\n", - "H5MF__aggr_absorb", aggr->addr, aggr->size, sect->sect_info.addr, - sect->sect_info.size); + fprintf(stderr, + "%s: aggr {%" PRIuHADDR ", %" PRIuHSIZE "} adjoins end of section = {%" PRIuHADDR + ", %" PRIuHSIZE "}\n", + "H5MF__aggr_absorb", aggr->addr, aggr->size, sect->sect_info.addr, + sect->sect_info.size); #endif /* H5MF_AGGR_DEBUG */ /* Absorb aggregator onto beginning of section */ sect->sect_info.addr -= aggr->size; @@ -624,11 +624,11 @@ done: /* Check if the section adjoins the beginning or end of the aggregator */ if (H5_addr_eq((sect->sect_info.addr + sect->sect_info.size), aggr->addr)) { #ifdef H5MF_AGGR_DEBUG - HDfprintf(stderr, - "%s: section {%" PRIuHADDR ", %" PRIuHSIZE "} adjoins front of aggr = {%" PRIuHADDR - ", %" PRIuHSIZE "}\n", - "H5MF__aggr_absorb", sect->sect_info.addr, sect->sect_info.size, aggr->addr, - aggr->size); + fprintf(stderr, + "%s: section {%" PRIuHADDR ", %" PRIuHSIZE "} adjoins front of aggr = {%" PRIuHADDR + ", %" PRIuHSIZE "}\n", + "H5MF__aggr_absorb", sect->sect_info.addr, sect->sect_info.size, aggr->addr, + aggr->size); #endif /* H5MF_AGGR_DEBUG */ /* Absorb section onto front of aggregator */ aggr->addr -= sect->sect_info.size; @@ -644,11 +644,11 @@ done: assert(H5_addr_eq((aggr->addr + aggr->size), sect->sect_info.addr)); #ifdef H5MF_AGGR_DEBUG - HDfprintf(stderr, - "%s: section {%" PRIuHADDR ", %" PRIuHSIZE "} adjoins end of aggr = {%" PRIuHADDR - ", %" PRIuHSIZE "}\n", - "H5MF__aggr_absorb", sect->sect_info.addr, sect->sect_info.size, aggr->addr, - aggr->size); + fprintf(stderr, + "%s: section {%" PRIuHADDR ", %" PRIuHSIZE "} adjoins end of aggr = {%" PRIuHADDR + ", %" PRIuHSIZE "}\n", + "H5MF__aggr_absorb", sect->sect_info.addr, sect->sect_info.size, aggr->addr, + aggr->size); #endif /* H5MF_AGGR_DEBUG */ /* Absorb section onto end of aggregator */ aggr->size += sect->sect_info.size; @@ -734,8 +734,8 @@ done: tmp_addr = aggr->addr; tmp_size = aggr->size; #ifdef H5MF_AGGR_DEBUG - HDfprintf(stderr, "%s: tmp_addr = %" PRIuHADDR ", tmp_size = %" PRIuHSIZE "\n", __func__, - tmp_addr, tmp_size); + fprintf(stderr, "%s: tmp_addr = %" PRIuHADDR ", tmp_size = %" PRIuHSIZE "\n", __func__, tmp_addr, + tmp_size); #endif /* H5MF_AGGR_DEBUG */ /* Reset aggregator block information */ diff --git a/src/H5MFdbg.c b/src/H5MFdbg.c index 6b9f897..d42c1f1 100644 --- a/src/H5MFdbg.c +++ b/src/H5MFdbg.c @@ -103,20 +103,20 @@ H5MF__sects_debug_cb(H5FS_section_info_t *_sect, void *_udata) assert(udata); /* Print generic section information */ - HDfprintf(udata->stream, "%*s%-*s %s\n", udata->indent, "", udata->fwidth, "Section type:", - (sect->sect_info.type == H5MF_FSPACE_SECT_SIMPLE - ? "simple" - : (sect->sect_info.type == H5MF_FSPACE_SECT_SMALL - ? "small" - : (sect->sect_info.type == H5MF_FSPACE_SECT_LARGE ? "large" : "unknown")))); - HDfprintf(udata->stream, "%*s%-*s %" PRIuHADDR "\n", udata->indent, "", udata->fwidth, - "Section address:", sect->sect_info.addr); - HDfprintf(udata->stream, "%*s%-*s %" PRIuHSIZE "\n", udata->indent, "", udata->fwidth, - "Section size:", sect->sect_info.size); - HDfprintf(udata->stream, "%*s%-*s %" PRIuHADDR "\n", udata->indent, "", udata->fwidth, - "End of section:", (haddr_t)((sect->sect_info.addr + sect->sect_info.size) - 1)); - HDfprintf(udata->stream, "%*s%-*s %s\n", udata->indent, "", udata->fwidth, - "Section state:", (sect->sect_info.state == H5FS_SECT_LIVE ? "live" : "serialized")); + fprintf(udata->stream, "%*s%-*s %s\n", udata->indent, "", udata->fwidth, "Section type:", + (sect->sect_info.type == H5MF_FSPACE_SECT_SIMPLE + ? "simple" + : (sect->sect_info.type == H5MF_FSPACE_SECT_SMALL + ? "small" + : (sect->sect_info.type == H5MF_FSPACE_SECT_LARGE ? "large" : "unknown")))); + fprintf(udata->stream, "%*s%-*s %" PRIuHADDR "\n", udata->indent, "", udata->fwidth, + "Section address:", sect->sect_info.addr); + fprintf(udata->stream, "%*s%-*s %" PRIuHSIZE "\n", udata->indent, "", udata->fwidth, + "Section size:", sect->sect_info.size); + fprintf(udata->stream, "%*s%-*s %" PRIuHADDR "\n", udata->indent, "", udata->fwidth, + "End of section:", (haddr_t)((sect->sect_info.addr + sect->sect_info.size) - 1)); + fprintf(udata->stream, "%*s%-*s %s\n", udata->indent, "", udata->fwidth, + "Section state:", (sect->sect_info.state == H5FS_SECT_LIVE ? "live" : "serialized")); /* Dump section-specific debugging information */ if (H5FS_sect_debug(udata->fspace, _sect, udata->stream, udata->indent + 3, MAX(0, udata->fwidth - 3)) < @@ -209,7 +209,7 @@ H5MF__sects_dump(H5F_t *f, FILE *stream) FUNC_ENTER_PACKAGE_TAG(H5AC__FREESPACE_TAG) #ifdef H5MF_ALLOC_DEBUG - HDfprintf(stderr, "%s: Dumping file free space sections\n", __func__); + fprintf(stderr, "%s: Dumping file free space sections\n", __func__); #endif /* H5MF_ALLOC_DEBUG */ /* @@ -222,7 +222,7 @@ H5MF__sects_dump(H5F_t *f, FILE *stream) if (HADDR_UNDEF == (eoa = H5F_get_eoa(f, H5FD_MEM_DEFAULT))) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "driver get_eoa request failed") #ifdef H5MF_ALLOC_DEBUG - HDfprintf(stderr, "%s: for type = H5FD_MEM_DEFAULT, eoa = %" PRIuHADDR "\n", __func__, eoa); + fprintf(stderr, "%s: for type = H5FD_MEM_DEFAULT, eoa = %" PRIuHADDR "\n", __func__, eoa); #endif /* H5MF_ALLOC_DEBUG */ if (H5F_PAGED_AGGR(f)) { /* File space paging */ @@ -230,10 +230,10 @@ H5MF__sects_dump(H5F_t *f, FILE *stream) for (ptype = H5F_MEM_PAGE_META; ptype < H5F_MEM_PAGE_NTYPES; ptype++) { /* Print header for type */ - HDfprintf(stream, "%*sFile Free Space Info for type = %u:\n", indent, "", (unsigned)ptype); + fprintf(stream, "%*sFile Free Space Info for type = %u:\n", indent, "", (unsigned)ptype); /* Print header for sections */ - HDfprintf(stream, "%*sSections:\n", indent + 3, ""); + fprintf(stream, "%*sSections:\n", indent + 3, ""); /* If there is a free space manager for this type, iterate over them */ if (f->shared->fs_man[ptype]) { @@ -251,7 +251,7 @@ H5MF__sects_dump(H5F_t *f, FILE *stream) } /* end if */ else /* No sections of this type */ - HDfprintf(stream, "%*s<none>\n", indent + 6, ""); + fprintf(stream, "%*s<none>\n", indent + 6, ""); } /* end for */ } /* end if */ else { /* not file space paging */ @@ -264,34 +264,33 @@ H5MF__sects_dump(H5F_t *f, FILE *stream) /* Retrieve metadata aggregator info, if available */ H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); #ifdef H5MF_ALLOC_DEBUG - HDfprintf(stderr, - "%s: ma_addr = %" PRIuHADDR ", ma_size = %" PRIuHSIZE ", end of ma = %" PRIuHADDR "\n", - __func__, ma_addr, ma_size, (haddr_t)((ma_addr + ma_size) - 1)); + fprintf(stderr, + "%s: ma_addr = %" PRIuHADDR ", ma_size = %" PRIuHSIZE ", end of ma = %" PRIuHADDR "\n", + __func__, ma_addr, ma_size, (haddr_t)((ma_addr + ma_size) - 1)); #endif /* H5MF_ALLOC_DEBUG */ /* Retrieve 'small data' aggregator info, if available */ H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sda_addr, &sda_size); #ifdef H5MF_ALLOC_DEBUG - HDfprintf(stderr, - "%s: sda_addr = %" PRIuHADDR ", sda_size = %" PRIuHSIZE ", end of sda = %" PRIuHADDR "\n", - __func__, sda_addr, sda_size, (haddr_t)((sda_addr + sda_size) - 1)); + fprintf(stderr, + "%s: sda_addr = %" PRIuHADDR ", sda_size = %" PRIuHSIZE ", end of sda = %" PRIuHADDR "\n", + __func__, sda_addr, sda_size, (haddr_t)((sda_addr + sda_size) - 1)); #endif /* H5MF_ALLOC_DEBUG */ /* Iterate over all the free space types that have managers and dump each free list's space */ for (atype = H5FD_MEM_DEFAULT; atype < H5FD_MEM_NTYPES; atype++) { /* Print header for type */ - HDfprintf(stream, "%*sFile Free Space Info for type = %u:\n", indent, "", (unsigned)atype); + fprintf(stream, "%*sFile Free Space Info for type = %u:\n", indent, "", (unsigned)atype); /* Check for this type being mapped to another type */ if (H5FD_MEM_DEFAULT == f->shared->fs_type_map[atype] || atype == f->shared->fs_type_map[atype]) { /* Retrieve the 'eoa' for this file memory type */ if (HADDR_UNDEF == (eoa = H5F_get_eoa(f, atype))) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "driver get_eoa request failed") - HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", MAX(0, fwidth - 3), - "eoa:", eoa); + fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", MAX(0, fwidth - 3), "eoa:", eoa); /* Print header for sections */ - HDfprintf(stream, "%*sSections:\n", indent + 3, ""); + fprintf(stream, "%*sSections:\n", indent + 3, ""); /* If there is a free space manager for this type, iterate over them */ if (f->shared->fs_man[atype]) { @@ -308,16 +307,16 @@ H5MF__sects_dump(H5F_t *f, FILE *stream) HGOTO_ERROR(H5E_HEAP, H5E_BADITER, FAIL, "can't iterate over heap's free space") } /* end if */ else /* No sections of this type */ - HDfprintf(stream, "%*s<none>\n", indent + 6, ""); + fprintf(stream, "%*s<none>\n", indent + 6, ""); } /* end if */ else - HDfprintf(stream, "%*sMapped to type = %u\n", indent, "", - (unsigned)f->shared->fs_type_map[atype]); + fprintf(stream, "%*sMapped to type = %u\n", indent, "", + (unsigned)f->shared->fs_type_map[atype]); } /* end for */ } /* end else */ done: - HDfprintf(stderr, "%s: Done dumping file free space sections\n", __func__); + fprintf(stderr, "%s: Done dumping file free space sections\n", __func__); FUNC_LEAVE_NOAPI_TAG(ret_value) } /* end H5MF__sects_dump() */ #endif /* H5MF_ALLOC_DEBUG_DUMP */ diff --git a/src/H5MFsection.c b/src/H5MFsection.c index f2ed3b2..ebb426a 100644 --- a/src/H5MFsection.c +++ b/src/H5MFsection.c @@ -471,9 +471,8 @@ H5MF__sect_simple_can_shrink(const H5FS_section_info_t *_sect, void *_udata) /* Set the shrinking type */ udata->shrink = H5MF_SHRINK_EOA; #ifdef H5MF_ALLOC_DEBUG_MORE - HDfprintf(stderr, - "%s: section {%" PRIuHADDR ", %" PRIuHSIZE "}, shrinks file, eoa = %" PRIuHADDR "\n", - __func__, sect->sect_info.addr, sect->sect_info.size, eoa); + fprintf(stderr, "%s: section {%" PRIuHADDR ", %" PRIuHSIZE "}, shrinks file, eoa = %" PRIuHADDR "\n", + __func__, sect->sect_info.addr, sect->sect_info.size, eoa); #endif /* H5MF_ALLOC_DEBUG_MORE */ /* Indicate shrinking can occur */ @@ -496,9 +495,8 @@ H5MF__sect_simple_can_shrink(const H5FS_section_info_t *_sect, void *_udata) /* Set the aggregator to operate on */ udata->aggr = &(udata->f->shared->meta_aggr); #ifdef H5MF_ALLOC_DEBUG_MORE - HDfprintf(stderr, - "%s: section {%" PRIuHADDR ", %" PRIuHSIZE "}, adjoins metadata aggregator\n", - __func__, sect->sect_info.addr, sect->sect_info.size); + fprintf(stderr, "%s: section {%" PRIuHADDR ", %" PRIuHSIZE "}, adjoins metadata aggregator\n", + __func__, sect->sect_info.addr, sect->sect_info.size); #endif /* H5MF_ALLOC_DEBUG_MORE */ /* Indicate shrinking can occur */ @@ -518,9 +516,9 @@ H5MF__sect_simple_can_shrink(const H5FS_section_info_t *_sect, void *_udata) /* Set the aggregator to operate on */ udata->aggr = &(udata->f->shared->sdata_aggr); #ifdef H5MF_ALLOC_DEBUG_MORE - HDfprintf(stderr, - "%s: section {%" PRIuHADDR ", %" PRIuHSIZE "}, adjoins small data aggregator\n", - __func__, sect->sect_info.addr, sect->sect_info.size); + fprintf(stderr, + "%s: section {%" PRIuHADDR ", %" PRIuHSIZE "}, adjoins small data aggregator\n", + __func__, sect->sect_info.addr, sect->sect_info.size); #endif /* H5MF_ALLOC_DEBUG_MORE */ /* Indicate shrinking can occur */ @@ -627,8 +625,8 @@ H5MF__sect_small_add(H5FS_section_info_t **_sect, unsigned *flags, void *_udata) FUNC_ENTER_PACKAGE #ifdef H5MF_ALLOC_DEBUG_MORE - HDfprintf(stderr, "%s: Entering, section {%" PRIuHADDR ", %" PRIuHSIZE "}\n", __func__, - (*sect)->sect_info.addr, (*sect)->sect_info.size); + fprintf(stderr, "%s: Entering, section {%" PRIuHADDR ", %" PRIuHSIZE "}\n", __func__, + (*sect)->sect_info.addr, (*sect)->sect_info.size); #endif /* H5MF_ALLOC_DEBUG_MORE */ /* Do not adjust the section raw data or global heap data */ @@ -648,15 +646,15 @@ H5MF__sect_small_add(H5FS_section_info_t **_sect, unsigned *flags, void *_udata) *flags &= (unsigned)~H5FS_ADD_RETURNED_SPACE; *flags |= H5FS_PAGE_END_NO_ADD; #ifdef H5MF_ALLOC_DEBUG_MORE - HDfprintf(stderr, "%s: section is dropped\n", __func__); + fprintf(stderr, "%s: section is dropped\n", __func__); #endif /* H5MF_ALLOC_DEBUG_MORE */ } /* end if */ /* Adjust the section if it is not at page end but its size + prem is at page end */ else if (prem <= H5F_PGEND_META_THRES(udata->f)) { (*sect)->sect_info.size += prem; #ifdef H5MF_ALLOC_DEBUG_MORE - HDfprintf(stderr, "%s: section is adjusted {%" PRIuHADDR ", %" PRIuHSIZE "}\n", __func__, - (*sect)->sect_info.addr, (*sect)->sect_info.size); + fprintf(stderr, "%s: section is adjusted {%" PRIuHADDR ", %" PRIuHSIZE "}\n", __func__, + (*sect)->sect_info.addr, (*sect)->sect_info.size); #endif /* H5MF_ALLOC_DEBUG_MORE */ } /* end if */ @@ -704,7 +702,7 @@ H5MF__sect_small_can_merge(const H5FS_section_info_t *_sect1, const H5FS_section ret_value = FALSE; #ifdef H5MF_ALLOC_DEBUG_MORE - HDfprintf(stderr, "%s: Leaving: ret_value = %d\n", __func__, ret_value); + fprintf(stderr, "%s: Leaving: ret_value = %d\n", __func__, ret_value); #endif /* H5MF_ALLOC_DEBUG_MORE */ FUNC_LEAVE_NOAPI(ret_value) @@ -808,7 +806,7 @@ H5MF__sect_large_can_merge(const H5FS_section_info_t *_sect1, const H5FS_section ret_value = H5_addr_eq(sect1->sect_info.addr + sect1->sect_info.size, sect2->sect_info.addr); #ifdef H5MF_ALLOC_DEBUG_MORE - HDfprintf(stderr, "%s: Leaving: ret_value = %d\n", __func__, ret_value); + fprintf(stderr, "%s: Leaving: ret_value = %d\n", __func__, ret_value); #endif /* H5MF_ALLOC_DEBUG_MORE */ FUNC_LEAVE_NOAPI(ret_value) @@ -896,9 +894,8 @@ H5MF__sect_large_can_shrink(const H5FS_section_info_t *_sect, void *_udata) /* Set the shrinking type */ udata->shrink = H5MF_SHRINK_EOA; #ifdef H5MF_ALLOC_DEBUG_MORE - HDfprintf(stderr, - "%s: section {%" PRIuHADDR ", %" PRIuHSIZE "}, shrinks file, eoa = %" PRIuHADDR "\n", - __func__, sect->sect_info.addr, sect->sect_info.size, eoa); + fprintf(stderr, "%s: section {%" PRIuHADDR ", %" PRIuHSIZE "}, shrinks file, eoa = %" PRIuHADDR "\n", + __func__, sect->sect_info.addr, sect->sect_info.size, eoa); #endif /* H5MF_ALLOC_DEBUG_MORE */ /* Indicate shrinking can occur */ diff --git a/src/H5Oainfo.c b/src/H5Oainfo.c index fd651e3..ca553ad 100644 --- a/src/H5Oainfo.c +++ b/src/H5Oainfo.c @@ -510,19 +510,19 @@ H5O__ainfo_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int i assert(indent >= 0); assert(fwidth >= 0); - HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, "Number of attributes:", ainfo->nattrs); - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, - "Track creation order of attributes:", ainfo->track_corder ? "TRUE" : "FALSE"); - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, - "Index creation order of attributes:", ainfo->index_corder ? "TRUE" : "FALSE"); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, - "Max. creation index value:", (unsigned)ainfo->max_crt_idx); - HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, - "'Dense' attribute storage fractal heap address:", ainfo->fheap_addr); - HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, - "'Dense' attribute storage name index v2 B-tree address:", ainfo->name_bt2_addr); - HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, - "'Dense' attribute storage creation order index v2 B-tree address:", ainfo->corder_bt2_addr); + fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, "Number of attributes:", ainfo->nattrs); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, + "Track creation order of attributes:", ainfo->track_corder ? "TRUE" : "FALSE"); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, + "Index creation order of attributes:", ainfo->index_corder ? "TRUE" : "FALSE"); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, + "Max. creation index value:", (unsigned)ainfo->max_crt_idx); + fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, + "'Dense' attribute storage fractal heap address:", ainfo->fheap_addr); + fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, + "'Dense' attribute storage name index v2 B-tree address:", ainfo->name_bt2_addr); + fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, + "'Dense' attribute storage creation order index v2 B-tree address:", ainfo->corder_bt2_addr); FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5O__ainfo_debug() */ diff --git a/src/H5Oattr.c b/src/H5Oattr.c index 587dd43..1452ae3 100644 --- a/src/H5Oattr.c +++ b/src/H5Oattr.c @@ -835,7 +835,7 @@ H5O__attr_debug(H5F_t *f, const void *_mesg, FILE *stream, int indent, int fwidt assert(indent >= 0); assert(fwidth >= 0); - HDfprintf(stream, "%*s%-*s \"%s\"\n", indent, "", fwidth, "Name:", mesg->shared->name); + fprintf(stream, "%*s%-*s \"%s\"\n", indent, "", fwidth, "Name:", mesg->shared->name); switch (mesg->shared->encoding) { case H5T_CSET_ASCII: s = "ASCII"; @@ -869,25 +869,25 @@ H5O__attr_debug(H5F_t *f, const void *_mesg, FILE *stream, int indent, int fwidt s = buf; break; } /* end switch */ - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Character Set of Name:", s); - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, - "Object opened:", mesg->obj_opened ? "TRUE" : "FALSE"); - HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Object:", mesg->oloc.addr); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Character Set of Name:", s); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, + "Object opened:", mesg->obj_opened ? "TRUE" : "FALSE"); + fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Object:", mesg->oloc.addr); /* Check for attribute creation order index on the attribute */ if (mesg->shared->crt_idx != H5O_MAX_CRT_ORDER_IDX) - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, - "Creation Index:", (unsigned)mesg->shared->crt_idx); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, + "Creation Index:", (unsigned)mesg->shared->crt_idx); - HDfprintf(stream, "%*sDatatype...\n", indent, ""); - HDfprintf(stream, "%*s%-*s %lu\n", indent + 3, "", MAX(0, fwidth - 3), - "Encoded Size:", (unsigned long)(mesg->shared->dt_size)); + fprintf(stream, "%*sDatatype...\n", indent, ""); + fprintf(stream, "%*s%-*s %lu\n", indent + 3, "", MAX(0, fwidth - 3), + "Encoded Size:", (unsigned long)(mesg->shared->dt_size)); if ((H5O_MSG_DTYPE->debug)(f, mesg->shared->dt, stream, indent + 3, MAX(0, fwidth - 3)) < 0) HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "unable to display datatype message info") - HDfprintf(stream, "%*sDataspace...\n", indent, ""); - HDfprintf(stream, "%*s%-*s %lu\n", indent + 3, "", MAX(0, fwidth - 3), - "Encoded Size:", (unsigned long)(mesg->shared->ds_size)); + fprintf(stream, "%*sDataspace...\n", indent, ""); + fprintf(stream, "%*s%-*s %lu\n", indent + 3, "", MAX(0, fwidth - 3), + "Encoded Size:", (unsigned long)(mesg->shared->ds_size)); if (H5S_debug(f, mesg->shared->ds, stream, indent + 3, MAX(0, fwidth - 3)) < 0) HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "unable to display dataspace message info") diff --git a/src/H5Obogus.c b/src/H5Obogus.c index 491dbf9..20beaef 100644 --- a/src/H5Obogus.c +++ b/src/H5Obogus.c @@ -213,7 +213,7 @@ H5O__bogus_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int i assert(indent >= 0); assert(fwidth >= 0); - HDfprintf(stream, "%*s%-*s `%u'\n", indent, "", fwidth, "Bogus Value:", mesg->u); + fprintf(stream, "%*s%-*s `%u'\n", indent, "", fwidth, "Bogus Value:", mesg->u); FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5O__bogus_debug() */ diff --git a/src/H5Obtreek.c b/src/H5Obtreek.c index 8da10a9..7b80de8 100644 --- a/src/H5Obtreek.c +++ b/src/H5Obtreek.c @@ -245,12 +245,12 @@ H5O__btreek_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int assert(indent >= 0); assert(fwidth >= 0); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, - "Chunked storage internal B-tree 'K' value:", mesg->btree_k[H5B_CHUNK_ID]); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, - "Symbol table node internal B-tree 'K' value:", mesg->btree_k[H5B_SNODE_ID]); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, - "Symbol table node leaf 'K' value:", mesg->sym_leaf_k); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, + "Chunked storage internal B-tree 'K' value:", mesg->btree_k[H5B_CHUNK_ID]); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, + "Symbol table node internal B-tree 'K' value:", mesg->btree_k[H5B_SNODE_ID]); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, + "Symbol table node leaf 'K' value:", mesg->sym_leaf_k); FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5O__btreek_debug() */ diff --git a/src/H5Ocache_image.c b/src/H5Ocache_image.c index 2eae6b3..66ad297 100644 --- a/src/H5Ocache_image.c +++ b/src/H5Ocache_image.c @@ -328,11 +328,11 @@ H5O__mdci_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int in assert(indent >= 0); assert(fwidth >= 0); - HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, - "Metadata Cache Image Block address:", mdci->addr); + fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, + "Metadata Cache Image Block address:", mdci->addr); - HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, - "Metadata Cache Image Block size in bytes:", mdci->size); + fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, + "Metadata Cache Image Block size in bytes:", mdci->size); FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5O__mdci_debug() */ diff --git a/src/H5Ocont.c b/src/H5Ocont.c index da05ae2..9871c56 100644 --- a/src/H5Ocont.c +++ b/src/H5Ocont.c @@ -260,11 +260,11 @@ H5O__cont_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int in assert(indent >= 0); assert(fwidth >= 0); - HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Continuation address:", cont->addr); + fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Continuation address:", cont->addr); - HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth, - "Continuation size in bytes:", (unsigned long)(cont->size)); - HDfprintf(stream, "%*s%-*s %d\n", indent, "", fwidth, "Points to chunk number:", (int)(cont->chunkno)); + fprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth, + "Continuation size in bytes:", (unsigned long)(cont->size)); + fprintf(stream, "%*s%-*s %d\n", indent, "", fwidth, "Points to chunk number:", (int)(cont->chunkno)); FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5O__cont_debug() */ diff --git a/src/H5Odbg.c b/src/H5Odbg.c index 040189c..2e7e408 100644 --- a/src/H5Odbg.c +++ b/src/H5Odbg.c @@ -291,28 +291,27 @@ H5O__debug_real(H5F_t *f, H5O_t *oh, haddr_t addr, FILE *stream, int indent, int assert(fwidth >= 0); /* debug */ - HDfprintf(stream, "%*sObject Header...\n", indent, ""); + fprintf(stream, "%*sObject Header...\n", indent, ""); - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, - "Dirty:", oh->cache_info.is_dirty ? "TRUE" : "FALSE"); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Version:", oh->version); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, - "Header size (in bytes):", (unsigned)H5O_SIZEOF_HDR(oh)); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Number of links:", oh->nlink); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Dirty:", oh->cache_info.is_dirty ? "TRUE" : "FALSE"); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Version:", oh->version); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, + "Header size (in bytes):", (unsigned)H5O_SIZEOF_HDR(oh)); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Number of links:", oh->nlink); /* Extra information for later versions */ if (oh->version > H5O_VERSION_1) { /* Display object's status flags */ - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Attribute creation order tracked:", - (oh->flags & H5O_HDR_ATTR_CRT_ORDER_TRACKED) ? "Yes" : "No"); - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Attribute creation order indexed:", - (oh->flags & H5O_HDR_ATTR_CRT_ORDER_INDEXED) ? "Yes" : "No"); - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Attribute storage phase change values:", - (oh->flags & H5O_HDR_ATTR_STORE_PHASE_CHANGE) ? "Non-default" : "Default"); - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, - "Timestamps:", (oh->flags & H5O_HDR_STORE_TIMES) ? "Enabled" : "Disabled"); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Attribute creation order tracked:", + (oh->flags & H5O_HDR_ATTR_CRT_ORDER_TRACKED) ? "Yes" : "No"); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Attribute creation order indexed:", + (oh->flags & H5O_HDR_ATTR_CRT_ORDER_INDEXED) ? "Yes" : "No"); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Attribute storage phase change values:", + (oh->flags & H5O_HDR_ATTR_STORE_PHASE_CHANGE) ? "Non-default" : "Default"); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, + "Timestamps:", (oh->flags & H5O_HDR_STORE_TIMES) ? "Enabled" : "Disabled"); if (oh->flags & ~H5O_HDR_ALL_FLAGS) - HDfprintf(stream, "*** UNKNOWN OBJECT HEADER STATUS FLAG: %02x!\n", (unsigned)oh->flags); + fprintf(stream, "*** UNKNOWN OBJECT HEADER STATUS FLAG: %02x!\n", (unsigned)oh->flags); /* Only dump times, if they are tracked */ if (oh->flags & H5O_HDR_STORE_TIMES) { @@ -322,45 +321,45 @@ H5O__debug_real(H5F_t *f, H5O_t *oh, haddr_t addr, FILE *stream, int indent, int /* Time fields */ tm = HDlocaltime(&oh->atime); HDstrftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S %Z", tm); - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Access Time:", buf); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Access Time:", buf); tm = HDlocaltime(&oh->mtime); HDstrftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S %Z", tm); - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Modification Time:", buf); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Modification Time:", buf); tm = HDlocaltime(&oh->ctime); HDstrftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S %Z", tm); - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Change Time:", buf); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Change Time:", buf); tm = HDlocaltime(&oh->btime); HDstrftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S %Z", tm); - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Birth Time:", buf); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Birth Time:", buf); } /* end if */ /* Attribute tracking fields */ if (oh->flags & H5O_HDR_ATTR_STORE_PHASE_CHANGE) { - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, - "Max. compact attributes:", (unsigned)oh->max_compact); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, - "Min. dense attributes:", (unsigned)oh->min_dense); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, + "Max. compact attributes:", (unsigned)oh->max_compact); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, + "Min. dense attributes:", (unsigned)oh->min_dense); } /* end if */ } /* end if */ - HDfprintf(stream, "%*s%-*s %zu (%zu)\n", indent, "", fwidth, - "Number of messages (allocated):", oh->nmesgs, oh->alloc_nmesgs); - HDfprintf(stream, "%*s%-*s %zu (%zu)\n", indent, "", fwidth, "Number of chunks (allocated):", oh->nchunks, - oh->alloc_nchunks); + fprintf(stream, "%*s%-*s %zu (%zu)\n", indent, "", fwidth, "Number of messages (allocated):", oh->nmesgs, + oh->alloc_nmesgs); + fprintf(stream, "%*s%-*s %zu (%zu)\n", indent, "", fwidth, "Number of chunks (allocated):", oh->nchunks, + oh->alloc_nchunks); /* debug each chunk */ for (i = 0, chunk_total = 0; i < oh->nchunks; i++) { size_t chunk_size; - HDfprintf(stream, "%*sChunk %d...\n", indent, "", i); + fprintf(stream, "%*sChunk %d...\n", indent, "", i); - HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", MAX(0, fwidth - 3), - "Address:", oh->chunk[i].addr); + fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", MAX(0, fwidth - 3), + "Address:", oh->chunk[i].addr); /* Decrement chunk 0's size by the object header prefix size */ if (0 == i) { if (H5_addr_ne(oh->chunk[i].addr, addr)) - HDfprintf(stream, "*** WRONG ADDRESS FOR CHUNK #0!\n"); + fprintf(stream, "*** WRONG ADDRESS FOR CHUNK #0!\n"); chunk_size = oh->chunk[i].size - (size_t)H5O_SIZEOF_HDR(oh); } /* end if */ else @@ -370,9 +369,9 @@ H5O__debug_real(H5F_t *f, H5O_t *oh, haddr_t addr, FILE *stream, int indent, int chunk_total += chunk_size; gap_total += oh->chunk[i].gap; - HDfprintf(stream, "%*s%-*s %zu\n", indent + 3, "", MAX(0, fwidth - 3), "Size in bytes:", chunk_size); + fprintf(stream, "%*s%-*s %zu\n", indent + 3, "", MAX(0, fwidth - 3), "Size in bytes:", chunk_size); - HDfprintf(stream, "%*s%-*s %zu\n", indent + 3, "", MAX(0, fwidth - 3), "Gap:", oh->chunk[i].gap); + fprintf(stream, "%*s%-*s %zu\n", indent + 3, "", MAX(0, fwidth - 3), "Gap:", oh->chunk[i].gap); } /* end for */ /* debug each message */ @@ -389,21 +388,21 @@ H5O__debug_real(H5F_t *f, H5O_t *oh, haddr_t addr, FILE *stream, int indent, int if (oh->mesg[i].type->id == H5O_CONT_ID) mesg_total += H5O_SIZEOF_CHKHDR_OH(oh); - HDfprintf(stream, "%*sMessage %d...\n", indent, "", i); + fprintf(stream, "%*sMessage %d...\n", indent, "", i); /* check for bad message id */ if (oh->mesg[i].type->id >= (int)NELMTS(H5O_msg_class_g)) { - HDfprintf(stream, "*** BAD MESSAGE ID 0x%04x\n", oh->mesg[i].type->id); + fprintf(stream, "*** BAD MESSAGE ID 0x%04x\n", oh->mesg[i].type->id); continue; } /* end if */ /* message name and size */ - HDfprintf(stream, "%*s%-*s 0x%04x `%s' (%d)\n", indent + 3, "", MAX(0, fwidth - 3), - "Message ID (sequence number):", (unsigned)(oh->mesg[i].type->id), oh->mesg[i].type->name, - sequence[oh->mesg[i].type->id]++); - HDfprintf(stream, "%*s%-*s %s\n", indent + 3, "", MAX(0, fwidth - 3), - "Dirty:", oh->mesg[i].dirty ? "TRUE" : "FALSE"); - HDfprintf(stream, "%*s%-*s ", indent + 3, "", MAX(0, fwidth - 3), "Message flags:"); + fprintf(stream, "%*s%-*s 0x%04x `%s' (%d)\n", indent + 3, "", MAX(0, fwidth - 3), + "Message ID (sequence number):", (unsigned)(oh->mesg[i].type->id), oh->mesg[i].type->name, + sequence[oh->mesg[i].type->id]++); + fprintf(stream, "%*s%-*s %s\n", indent + 3, "", MAX(0, fwidth - 3), + "Dirty:", oh->mesg[i].dirty ? "TRUE" : "FALSE"); + fprintf(stream, "%*s%-*s ", indent + 3, "", MAX(0, fwidth - 3), "Message flags:"); if (oh->mesg[i].flags) { hbool_t flag_printed = FALSE; @@ -415,61 +414,61 @@ H5O__debug_real(H5F_t *f, H5O_t *oh, haddr_t addr, FILE *stream, int indent, int H5O_MSG_FLAG_FAIL_IF_UNKNOWN_ALWAYS)); if (oh->mesg[i].flags & H5O_MSG_FLAG_CONSTANT) { - HDfprintf(stream, "%sC", (flag_printed ? ", " : "<")); + fprintf(stream, "%sC", (flag_printed ? ", " : "<")); flag_printed = TRUE; } /* end if */ if (oh->mesg[i].flags & H5O_MSG_FLAG_SHARED) { - HDfprintf(stream, "%sS", (flag_printed ? ", " : "<")); + fprintf(stream, "%sS", (flag_printed ? ", " : "<")); flag_printed = TRUE; } /* end if */ if (oh->mesg[i].flags & H5O_MSG_FLAG_DONTSHARE) { - HDfprintf(stream, "%sDS", (flag_printed ? ", " : "<")); + fprintf(stream, "%sDS", (flag_printed ? ", " : "<")); flag_printed = TRUE; } /* end if */ if (oh->mesg[i].flags & H5O_MSG_FLAG_FAIL_IF_UNKNOWN_AND_OPEN_FOR_WRITE) { - HDfprintf(stream, "%sFIUW", (flag_printed ? ", " : "<")); + fprintf(stream, "%sFIUW", (flag_printed ? ", " : "<")); flag_printed = TRUE; } /* end if */ if (oh->mesg[i].flags & H5O_MSG_FLAG_MARK_IF_UNKNOWN) { - HDfprintf(stream, "%sMIU", (flag_printed ? ", " : "<")); + fprintf(stream, "%sMIU", (flag_printed ? ", " : "<")); flag_printed = TRUE; } /* end if */ if (oh->mesg[i].flags & H5O_MSG_FLAG_WAS_UNKNOWN) { assert(oh->mesg[i].flags & H5O_MSG_FLAG_MARK_IF_UNKNOWN); - HDfprintf(stream, "%sWU", (flag_printed ? ", " : "<")); + fprintf(stream, "%sWU", (flag_printed ? ", " : "<")); flag_printed = TRUE; } /* end if */ if (oh->mesg[i].flags & H5O_MSG_FLAG_SHAREABLE) { - HDfprintf(stream, "%sSA", (flag_printed ? ", " : "<")); + fprintf(stream, "%sSA", (flag_printed ? ", " : "<")); flag_printed = TRUE; } /* end if */ if (oh->mesg[i].flags & H5O_MSG_FLAG_FAIL_IF_UNKNOWN_ALWAYS) { - HDfprintf(stream, "%sFIUA", (flag_printed ? ", " : "<")); + fprintf(stream, "%sFIUA", (flag_printed ? ", " : "<")); flag_printed = TRUE; } /* end if */ if (!flag_printed) - HDfprintf(stream, "-"); - HDfprintf(stream, ">\n"); + fprintf(stream, "-"); + fprintf(stream, ">\n"); if (oh->mesg[i].flags & ~H5O_MSG_FLAG_BITS) - HDfprintf(stream, "%*s%-*s 0x%02x\n", indent + 3, "", MAX(0, fwidth - 3), - "*** ADDITIONAL UNKNOWN FLAGS --->", oh->mesg[i].flags & ~H5O_MSG_FLAG_BITS); + fprintf(stream, "%*s%-*s 0x%02x\n", indent + 3, "", MAX(0, fwidth - 3), + "*** ADDITIONAL UNKNOWN FLAGS --->", oh->mesg[i].flags & ~H5O_MSG_FLAG_BITS); } /* end if */ else - HDfprintf(stream, "<none>\n"); + fprintf(stream, "<none>\n"); - HDfprintf(stream, "%*s%-*s %u\n", indent + 3, "", MAX(0, fwidth - 3), - "Chunk number:", oh->mesg[i].chunkno); + fprintf(stream, "%*s%-*s %u\n", indent + 3, "", MAX(0, fwidth - 3), + "Chunk number:", oh->mesg[i].chunkno); chunkno = oh->mesg[i].chunkno; if (chunkno >= oh->nchunks) - HDfprintf(stream, "*** BAD CHUNK NUMBER\n"); - HDfprintf(stream, "%*s%-*s (%zu, %zu) bytes\n", indent + 3, "", MAX(0, fwidth - 3), - "Raw message data (offset, size) in chunk:", - (size_t)(oh->mesg[i].raw - oh->chunk[chunkno].image), oh->mesg[i].raw_size); + fprintf(stream, "*** BAD CHUNK NUMBER\n"); + fprintf(stream, "%*s%-*s (%zu, %zu) bytes\n", indent + 3, "", MAX(0, fwidth - 3), + "Raw message data (offset, size) in chunk:", + (size_t)(oh->mesg[i].raw - oh->chunk[chunkno].image), oh->mesg[i].raw_size); /* check the size */ if ((oh->mesg[i].raw + oh->mesg[i].raw_size > oh->chunk[chunkno].image + oh->chunk[chunkno].size) || (oh->mesg[i].raw < oh->chunk[chunkno].image)) - HDfprintf(stream, "*** BAD MESSAGE RAW ADDRESS\n"); + fprintf(stream, "*** BAD MESSAGE RAW ADDRESS\n"); /* decode the message */ debug_type = oh->mesg[i].type; @@ -477,15 +476,15 @@ H5O__debug_real(H5F_t *f, H5O_t *oh, haddr_t addr, FILE *stream, int indent, int H5O_LOAD_NATIVE(f, H5O_DECODEIO_NOCHANGE, oh, &oh->mesg[i], FAIL) /* print the message */ - HDfprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3), "Message Information:"); + fprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3), "Message Information:"); if (debug_type->debug && oh->mesg[i].native != NULL) (debug_type->debug)(f, oh->mesg[i].native, stream, indent + 6, MAX(0, fwidth - 6)); else - HDfprintf(stream, "%*s<No info for this message>\n", indent + 6, ""); + fprintf(stream, "%*s<No info for this message>\n", indent + 6, ""); } /* end for */ if ((mesg_total + gap_total) != chunk_total) - HDfprintf(stream, "*** TOTAL SIZE DOES NOT MATCH ALLOCATED SIZE!\n"); + fprintf(stream, "*** TOTAL SIZE DOES NOT MATCH ALLOCATED SIZE!\n"); done: /* Release resources */ diff --git a/src/H5Odrvinfo.c b/src/H5Odrvinfo.c index 828645c..4c0ca93 100644 --- a/src/H5Odrvinfo.c +++ b/src/H5Odrvinfo.c @@ -301,8 +301,8 @@ H5O__drvinfo_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int assert(indent >= 0); assert(fwidth >= 0); - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Driver name:", mesg->name); - HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Buffer size:", mesg->len); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Driver name:", mesg->name); + fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Buffer size:", mesg->len); FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5O__drvinfo_debug() */ diff --git a/src/H5Odtype.c b/src/H5Odtype.c index d69e2c0..50d3775 100644 --- a/src/H5Odtype.c +++ b/src/H5Odtype.c @@ -1943,45 +1943,45 @@ H5O__dtype_debug(H5F_t *f, const void *mesg, FILE *stream, int indent, int fwidt s = buf; break; } /* end switch */ - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Type class:", s); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Type class:", s); - HDfprintf(stream, "%*s%-*s %lu byte%s\n", indent, "", fwidth, "Size:", (unsigned long)(dt->shared->size), - 1 == dt->shared->size ? "" : "s"); + fprintf(stream, "%*s%-*s %lu byte%s\n", indent, "", fwidth, "Size:", (unsigned long)(dt->shared->size), + 1 == dt->shared->size ? "" : "s"); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Version:", dt->shared->version); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Version:", dt->shared->version); if (H5T_COMPOUND == dt->shared->type) { - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, - "Number of members:", dt->shared->u.compnd.nmembs); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, + "Number of members:", dt->shared->u.compnd.nmembs); for (i = 0; i < dt->shared->u.compnd.nmembs; i++) { HDsnprintf(buf, sizeof(buf), "Member %u:", i); - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, buf, dt->shared->u.compnd.memb[i].name); - HDfprintf(stream, "%*s%-*s %lu\n", indent + 3, "", MAX(0, fwidth - 3), - "Byte offset:", (unsigned long)(dt->shared->u.compnd.memb[i].offset)); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, buf, dt->shared->u.compnd.memb[i].name); + fprintf(stream, "%*s%-*s %lu\n", indent + 3, "", MAX(0, fwidth - 3), + "Byte offset:", (unsigned long)(dt->shared->u.compnd.memb[i].offset)); H5O__dtype_debug(f, dt->shared->u.compnd.memb[i].type, stream, indent + 3, MAX(0, fwidth - 3)); } /* end for */ } /* end if */ else if (H5T_ENUM == dt->shared->type) { - HDfprintf(stream, "%*s%s\n", indent, "", "Base type:"); + fprintf(stream, "%*s%s\n", indent, "", "Base type:"); H5O__dtype_debug(f, dt->shared->parent, stream, indent + 3, MAX(0, fwidth - 3)); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, - "Number of members:", dt->shared->u.enumer.nmembs); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, + "Number of members:", dt->shared->u.enumer.nmembs); for (i = 0; i < dt->shared->u.enumer.nmembs; i++) { HDsnprintf(buf, sizeof(buf), "Member %u:", i); - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, buf, dt->shared->u.enumer.name[i]); - HDfprintf(stream, "%*s%-*s 0x", indent, "", fwidth, "Raw bytes of value:"); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, buf, dt->shared->u.enumer.name[i]); + fprintf(stream, "%*s%-*s 0x", indent, "", fwidth, "Raw bytes of value:"); for (k = 0; k < dt->shared->parent->shared->size; k++) - HDfprintf(stream, "%02x", - (unsigned)*((uint8_t *)dt->shared->u.enumer.value + - (i * dt->shared->parent->shared->size) + k)); - HDfprintf(stream, "\n"); + fprintf(stream, "%02x", + (unsigned)*((uint8_t *)dt->shared->u.enumer.value + + (i * dt->shared->parent->shared->size) + k)); + fprintf(stream, "\n"); } /* end for */ } /* end else if */ else if (H5T_OPAQUE == dt->shared->type) { - HDfprintf(stream, "%*s%-*s \"%s\"\n", indent, "", fwidth, "Tag:", dt->shared->u.opaque.tag); + fprintf(stream, "%*s%-*s \"%s\"\n", indent, "", fwidth, "Tag:", dt->shared->u.opaque.tag); } /* end else if */ else if (H5T_REFERENCE == dt->shared->type) { - HDfprintf(stream, "%*s%-*s\n", indent, "", fwidth, "Fix dumping reference types!"); + fprintf(stream, "%*s%-*s\n", indent, "", fwidth, "Fix dumping reference types!"); } /* end else if */ else if (H5T_STRING == dt->shared->type) { switch (dt->shared->u.atomic.u.s.cset) { @@ -2018,7 +2018,7 @@ H5O__dtype_debug(H5F_t *f, const void *mesg, FILE *stream, int indent, int fwidt s = buf; break; } /* end switch */ - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Character Set:", s); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Character Set:", s); switch (dt->shared->u.atomic.u.s.pad) { case H5T_STR_NULLTERM: @@ -2057,7 +2057,7 @@ H5O__dtype_debug(H5F_t *f, const void *mesg, FILE *stream, int indent, int fwidt s = buf; break; } /* end switch */ - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "String Padding:", s); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "String Padding:", s); } /* end else if */ else if (H5T_VLEN == dt->shared->type) { switch (dt->shared->u.vlen.type) { @@ -2076,7 +2076,7 @@ H5O__dtype_debug(H5F_t *f, const void *mesg, FILE *stream, int indent, int fwidt s = buf; break; } /* end switch */ - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Vlen type:", s); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Vlen type:", s); switch (dt->shared->u.vlen.loc) { case H5T_LOC_MEMORY: @@ -2094,7 +2094,7 @@ H5O__dtype_debug(H5F_t *f, const void *mesg, FILE *stream, int indent, int fwidt s = buf; break; } /* end switch */ - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Location:", s); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Location:", s); /* Extra information for VL-strings */ if (dt->shared->u.vlen.type == H5T_VLEN_STRING) { @@ -2131,7 +2131,7 @@ H5O__dtype_debug(H5F_t *f, const void *mesg, FILE *stream, int indent, int fwidt s = buf; break; } /* end switch */ - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Character Set:", s); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Character Set:", s); switch (dt->shared->u.vlen.pad) { case H5T_STR_NULLTERM: @@ -2169,16 +2169,16 @@ H5O__dtype_debug(H5F_t *f, const void *mesg, FILE *stream, int indent, int fwidt s = buf; break; } /* end switch */ - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "String Padding:", s); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "String Padding:", s); } /* end if */ } /* end else if */ else if (H5T_ARRAY == dt->shared->type) { - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Rank:", dt->shared->u.array.ndims); - HDfprintf(stream, "%*s%-*s {", indent, "", fwidth, "Dim Size:"); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Rank:", dt->shared->u.array.ndims); + fprintf(stream, "%*s%-*s {", indent, "", fwidth, "Dim Size:"); for (i = 0; i < dt->shared->u.array.ndims; i++) - HDfprintf(stream, "%s%u", (i ? ", " : ""), (unsigned)dt->shared->u.array.dim[i]); - HDfprintf(stream, "}\n"); - HDfprintf(stream, "%*s%s\n", indent, "", "Base type:"); + fprintf(stream, "%s%u", (i ? ", " : ""), (unsigned)dt->shared->u.array.dim[i]); + fprintf(stream, "}\n"); + fprintf(stream, "%*s%s\n", indent, "", "Base type:"); H5O__dtype_debug(f, dt->shared->parent, stream, indent + 3, MAX(0, fwidth - 3)); } /* end else if */ else { @@ -2209,15 +2209,15 @@ H5O__dtype_debug(H5F_t *f, const void *mesg, FILE *stream, int indent, int fwidt s = buf; break; } /* end switch */ - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Byte order:", s); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Byte order:", s); - HDfprintf(stream, "%*s%-*s %lu bit%s\n", indent, "", fwidth, - "Precision:", (unsigned long)(dt->shared->u.atomic.prec), - 1 == dt->shared->u.atomic.prec ? "" : "s"); + fprintf(stream, "%*s%-*s %lu bit%s\n", indent, "", fwidth, + "Precision:", (unsigned long)(dt->shared->u.atomic.prec), + 1 == dt->shared->u.atomic.prec ? "" : "s"); - HDfprintf(stream, "%*s%-*s %lu bit%s\n", indent, "", fwidth, - "Offset:", (unsigned long)(dt->shared->u.atomic.offset), - 1 == dt->shared->u.atomic.offset ? "" : "s"); + fprintf(stream, "%*s%-*s %lu bit%s\n", indent, "", fwidth, + "Offset:", (unsigned long)(dt->shared->u.atomic.offset), + 1 == dt->shared->u.atomic.offset ? "" : "s"); switch (dt->shared->u.atomic.lsb_pad) { case H5T_PAD_ZERO: @@ -2238,7 +2238,7 @@ H5O__dtype_debug(H5F_t *f, const void *mesg, FILE *stream, int indent, int fwidt s = "pad?"; break; } /* end switch */ - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Low pad type:", s); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Low pad type:", s); switch (dt->shared->u.atomic.msb_pad) { case H5T_PAD_ZERO: @@ -2259,7 +2259,7 @@ H5O__dtype_debug(H5F_t *f, const void *mesg, FILE *stream, int indent, int fwidt s = "pad?"; break; } /* end switch */ - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "High pad type:", s); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "High pad type:", s); if (H5T_FLOAT == dt->shared->type) { switch (dt->shared->u.atomic.u.f.pad) { @@ -2285,7 +2285,7 @@ H5O__dtype_debug(H5F_t *f, const void *mesg, FILE *stream, int indent, int fwidt s = buf; break; } /* end switch */ - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Internal pad type:", s); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Internal pad type:", s); switch (dt->shared->u.atomic.u.f.norm) { case H5T_NORM_IMPLIED: @@ -2305,25 +2305,25 @@ H5O__dtype_debug(H5F_t *f, const void *mesg, FILE *stream, int indent, int fwidt HDsnprintf(buf, sizeof(buf), "H5T_NORM_%d", (int)(dt->shared->u.atomic.u.f.norm)); s = buf; } /* end switch */ - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Normalization:", s); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Normalization:", s); - HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth, - "Sign bit location:", (unsigned long)(dt->shared->u.atomic.u.f.sign)); + fprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth, + "Sign bit location:", (unsigned long)(dt->shared->u.atomic.u.f.sign)); - HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth, - "Exponent location:", (unsigned long)(dt->shared->u.atomic.u.f.epos)); + fprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth, + "Exponent location:", (unsigned long)(dt->shared->u.atomic.u.f.epos)); - HDfprintf(stream, "%*s%-*s 0x%08lx\n", indent, "", fwidth, - "Exponent bias:", (unsigned long)(dt->shared->u.atomic.u.f.ebias)); + fprintf(stream, "%*s%-*s 0x%08lx\n", indent, "", fwidth, + "Exponent bias:", (unsigned long)(dt->shared->u.atomic.u.f.ebias)); - HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth, - "Exponent size:", (unsigned long)(dt->shared->u.atomic.u.f.esize)); + fprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth, + "Exponent size:", (unsigned long)(dt->shared->u.atomic.u.f.esize)); - HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth, - "Mantissa location:", (unsigned long)(dt->shared->u.atomic.u.f.mpos)); + fprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth, + "Mantissa location:", (unsigned long)(dt->shared->u.atomic.u.f.mpos)); - HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth, - "Mantissa size:", (unsigned long)(dt->shared->u.atomic.u.f.msize)); + fprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth, + "Mantissa size:", (unsigned long)(dt->shared->u.atomic.u.f.msize)); } /* end if */ else if (H5T_INTEGER == dt->shared->type) { @@ -2343,7 +2343,7 @@ H5O__dtype_debug(H5F_t *f, const void *mesg, FILE *stream, int indent, int fwidt s = buf; break; } /* end switch */ - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Sign scheme:", s); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Sign scheme:", s); } /* end else if */ } /* end else */ diff --git a/src/H5Oefl.c b/src/H5Oefl.c index 6673b98..38fc4cd 100644 --- a/src/H5Oefl.c +++ b/src/H5Oefl.c @@ -542,28 +542,27 @@ H5O__efl_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int ind assert(indent >= 0); assert(fwidth >= 0); - HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Heap address:", mesg->heap_addr); + fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Heap address:", mesg->heap_addr); - HDfprintf(stream, "%*s%-*s %zu/%zu\n", indent, "", fwidth, "Slots used/allocated:", mesg->nused, - mesg->nalloc); + fprintf(stream, "%*s%-*s %zu/%zu\n", indent, "", fwidth, "Slots used/allocated:", mesg->nused, + mesg->nalloc); for (u = 0; u < mesg->nused; u++) { char buf[64]; HDsnprintf(buf, sizeof(buf), "File %zu", u); - HDfprintf(stream, "%*s%s:\n", indent, "", buf); + fprintf(stream, "%*s%s:\n", indent, "", buf); - HDfprintf(stream, "%*s%-*s \"%s\"\n", indent + 3, "", MAX(fwidth - 3, 0), - "Name:", mesg->slot[u].name); + fprintf(stream, "%*s%-*s \"%s\"\n", indent + 3, "", MAX(fwidth - 3, 0), "Name:", mesg->slot[u].name); - HDfprintf(stream, "%*s%-*s %zu\n", indent + 3, "", MAX(fwidth - 3, 0), - "Name offset:", mesg->slot[u].name_offset); + fprintf(stream, "%*s%-*s %zu\n", indent + 3, "", MAX(fwidth - 3, 0), + "Name offset:", mesg->slot[u].name_offset); - HDfprintf(stream, "%*s%-*s %" PRIdMAX "\n", indent + 3, "", MAX(fwidth - 3, 0), - "Offset of data in file:", (intmax_t)(mesg->slot[u].offset)); + fprintf(stream, "%*s%-*s %" PRIdMAX "\n", indent + 3, "", MAX(fwidth - 3, 0), + "Offset of data in file:", (intmax_t)(mesg->slot[u].offset)); - HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent + 3, "", MAX(fwidth - 3, 0), - "Bytes reserved for data:", (mesg->slot[u].size)); + fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent + 3, "", MAX(fwidth - 3, 0), + "Bytes reserved for data:", (mesg->slot[u].size)); } /* end for */ FUNC_LEAVE_NOAPI(SUCCEED) diff --git a/src/H5Ofill.c b/src/H5Ofill.c index a11824e..84ede3a 100644 --- a/src/H5Ofill.c +++ b/src/H5Ofill.c @@ -898,75 +898,75 @@ H5O__fill_debug(H5F_t H5_ATTR_UNUSED *f, const void *_fill, FILE *stream, int in assert(indent >= 0); assert(fwidth >= 0); - HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "Space Allocation Time:"); + fprintf(stream, "%*s%-*s ", indent, "", fwidth, "Space Allocation Time:"); switch (fill->alloc_time) { case H5D_ALLOC_TIME_EARLY: - HDfprintf(stream, "Early\n"); + fprintf(stream, "Early\n"); break; case H5D_ALLOC_TIME_LATE: - HDfprintf(stream, "Late\n"); + fprintf(stream, "Late\n"); break; case H5D_ALLOC_TIME_INCR: - HDfprintf(stream, "Incremental\n"); + fprintf(stream, "Incremental\n"); break; case H5D_ALLOC_TIME_DEFAULT: case H5D_ALLOC_TIME_ERROR: default: - HDfprintf(stream, "Unknown!\n"); + fprintf(stream, "Unknown!\n"); break; } /* end switch */ - HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "Fill Time:"); + fprintf(stream, "%*s%-*s ", indent, "", fwidth, "Fill Time:"); switch (fill->fill_time) { case H5D_FILL_TIME_ALLOC: - HDfprintf(stream, "On Allocation\n"); + fprintf(stream, "On Allocation\n"); break; case H5D_FILL_TIME_NEVER: - HDfprintf(stream, "Never\n"); + fprintf(stream, "Never\n"); break; case H5D_FILL_TIME_IFSET: - HDfprintf(stream, "If Set\n"); + fprintf(stream, "If Set\n"); break; case H5D_FILL_TIME_ERROR: default: - HDfprintf(stream, "Unknown!\n"); + fprintf(stream, "Unknown!\n"); break; } /* end switch */ - HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "Fill Value Defined:"); + fprintf(stream, "%*s%-*s ", indent, "", fwidth, "Fill Value Defined:"); H5P_is_fill_value_defined((const H5O_fill_t *)fill, &fill_status); switch (fill_status) { case H5D_FILL_VALUE_UNDEFINED: - HDfprintf(stream, "Undefined\n"); + fprintf(stream, "Undefined\n"); break; case H5D_FILL_VALUE_DEFAULT: - HDfprintf(stream, "Default\n"); + fprintf(stream, "Default\n"); break; case H5D_FILL_VALUE_USER_DEFINED: - HDfprintf(stream, "User Defined\n"); + fprintf(stream, "User Defined\n"); break; case H5D_FILL_VALUE_ERROR: default: - HDfprintf(stream, "Unknown!\n"); + fprintf(stream, "Unknown!\n"); break; } /* end switch */ - HDfprintf(stream, "%*s%-*s %zd\n", indent, "", fwidth, "Size:", fill->size); - HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "Data type:"); + fprintf(stream, "%*s%-*s %zd\n", indent, "", fwidth, "Size:", fill->size); + fprintf(stream, "%*s%-*s ", indent, "", fwidth, "Data type:"); if (fill->type) { H5T_debug(fill->type, stream); - HDfprintf(stream, "\n"); + fprintf(stream, "\n"); } /* end if */ else - HDfprintf(stream, "<dataset type>\n"); + fprintf(stream, "<dataset type>\n"); FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5O__fill_debug() */ diff --git a/src/H5Ofsinfo.c b/src/H5Ofsinfo.c index 094ff5e..3a1e607 100644 --- a/src/H5Ofsinfo.c +++ b/src/H5Ofsinfo.c @@ -375,48 +375,48 @@ H5O__fsinfo_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int assert(indent >= 0); assert(fwidth >= 0); - HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "File space strategy:"); + fprintf(stream, "%*s%-*s ", indent, "", fwidth, "File space strategy:"); switch (fsinfo->strategy) { case H5F_FSPACE_STRATEGY_FSM_AGGR: - HDfprintf(stream, "%s\n", "H5F_FSPACE_STRATEGY_FSM_AGGR"); + fprintf(stream, "%s\n", "H5F_FSPACE_STRATEGY_FSM_AGGR"); break; case H5F_FSPACE_STRATEGY_PAGE: - HDfprintf(stream, "%s\n", "H5F_FSPACE_STRATEGY_PAGE"); + fprintf(stream, "%s\n", "H5F_FSPACE_STRATEGY_PAGE"); break; case H5F_FSPACE_STRATEGY_AGGR: - HDfprintf(stream, "%s\n", "H5F_FSPACE_STRATEGY_AGGR"); + fprintf(stream, "%s\n", "H5F_FSPACE_STRATEGY_AGGR"); break; case H5F_FSPACE_STRATEGY_NONE: - HDfprintf(stream, "%s\n", "H5F_FSPACE_STRATEGY_NONE"); + fprintf(stream, "%s\n", "H5F_FSPACE_STRATEGY_NONE"); break; case H5F_FSPACE_STRATEGY_NTYPES: default: - HDfprintf(stream, "%s\n", "unknown"); + fprintf(stream, "%s\n", "unknown"); } /* end switch */ - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, - "Free-space persist:", fsinfo->persist ? "TRUE" : "FALSE"); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, + "Free-space persist:", fsinfo->persist ? "TRUE" : "FALSE"); - HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, - "Free-space section threshold:", fsinfo->threshold); + fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, + "Free-space section threshold:", fsinfo->threshold); - HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, - "File space page size:", fsinfo->page_size); + fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, + "File space page size:", fsinfo->page_size); - HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, - "Page end metadata threshold:", fsinfo->pgend_meta_thres); + fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, + "Page end metadata threshold:", fsinfo->pgend_meta_thres); - HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, - "eoa_pre_fsm_fsalloc:", fsinfo->eoa_pre_fsm_fsalloc); + fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, + "eoa_pre_fsm_fsalloc:", fsinfo->eoa_pre_fsm_fsalloc); if (fsinfo->persist) { for (ptype = H5F_MEM_PAGE_SUPER; ptype < H5F_MEM_PAGE_NTYPES; ptype++) - HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, - "Free space manager address:", fsinfo->fs_addr[ptype - 1]); + fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, + "Free space manager address:", fsinfo->fs_addr[ptype - 1]); } /* end if */ FUNC_LEAVE_NOAPI(SUCCEED) diff --git a/src/H5Oginfo.c b/src/H5Oginfo.c index 4ceb551..26ada54 100644 --- a/src/H5Oginfo.c +++ b/src/H5Oginfo.c @@ -324,12 +324,12 @@ H5O__ginfo_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int i assert(indent >= 0); assert(fwidth >= 0); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Max. compact links:", ginfo->max_compact); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Min. dense links:", ginfo->min_dense); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, - "Estimated # of objects in group:", ginfo->est_num_entries); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, - "Estimated length of object in group's name:", ginfo->est_name_len); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Max. compact links:", ginfo->max_compact); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Min. dense links:", ginfo->min_dense); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, + "Estimated # of objects in group:", ginfo->est_num_entries); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, + "Estimated length of object in group's name:", ginfo->est_name_len); FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5O__ginfo_debug() */ diff --git a/src/H5Oint.c b/src/H5Oint.c index 72ab043..3af0652 100644 --- a/src/H5Oint.c +++ b/src/H5Oint.c @@ -571,7 +571,7 @@ H5O_open(H5O_loc_t *loc) #ifdef H5O_DEBUG if (H5DEBUG(O)) - HDfprintf(H5DEBUG(O), "> %" PRIuHADDR "\n", loc->addr); + fprintf(H5DEBUG(O), "> %" PRIuHADDR "\n", loc->addr); #endif /* Turn off the variable for holding file or increment open-lock counters */ @@ -801,10 +801,10 @@ H5O_close(H5O_loc_t *loc, hbool_t *file_closed /*out*/) #ifdef H5O_DEBUG if (H5DEBUG(O)) { if (FALSE == H5F_ID_EXISTS(loc->file) && 1 == H5F_NREFS(loc->file)) - HDfprintf(H5DEBUG(O), "< %" PRIuHADDR " auto %lu remaining\n", loc->addr, - (unsigned long)H5F_NOPEN_OBJS(loc->file)); + fprintf(H5DEBUG(O), "< %" PRIuHADDR " auto %lu remaining\n", loc->addr, + (unsigned long)H5F_NOPEN_OBJS(loc->file)); else - HDfprintf(H5DEBUG(O), "< %" PRIuHADDR "\n", loc->addr); + fprintf(H5DEBUG(O), "< %" PRIuHADDR "\n", loc->addr); } #endif diff --git a/src/H5Olayout.c b/src/H5Olayout.c index 01526e7..dd5ff98 100644 --- a/src/H5Olayout.c +++ b/src/H5Olayout.c @@ -1351,96 +1351,95 @@ H5O__layout_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int assert(indent >= 0); assert(fwidth >= 0); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Version:", mesg->version); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Version:", mesg->version); switch (mesg->type) { case H5D_CHUNKED: - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Type:", "Chunked"); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Type:", "Chunked"); /* Chunk # of dims & size */ - HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth, - "Number of dimensions:", (unsigned long)(mesg->u.chunk.ndims)); - HDfprintf(stream, "%*s%-*s {", indent, "", fwidth, "Size:"); + fprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth, + "Number of dimensions:", (unsigned long)(mesg->u.chunk.ndims)); + fprintf(stream, "%*s%-*s {", indent, "", fwidth, "Size:"); for (u = 0; u < (size_t)mesg->u.chunk.ndims; u++) - HDfprintf(stream, "%s%lu", u ? ", " : "", (unsigned long)(mesg->u.chunk.dim[u])); - HDfprintf(stream, "}\n"); + fprintf(stream, "%s%lu", u ? ", " : "", (unsigned long)(mesg->u.chunk.dim[u])); + fprintf(stream, "}\n"); /* Index information */ switch (mesg->u.chunk.idx_type) { case H5D_CHUNK_IDX_BTREE: - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Index Type:", "v1 B-tree"); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Index Type:", "v1 B-tree"); break; case H5D_CHUNK_IDX_NONE: - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Index Type:", "Implicit"); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Index Type:", "Implicit"); break; case H5D_CHUNK_IDX_SINGLE: - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Index Type:", "Single Chunk"); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Index Type:", "Single Chunk"); break; case H5D_CHUNK_IDX_FARRAY: - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Index Type:", "Fixed Array"); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Index Type:", "Fixed Array"); /* (Should print the fixed array creation parameters) */ break; case H5D_CHUNK_IDX_EARRAY: - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Index Type:", "Extensible Array"); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Index Type:", "Extensible Array"); /* (Should print the extensible array creation parameters) */ break; case H5D_CHUNK_IDX_BT2: - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Index Type:", "v2 B-tree"); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Index Type:", "v2 B-tree"); /* (Should print the v2-Btree creation parameters) */ break; case H5D_CHUNK_IDX_NTYPES: default: - HDfprintf(stream, "%*s%-*s %s (%u)\n", indent, "", fwidth, "Index Type:", "Unknown", - (unsigned)mesg->u.chunk.idx_type); + fprintf(stream, "%*s%-*s %s (%u)\n", indent, "", fwidth, "Index Type:", "Unknown", + (unsigned)mesg->u.chunk.idx_type); break; } /* end switch */ - HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, - "Index address:", mesg->storage.u.chunk.idx_addr); + fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, + "Index address:", mesg->storage.u.chunk.idx_addr); break; case H5D_CONTIGUOUS: - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Type:", "Contiguous"); - HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, - "Data address:", mesg->storage.u.contig.addr); - HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, - "Data Size:", mesg->storage.u.contig.size); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Type:", "Contiguous"); + fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, + "Data address:", mesg->storage.u.contig.addr); + fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, + "Data Size:", mesg->storage.u.contig.size); break; case H5D_COMPACT: - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Type:", "Compact"); - HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, - "Data Size:", mesg->storage.u.compact.size); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Type:", "Compact"); + fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Data Size:", mesg->storage.u.compact.size); break; case H5D_VIRTUAL: - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Type:", "Virtual"); - HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, - "Global heap address:", mesg->storage.u.virt.serial_list_hobjid.addr); - HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, - "Global heap index:", mesg->storage.u.virt.serial_list_hobjid.idx); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Type:", "Virtual"); + fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, + "Global heap address:", mesg->storage.u.virt.serial_list_hobjid.addr); + fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, + "Global heap index:", mesg->storage.u.virt.serial_list_hobjid.idx); for (u = 0; u < mesg->storage.u.virt.list_nused; u++) { - HDfprintf(stream, "%*sMapping %zu:\n", indent, "", u); - HDfprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth - 3, - "Virtual selection:", "<Not yet implemented>"); - HDfprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth - 3, - "Source file name:", mesg->storage.u.virt.list[u].source_file_name); - HDfprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth - 3, - "Source dataset name:", mesg->storage.u.virt.list[u].source_dset_name); - HDfprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth - 3, - "Source selection:", "<Not yet implemented>"); + fprintf(stream, "%*sMapping %zu:\n", indent, "", u); + fprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth - 3, + "Virtual selection:", "<Not yet implemented>"); + fprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth - 3, + "Source file name:", mesg->storage.u.virt.list[u].source_file_name); + fprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth - 3, + "Source dataset name:", mesg->storage.u.virt.list[u].source_dset_name); + fprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth - 3, + "Source selection:", "<Not yet implemented>"); } /* end for */ break; case H5D_LAYOUT_ERROR: case H5D_NLAYOUTS: default: - HDfprintf(stream, "%*s%-*s %s (%u)\n", indent, "", fwidth, "Type:", "Unknown", - (unsigned)mesg->type); + fprintf(stream, "%*s%-*s %s (%u)\n", indent, "", fwidth, "Type:", "Unknown", + (unsigned)mesg->type); break; } /* end switch */ diff --git a/src/H5Olinfo.c b/src/H5Olinfo.c index cecdb32..c1e9bca 100644 --- a/src/H5Olinfo.c +++ b/src/H5Olinfo.c @@ -556,19 +556,19 @@ H5O__linfo_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int i assert(indent >= 0); assert(fwidth >= 0); - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, - "Track creation order of links:", linfo->track_corder ? "TRUE" : "FALSE"); - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, - "Index creation order of links:", linfo->index_corder ? "TRUE" : "FALSE"); - HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, "Number of links:", linfo->nlinks); - HDfprintf(stream, "%*s%-*s %" PRId64 "\n", indent, "", fwidth, - "Max. creation order value:", linfo->max_corder); - HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, - "'Dense' link storage fractal heap address:", linfo->fheap_addr); - HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, - "'Dense' link storage name index v2 B-tree address:", linfo->name_bt2_addr); - HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, - "'Dense' link storage creation order index v2 B-tree address:", linfo->corder_bt2_addr); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, + "Track creation order of links:", linfo->track_corder ? "TRUE" : "FALSE"); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, + "Index creation order of links:", linfo->index_corder ? "TRUE" : "FALSE"); + fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, "Number of links:", linfo->nlinks); + fprintf(stream, "%*s%-*s %" PRId64 "\n", indent, "", fwidth, + "Max. creation order value:", linfo->max_corder); + fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, + "'Dense' link storage fractal heap address:", linfo->fheap_addr); + fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, + "'Dense' link storage name index v2 B-tree address:", linfo->name_bt2_addr); + fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, + "'Dense' link storage creation order index v2 B-tree address:", linfo->corder_bt2_addr); FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5O__linfo_debug() */ diff --git a/src/H5Olink.c b/src/H5Olink.c index 2afb89c..219f4b0 100644 --- a/src/H5Olink.c +++ b/src/H5Olink.c @@ -812,31 +812,31 @@ H5O__link_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int in assert(indent >= 0); assert(fwidth >= 0); - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Link Type:", - (lnk->type == H5L_TYPE_HARD - ? "Hard" - : (lnk->type == H5L_TYPE_SOFT - ? "Soft" - : (lnk->type == H5L_TYPE_EXTERNAL - ? "External" - : (lnk->type >= H5L_TYPE_UD_MIN ? "User-defined" : "Unknown"))))); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Link Type:", + (lnk->type == H5L_TYPE_HARD + ? "Hard" + : (lnk->type == H5L_TYPE_SOFT + ? "Soft" + : (lnk->type == H5L_TYPE_EXTERNAL + ? "External" + : (lnk->type >= H5L_TYPE_UD_MIN ? "User-defined" : "Unknown"))))); if (lnk->corder_valid) - HDfprintf(stream, "%*s%-*s %" PRId64 "\n", indent, "", fwidth, "Creation Order:", lnk->corder); + fprintf(stream, "%*s%-*s %" PRId64 "\n", indent, "", fwidth, "Creation Order:", lnk->corder); - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Link Name Character Set:", - (lnk->cset == H5T_CSET_ASCII ? "ASCII" : (lnk->cset == H5T_CSET_UTF8 ? "UTF-8" : "Unknown"))); - HDfprintf(stream, "%*s%-*s '%s'\n", indent, "", fwidth, "Link Name:", lnk->name); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Link Name Character Set:", + (lnk->cset == H5T_CSET_ASCII ? "ASCII" : (lnk->cset == H5T_CSET_UTF8 ? "UTF-8" : "Unknown"))); + fprintf(stream, "%*s%-*s '%s'\n", indent, "", fwidth, "Link Name:", lnk->name); /* Display link-specific information */ switch (lnk->type) { case H5L_TYPE_HARD: - HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, - "Object address:", lnk->u.hard.addr); + fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, + "Object address:", lnk->u.hard.addr); break; case H5L_TYPE_SOFT: - HDfprintf(stream, "%*s%-*s '%s'\n", indent, "", fwidth, "Link Value:", lnk->u.soft.name); + fprintf(stream, "%*s%-*s '%s'\n", indent, "", fwidth, "Link Value:", lnk->u.soft.name); break; case H5L_TYPE_ERROR: @@ -848,13 +848,13 @@ H5O__link_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int in const char *objname = (const char *)lnk->u.ud.udata + (HDstrlen((const char *)lnk->u.ud.udata) + 1); - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, - "External File Name:", (const char *)lnk->u.ud.udata); - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "External Object Name:", objname); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, + "External File Name:", (const char *)lnk->u.ud.udata); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "External Object Name:", objname); } /* end if */ else { - HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, - "User-Defined Link Size:", lnk->u.ud.size); + fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, + "User-Defined Link Size:", lnk->u.ud.size); } /* end else */ } /* end if */ else diff --git a/src/H5Omtime.c b/src/H5Omtime.c index 150b3be..9fb1826 100644 --- a/src/H5Omtime.c +++ b/src/H5Omtime.c @@ -439,7 +439,7 @@ H5O__mtime_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int i tm = HDlocaltime(mesg); HDstrftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S %Z", tm); - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Time:", buf); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Time:", buf); FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5O__mtime_debug() */ diff --git a/src/H5Oname.c b/src/H5Oname.c index 29bbab0..f364b5a 100644 --- a/src/H5Oname.c +++ b/src/H5Oname.c @@ -266,7 +266,7 @@ H5O__name_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int in assert(indent >= 0); assert(fwidth >= 0); - HDfprintf(stream, "%*s%-*s `%s'\n", indent, "", fwidth, "Name:", mesg->s); + fprintf(stream, "%*s%-*s `%s'\n", indent, "", fwidth, "Name:", mesg->s); FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5O__name_debug() */ diff --git a/src/H5Opline.c b/src/H5Opline.c index 4b4b8ab..bbd8859 100644 --- a/src/H5Opline.c +++ b/src/H5Opline.c @@ -662,8 +662,8 @@ H5O__pline_debug(H5F_t H5_ATTR_UNUSED *f, const void *mesg, FILE *stream, int in assert(indent >= 0); assert(fwidth >= 0); - HDfprintf(stream, "%*s%-*s %zu/%zu\n", indent, "", fwidth, "Number of filters:", pline->nused, - pline->nalloc); + fprintf(stream, "%*s%-*s %zu/%zu\n", indent, "", fwidth, "Number of filters:", pline->nused, + pline->nalloc); /* Loop over all the filters */ for (size_t i = 0; i < pline->nused; i++) { @@ -675,26 +675,26 @@ H5O__pline_debug(H5F_t H5_ATTR_UNUSED *f, const void *mesg, FILE *stream, int in HDmemset(name, 0, 64); HDsnprintf(name, sizeof(name), "Filter at position %zu", i); - HDfprintf(stream, "%*s%-*s\n", indent, "", fwidth, name); - HDfprintf(stream, "%*s%-*s 0x%04x\n", indent + 3, "", MAX(0, fwidth - 3), - "Filter identification:", (unsigned)(pline->filter[i].id)); + fprintf(stream, "%*s%-*s\n", indent, "", fwidth, name); + fprintf(stream, "%*s%-*s 0x%04x\n", indent + 3, "", MAX(0, fwidth - 3), + "Filter identification:", (unsigned)(pline->filter[i].id)); if (pline->filter[i].name) - HDfprintf(stream, "%*s%-*s \"%s\"\n", indent + 3, "", MAX(0, fwidth - 3), - "Filter name:", pline->filter[i].name); + fprintf(stream, "%*s%-*s \"%s\"\n", indent + 3, "", MAX(0, fwidth - 3), + "Filter name:", pline->filter[i].name); else - HDfprintf(stream, "%*s%-*s NONE\n", indent + 3, "", MAX(0, fwidth - 3), "Filter name:"); - HDfprintf(stream, "%*s%-*s 0x%04x\n", indent + 3, "", MAX(0, fwidth - 3), - "Flags:", pline->filter[i].flags); - HDfprintf(stream, "%*s%-*s %zu\n", indent + 3, "", MAX(0, fwidth - 3), - "Num CD values:", pline->filter[i].cd_nelmts); + fprintf(stream, "%*s%-*s NONE\n", indent + 3, "", MAX(0, fwidth - 3), "Filter name:"); + fprintf(stream, "%*s%-*s 0x%04x\n", indent + 3, "", MAX(0, fwidth - 3), + "Flags:", pline->filter[i].flags); + fprintf(stream, "%*s%-*s %zu\n", indent + 3, "", MAX(0, fwidth - 3), + "Num CD values:", pline->filter[i].cd_nelmts); /* Filter parameters */ for (size_t j = 0; j < pline->filter[i].cd_nelmts; j++) { char field_name[32]; HDsnprintf(field_name, sizeof(field_name), "CD value %lu", (unsigned long)j); - HDfprintf(stream, "%*s%-*s %u\n", indent + 6, "", MAX(0, fwidth - 6), field_name, - pline->filter[i].cd_values[j]); + fprintf(stream, "%*s%-*s %u\n", indent + 6, "", MAX(0, fwidth - 6), field_name, + pline->filter[i].cd_values[j]); } } diff --git a/src/H5Orefcount.c b/src/H5Orefcount.c index 04d9eaa..ddb1219 100644 --- a/src/H5Orefcount.c +++ b/src/H5Orefcount.c @@ -301,7 +301,7 @@ H5O__refcount_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, in assert(indent >= 0); assert(fwidth >= 0); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Number of links:", (unsigned)*refcount); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Number of links:", (unsigned)*refcount); FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5O__refcount_debug() */ diff --git a/src/H5Osdspace.c b/src/H5Osdspace.c index c71a839..3e4dd87 100644 --- a/src/H5Osdspace.c +++ b/src/H5Osdspace.c @@ -520,29 +520,29 @@ H5O__sdspace_debug(H5F_t H5_ATTR_UNUSED *f, const void *mesg, FILE *stream, int assert(indent >= 0); assert(fwidth >= 0); - HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth, "Rank:", (unsigned long)(sdim->rank)); + fprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth, "Rank:", (unsigned long)(sdim->rank)); if (sdim->rank > 0) { unsigned u; /* local counting variable */ - HDfprintf(stream, "%*s%-*s {", indent, "", fwidth, "Dim Size:"); + fprintf(stream, "%*s%-*s {", indent, "", fwidth, "Dim Size:"); for (u = 0; u < sdim->rank; u++) - HDfprintf(stream, "%s%" PRIuHSIZE, u ? ", " : "", sdim->size[u]); - HDfprintf(stream, "}\n"); + fprintf(stream, "%s%" PRIuHSIZE, u ? ", " : "", sdim->size[u]); + fprintf(stream, "}\n"); - HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "Dim Max:"); + fprintf(stream, "%*s%-*s ", indent, "", fwidth, "Dim Max:"); if (sdim->max) { - HDfprintf(stream, "{"); + fprintf(stream, "{"); for (u = 0; u < sdim->rank; u++) { if (H5S_UNLIMITED == sdim->max[u]) - HDfprintf(stream, "%sUNLIM", u ? ", " : ""); + fprintf(stream, "%sUNLIM", u ? ", " : ""); else - HDfprintf(stream, "%s%" PRIuHSIZE, u ? ", " : "", sdim->max[u]); + fprintf(stream, "%s%" PRIuHSIZE, u ? ", " : "", sdim->max[u]); } /* end for */ - HDfprintf(stream, "}\n"); + fprintf(stream, "}\n"); } /* end if */ else - HDfprintf(stream, "CONSTANT\n"); + fprintf(stream, "CONSTANT\n"); } /* end if */ FUNC_LEAVE_NOAPI(SUCCEED) diff --git a/src/H5Oshared.c b/src/H5Oshared.c index 4483b44..9d07170 100644 --- a/src/H5Oshared.c +++ b/src/H5Oshared.c @@ -701,28 +701,28 @@ H5O__shared_debug(const H5O_shared_t *mesg, FILE *stream, int indent, int fwidth switch (mesg->type) { case H5O_SHARE_TYPE_UNSHARED: - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Shared Message type:", "Unshared"); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Shared Message type:", "Unshared"); break; case H5O_SHARE_TYPE_COMMITTED: - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Shared Message type:", "Obj Hdr"); - HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, - "Object address:", mesg->u.loc.oh_addr); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Shared Message type:", "Obj Hdr"); + fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, + "Object address:", mesg->u.loc.oh_addr); break; case H5O_SHARE_TYPE_SOHM: - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Shared Message type:", "SOHM"); - HDfprintf(stream, "%*s%-*s %016llx\n", indent, "", fwidth, - "Heap ID:", (unsigned long long)mesg->u.heap_id.val); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Shared Message type:", "SOHM"); + fprintf(stream, "%*s%-*s %016llx\n", indent, "", fwidth, + "Heap ID:", (unsigned long long)mesg->u.heap_id.val); break; case H5O_SHARE_TYPE_HERE: - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Shared Message type:", "Here"); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Shared Message type:", "Here"); break; default: - HDfprintf(stream, "%*s%-*s %s (%u)\n", indent, "", fwidth, "Shared Message type:", "Unknown", - (unsigned)mesg->type); + fprintf(stream, "%*s%-*s %s (%u)\n", indent, "", fwidth, "Shared Message type:", "Unknown", + (unsigned)mesg->type); } /* end switch */ FUNC_LEAVE_NOAPI(SUCCEED) diff --git a/src/H5Oshmesg.c b/src/H5Oshmesg.c index 6112b9c..5c9a199 100644 --- a/src/H5Oshmesg.c +++ b/src/H5Oshmesg.c @@ -234,10 +234,10 @@ H5O__shmesg_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int assert(indent >= 0); assert(fwidth >= 0); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Version:", mesg->version); - HDfprintf(stream, "%*s%-*s %" PRIuHADDR " (rel)\n", indent, "", fwidth, - "Shared message table address:", mesg->addr); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Number of indexes:", mesg->nindexes); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Version:", mesg->version); + fprintf(stream, "%*s%-*s %" PRIuHADDR " (rel)\n", indent, "", fwidth, + "Shared message table address:", mesg->addr); + fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Number of indexes:", mesg->nindexes); FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5O__shmesg_debug() */ diff --git a/src/H5Ostab.c b/src/H5Ostab.c index ecb55b2..6c17a8f 100644 --- a/src/H5Ostab.c +++ b/src/H5Ostab.c @@ -407,9 +407,9 @@ H5O__stab_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int in assert(indent >= 0); assert(fwidth >= 0); - HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "B-tree address:", stab->btree_addr); + fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "B-tree address:", stab->btree_addr); - HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Name heap address:", stab->heap_addr); + fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Name heap address:", stab->heap_addr); FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5O__stab_debug() */ @@ -242,27 +242,27 @@ H5PB_print_stats(const H5PB_t *page_buf) assert(page_buf); - HDprintf("PAGE BUFFER STATISTICS:\n"); - - HDprintf("******* METADATA\n"); - HDprintf("\t Total Accesses: %u\n", page_buf->accesses[0]); - HDprintf("\t Hits: %u\n", page_buf->hits[0]); - HDprintf("\t Misses: %u\n", page_buf->misses[0]); - HDprintf("\t Evictions: %u\n", page_buf->evictions[0]); - HDprintf("\t Bypasses: %u\n", page_buf->bypasses[0]); - HDprintf("\t Hit Rate = %f%%\n", - ((double)page_buf->hits[0] / (page_buf->accesses[0] - page_buf->bypasses[0])) * 100); - HDprintf("*****************\n\n"); - - HDprintf("******* RAWDATA\n"); - HDprintf("\t Total Accesses: %u\n", page_buf->accesses[1]); - HDprintf("\t Hits: %u\n", page_buf->hits[1]); - HDprintf("\t Misses: %u\n", page_buf->misses[1]); - HDprintf("\t Evictions: %u\n", page_buf->evictions[1]); - HDprintf("\t Bypasses: %u\n", page_buf->bypasses[1]); - HDprintf("\t Hit Rate = %f%%\n", - ((double)page_buf->hits[1] / (page_buf->accesses[1] - page_buf->bypasses[0])) * 100); - HDprintf("*****************\n\n"); + printf("PAGE BUFFER STATISTICS:\n"); + + printf("******* METADATA\n"); + printf("\t Total Accesses: %u\n", page_buf->accesses[0]); + printf("\t Hits: %u\n", page_buf->hits[0]); + printf("\t Misses: %u\n", page_buf->misses[0]); + printf("\t Evictions: %u\n", page_buf->evictions[0]); + printf("\t Bypasses: %u\n", page_buf->bypasses[0]); + printf("\t Hit Rate = %f%%\n", + ((double)page_buf->hits[0] / (page_buf->accesses[0] - page_buf->bypasses[0])) * 100); + printf("*****************\n\n"); + + printf("******* RAWDATA\n"); + printf("\t Total Accesses: %u\n", page_buf->accesses[1]); + printf("\t Hits: %u\n", page_buf->hits[1]); + printf("\t Misses: %u\n", page_buf->misses[1]); + printf("\t Evictions: %u\n", page_buf->evictions[1]); + printf("\t Bypasses: %u\n", page_buf->bypasses[1]); + printf("\t Hit Rate = %f%%\n", + ((double)page_buf->hits[1] / (page_buf->accesses[1] - page_buf->bypasses[0])) * 100); + printf("*****************\n\n"); FUNC_LEAVE_NOAPI(SUCCEED) } /* H5PB_print_stats */ diff --git a/src/H5Rint.c b/src/H5Rint.c index db9ce26..9b56b10 100644 --- a/src/H5Rint.c +++ b/src/H5Rint.c @@ -91,9 +91,9 @@ #ifdef H5R_DEBUG #define H5R_LOG_DEBUG(...) \ do { \ - HDfprintf(stdout, " # %s(): ", __func__); \ - HDfprintf(stdout, __VA_ARGS__); \ - HDfprintf(stdout, "\n"); \ + fprintf(stdout, " # %s(): ", __func__); \ + fprintf(stdout, __VA_ARGS__); \ + fprintf(stdout, "\n"); \ HDfflush(stdout); \ } while (0) static const char * @@ -2553,11 +2553,11 @@ H5SM_table_debug(H5F_t *f, haddr_t table_addr, FILE *stream, int indent, int fwi if (table_vers == UINT_MAX) table_vers = H5F_SOHM_VERS(f); else if (table_vers != H5F_SOHM_VERS(f)) - HDfprintf(stream, "*** SOHM TABLE VERSION DOESN'T MATCH VERSION IN SUPERBLOCK!\n"); + fprintf(stream, "*** SOHM TABLE VERSION DOESN'T MATCH VERSION IN SUPERBLOCK!\n"); if (num_indexes == UINT_MAX) num_indexes = H5F_SOHM_NINDEXES(f); else if (num_indexes != H5F_SOHM_NINDEXES(f)) - HDfprintf(stream, "*** NUMBER OF SOHM INDEXES DOESN'T MATCH VALUE IN SUPERBLOCK!\n"); + fprintf(stream, "*** NUMBER OF SOHM INDEXES DOESN'T MATCH VALUE IN SUPERBLOCK!\n"); /* Check arguments. Version must be 0, the only version implemented so far */ if (table_vers > HDF5_SHAREDHEADER_VERSION) @@ -2574,28 +2574,28 @@ H5SM_table_debug(H5F_t *f, haddr_t table_addr, FILE *stream, int indent, int fwi H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table") - HDfprintf(stream, "%*sShared Message Master Table...\n", indent, ""); + fprintf(stream, "%*sShared Message Master Table...\n", indent, ""); for (x = 0; x < num_indexes; ++x) { - HDfprintf(stream, "%*sIndex %d...\n", indent, "", x); - HDfprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth, "SOHM Index Type:", - (table->indexes[x].index_type == H5SM_LIST - ? "List" - : (table->indexes[x].index_type == H5SM_BTREE ? "B-Tree" : "Unknown"))); - - HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", fwidth, - "Address of index:", table->indexes[x].index_addr); - HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", fwidth, - "Address of index's heap:", table->indexes[x].heap_addr); - HDfprintf(stream, "%*s%-*s 0x%08x\n", indent + 3, "", fwidth, - "Message type flags:", table->indexes[x].mesg_types); - HDfprintf(stream, "%*s%-*s %zu\n", indent + 3, "", fwidth, - "Minimum size of messages:", table->indexes[x].min_mesg_size); - HDfprintf(stream, "%*s%-*s %zu\n", indent + 3, "", fwidth, - "Number of messages:", table->indexes[x].num_messages); - HDfprintf(stream, "%*s%-*s %zu\n", indent + 3, "", fwidth, - "Maximum list size:", table->indexes[x].list_max); - HDfprintf(stream, "%*s%-*s %zu\n", indent + 3, "", fwidth, - "Minimum B-tree size:", table->indexes[x].btree_min); + fprintf(stream, "%*sIndex %d...\n", indent, "", x); + fprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth, "SOHM Index Type:", + (table->indexes[x].index_type == H5SM_LIST + ? "List" + : (table->indexes[x].index_type == H5SM_BTREE ? "B-Tree" : "Unknown"))); + + fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", fwidth, + "Address of index:", table->indexes[x].index_addr); + fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", fwidth, + "Address of index's heap:", table->indexes[x].heap_addr); + fprintf(stream, "%*s%-*s 0x%08x\n", indent + 3, "", fwidth, + "Message type flags:", table->indexes[x].mesg_types); + fprintf(stream, "%*s%-*s %zu\n", indent + 3, "", fwidth, + "Minimum size of messages:", table->indexes[x].min_mesg_size); + fprintf(stream, "%*s%-*s %zu\n", indent + 3, "", fwidth, + "Number of messages:", table->indexes[x].num_messages); + fprintf(stream, "%*s%-*s %zu\n", indent + 3, "", fwidth, + "Maximum list size:", table->indexes[x].list_max); + fprintf(stream, "%*s%-*s %zu\n", indent + 3, "", fwidth, + "Minimum B-tree size:", table->indexes[x].btree_min); } /* end for */ done: @@ -2673,31 +2673,31 @@ H5SM_list_debug(H5F_t *f, haddr_t list_addr, FILE *stream, int indent, int fwidt if (NULL == (fh = H5HF_open(f, table->indexes[index_num].heap_addr))) HGOTO_ERROR(H5E_SOHM, H5E_CANTOPENOBJ, FAIL, "unable to open SOHM heap") - HDfprintf(stream, "%*sShared Message List Index...\n", indent, ""); + fprintf(stream, "%*sShared Message List Index...\n", indent, ""); for (x = 0; x < table->indexes[index_num].num_messages; ++x) { - HDfprintf(stream, "%*sShared Object Header Message %d...\n", indent, "", x); - HDfprintf(stream, "%*s%-*s %08lu\n", indent + 3, "", fwidth, - "Hash value:", (unsigned long)list->messages[x].hash); + fprintf(stream, "%*sShared Object Header Message %d...\n", indent, "", x); + fprintf(stream, "%*s%-*s %08lu\n", indent + 3, "", fwidth, + "Hash value:", (unsigned long)list->messages[x].hash); if (list->messages[x].location == H5SM_IN_HEAP) { assert(fh); - HDfprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth, "Location:", "in heap"); - HDfprintf(stream, "%*s%-*s 0x%" PRIx64 "\n", indent + 3, "", fwidth, - "Heap ID:", list->messages[x].u.heap_loc.fheap_id.val); - HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent + 3, "", fwidth, - "Reference count:", list->messages[x].u.heap_loc.ref_count); + fprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth, "Location:", "in heap"); + fprintf(stream, "%*s%-*s 0x%" PRIx64 "\n", indent + 3, "", fwidth, + "Heap ID:", list->messages[x].u.heap_loc.fheap_id.val); + fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent + 3, "", fwidth, + "Reference count:", list->messages[x].u.heap_loc.ref_count); } /* end if */ else if (list->messages[x].location == H5SM_IN_OH) { - HDfprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth, "Location:", "in object header"); - HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", fwidth, - "Object header address:", list->messages[x].u.mesg_loc.oh_addr); - HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", fwidth, - "Message creation index:", list->messages[x].u.mesg_loc.oh_addr); - HDfprintf(stream, "%*s%-*s %u\n", indent + 3, "", fwidth, - "Message type ID:", list->messages[x].msg_type_id); + fprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth, "Location:", "in object header"); + fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", fwidth, + "Object header address:", list->messages[x].u.mesg_loc.oh_addr); + fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", fwidth, + "Message creation index:", list->messages[x].u.mesg_loc.oh_addr); + fprintf(stream, "%*s%-*s %u\n", indent + 3, "", fwidth, + "Message type ID:", list->messages[x].msg_type_id); } /* end if */ else - HDfprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth, "Location:", "invalid"); + fprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth, "Location:", "invalid"); } /* end for */ done: diff --git a/src/H5SMbtree2.c b/src/H5SMbtree2.c index 5ba9d9b..461fdcf 100644 --- a/src/H5SMbtree2.c +++ b/src/H5SMbtree2.c @@ -186,14 +186,14 @@ H5SM__bt2_debug(FILE *stream, int indent, int fwidth, const void *record, const FUNC_ENTER_PACKAGE_NOERR if (sohm->location == H5SM_IN_HEAP) - HDfprintf(stream, "%*s%-*s {%" PRIu64 ", %" PRIo32 ", %" PRIxHSIZE "}\n", indent, "", fwidth, - "Shared Message in heap:", sohm->u.heap_loc.fheap_id.val, sohm->hash, - sohm->u.heap_loc.ref_count); + fprintf(stream, "%*s%-*s {%" PRIu64 ", %" PRIo32 ", %" PRIxHSIZE "}\n", indent, "", fwidth, + "Shared Message in heap:", sohm->u.heap_loc.fheap_id.val, sohm->hash, + sohm->u.heap_loc.ref_count); else { assert(sohm->location == H5SM_IN_OH); - HDfprintf(stream, "%*s%-*s {%" PRIuHADDR ", %" PRIo32 ", %x, %" PRIx32 "}\n", indent, "", fwidth, - "Shared Message in OH:", sohm->u.mesg_loc.oh_addr, sohm->hash, sohm->msg_type_id, - sohm->u.mesg_loc.index); + fprintf(stream, "%*s%-*s {%" PRIuHADDR ", %" PRIo32 ", %x, %" PRIx32 "}\n", indent, "", fwidth, + "Shared Message in OH:", sohm->u.mesg_loc.oh_addr, sohm->hash, sohm->msg_type_id, + sohm->u.mesg_loc.index); } /* end else */ FUNC_LEAVE_NOAPI(SUCCEED) diff --git a/src/H5Sdbg.c b/src/H5Sdbg.c index f4d027b..39c9cfb 100644 --- a/src/H5Sdbg.c +++ b/src/H5Sdbg.c @@ -83,22 +83,22 @@ H5S_debug(H5F_t *f, const void *_mesg, FILE *stream, int indent, int fwidth) switch (H5S_GET_EXTENT_TYPE(mesg)) { case H5S_NULL: - HDfprintf(stream, "%*s%-*s H5S_NULL\n", indent, "", fwidth, "Space class:"); + fprintf(stream, "%*s%-*s H5S_NULL\n", indent, "", fwidth, "Space class:"); break; case H5S_SCALAR: - HDfprintf(stream, "%*s%-*s H5S_SCALAR\n", indent, "", fwidth, "Space class:"); + fprintf(stream, "%*s%-*s H5S_SCALAR\n", indent, "", fwidth, "Space class:"); break; case H5S_SIMPLE: - HDfprintf(stream, "%*s%-*s H5S_SIMPLE\n", indent, "", fwidth, "Space class:"); + fprintf(stream, "%*s%-*s H5S_SIMPLE\n", indent, "", fwidth, "Space class:"); H5O_debug_id(H5O_SDSPACE_ID, f, &(mesg->extent), stream, indent + 3, MAX(0, fwidth - 3)); break; case H5S_NO_CLASS: default: - HDfprintf(stream, "%*s%-*s **UNKNOWN-%ld**\n", indent, "", fwidth, - "Space class:", (long)(H5S_GET_EXTENT_TYPE(mesg))); + fprintf(stream, "%*s%-*s **UNKNOWN-%ld**\n", indent, "", fwidth, + "Space class:", (long)(H5S_GET_EXTENT_TYPE(mesg))); break; } /* end switch */ diff --git a/src/H5Shyper.c b/src/H5Shyper.c index a208ed5..d164d30 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -297,12 +297,12 @@ H5S__hyper_print_spans_helper(FILE *f, const H5S_hyper_span_t *span, unsigned de FUNC_ENTER_PACKAGE_NOERR while (span) { - HDfprintf(f, "%s: %*sdepth=%u, span=%p, (%" PRIuHSIZE ", %" PRIuHSIZE "), next=%p\n", __func__, - depth * 2, "", depth, (void *)span, span->low, span->high, (void *)span->next); + fprintf(f, "%s: %*sdepth=%u, span=%p, (%" PRIuHSIZE ", %" PRIuHSIZE "), next=%p\n", __func__, + depth * 2, "", depth, (void *)span, span->low, span->high, (void *)span->next); if (span->down) { - HDfprintf(f, "%s: %*sspans=%p, count=%u, bounds[0]={%" PRIuHSIZE ", %" PRIuHSIZE "}, head=%p\n", - __func__, (depth + 1) * 2, "", (void *)span->down, span->down->count, - span->down->low_bounds[0], span->down->high_bounds[0], (void *)span->down->head); + fprintf(f, "%s: %*sspans=%p, count=%u, bounds[0]={%" PRIuHSIZE ", %" PRIuHSIZE "}, head=%p\n", + __func__, (depth + 1) * 2, "", (void *)span->down, span->down->count, + span->down->low_bounds[0], span->down->high_bounds[0], (void *)span->down->head); H5S__hyper_print_spans_helper(f, span->down->head, depth + 1); } /* end if */ span = span->next; @@ -317,9 +317,9 @@ H5S__hyper_print_spans(FILE *f, const H5S_hyper_span_info_t *span_lst) FUNC_ENTER_PACKAGE_NOERR if (span_lst != NULL) { - HDfprintf(f, "%s: spans=%p, count=%u, bounds[0]={%" PRIuHSIZE ", %" PRIuHSIZE "}, head=%p\n", - __func__, (void *)span_lst, span_lst->count, span_lst->low_bounds[0], - span_lst->high_bounds[0], (void *)span_lst->head); + fprintf(f, "%s: spans=%p, count=%u, bounds[0]={%" PRIuHSIZE ", %" PRIuHSIZE "}, head=%p\n", __func__, + (void *)span_lst, span_lst->count, span_lst->low_bounds[0], span_lst->high_bounds[0], + (void *)span_lst->head); H5S__hyper_print_spans_helper(f, span_lst->head, 0); } /* end if */ @@ -344,21 +344,21 @@ H5S__hyper_print_diminfo_helper(FILE *f, const char *field, unsigned ndims, cons FUNC_ENTER_PACKAGE_NOERR if (dinfo != NULL) { - HDfprintf(f, "%s: %s: start=[", __func__, field); + fprintf(f, "%s: %s: start=[", __func__, field); for (u = 0; u < ndims; u++) - HDfprintf(f, "%" PRIuHSIZE "%s", dinfo[u].start, (u < (ndims - 1) ? ", " : "]\n")); - HDfprintf(f, "%s: %s: stride=[", __func__, field); + fprintf(f, "%" PRIuHSIZE "%s", dinfo[u].start, (u < (ndims - 1) ? ", " : "]\n")); + fprintf(f, "%s: %s: stride=[", __func__, field); for (u = 0; u < ndims; u++) - HDfprintf(f, "%" PRIuHSIZE "%s", dinfo[u].stride, (u < (ndims - 1) ? ", " : "]\n")); - HDfprintf(f, "%s: %s: count=[", __func__, field); + fprintf(f, "%" PRIuHSIZE "%s", dinfo[u].stride, (u < (ndims - 1) ? ", " : "]\n")); + fprintf(f, "%s: %s: count=[", __func__, field); for (u = 0; u < ndims; u++) - HDfprintf(f, "%" PRIuHSIZE "%s", dinfo[u].count, (u < (ndims - 1) ? ", " : "]\n")); - HDfprintf(f, "%s: %s: block=[", __func__, field); + fprintf(f, "%" PRIuHSIZE "%s", dinfo[u].count, (u < (ndims - 1) ? ", " : "]\n")); + fprintf(f, "%s: %s: block=[", __func__, field); for (u = 0; u < ndims; u++) - HDfprintf(f, "%" PRIuHSIZE "%s", dinfo[u].block, (u < (ndims - 1) ? ", " : "]\n")); + fprintf(f, "%" PRIuHSIZE "%s", dinfo[u].block, (u < (ndims - 1) ? ", " : "]\n")); } /* end if */ else - HDfprintf(f, "%s: %s==NULL\n", __func__, field); + fprintf(f, "%s: %s==NULL\n", __func__, field); FUNC_LEAVE_NOAPI(SUCCEED) } @@ -413,32 +413,32 @@ H5S__hyper_print_spans_dfs(FILE *f, const H5S_hyper_span_info_t *span_lst, unsig } /* end while */ for (u = 0; u < depth; u++) - HDfprintf(f, "\t"); - HDfprintf(f, "DIM[%u]: ref_count=%u, #elems=%u, head=%p, tail=%p, actual_tail=%p, matched=%d\n", depth, - span_lst->count, num_elems, (void *)span_lst->head, (void *)span_lst->tail, (void *)actual_tail, - (span_lst->tail == actual_tail)); + fprintf(f, "\t"); + fprintf(f, "DIM[%u]: ref_count=%u, #elems=%u, head=%p, tail=%p, actual_tail=%p, matched=%d\n", depth, + span_lst->count, num_elems, (void *)span_lst->head, (void *)span_lst->tail, (void *)actual_tail, + (span_lst->tail == actual_tail)); for (u = 0; u < depth; u++) - HDfprintf(f, "\t"); - HDfprintf(f, "low_bounds=["); + fprintf(f, "\t"); + fprintf(f, "low_bounds=["); for (u = 0; u < dims - 1; u++) - HDfprintf(f, "%" PRIuHSIZE ",", span_lst->low_bounds[u]); - HDfprintf(f, "%" PRIuHSIZE "]\n", span_lst->low_bounds[dims - 1]); + fprintf(f, "%" PRIuHSIZE ",", span_lst->low_bounds[u]); + fprintf(f, "%" PRIuHSIZE "]\n", span_lst->low_bounds[dims - 1]); for (u = 0; u < depth; u++) - HDfprintf(f, "\t"); - HDfprintf(f, "high_bounds=["); + fprintf(f, "\t"); + fprintf(f, "high_bounds=["); for (u = 0; u < dims - 1; u++) - HDfprintf(f, "%" PRIuHSIZE ",", span_lst->high_bounds[u]); - HDfprintf(f, "%" PRIuHSIZE "]\n", span_lst->high_bounds[dims - 1]); + fprintf(f, "%" PRIuHSIZE ",", span_lst->high_bounds[u]); + fprintf(f, "%" PRIuHSIZE "]\n", span_lst->high_bounds[dims - 1]); cur_elem = span_lst->head; elem_idx = 0; while (cur_elem) { for (u = 0; u < depth; u++) - HDfprintf(f, "\t"); - HDfprintf(f, "ELEM[%u]: ptr=%p, low=%" PRIuHSIZE ", high=%" PRIuHSIZE ", down=%p\n", elem_idx++, - (void *)cur_elem, cur_elem->low, cur_elem->high, (void *)cur_elem->down); + fprintf(f, "\t"); + fprintf(f, "ELEM[%u]: ptr=%p, low=%" PRIuHSIZE ", high=%" PRIuHSIZE ", down=%p\n", elem_idx++, + (void *)cur_elem, cur_elem->low, cur_elem->high, (void *)cur_elem->down); if (cur_elem->down) H5S__hyper_print_spans_dfs(f, cur_elem->down, depth + 1, dims); cur_elem = cur_elem->next; @@ -474,37 +474,37 @@ H5S__hyper_print_space_dfs(FILE *f, const H5S_t *space) assert(hslab); - HDfprintf(f, "=======================\n"); - HDfprintf(f, "SPACE: span_lst=%p, #dims=%u, offset_changed=%d\n", (void *)hslab->span_lst, dims, - space->select.offset_changed); + fprintf(f, "=======================\n"); + fprintf(f, "SPACE: span_lst=%p, #dims=%u, offset_changed=%d\n", (void *)hslab->span_lst, dims, + space->select.offset_changed); - HDfprintf(f, " offset=["); + fprintf(f, " offset=["); for (u = 0; u < dims - 1; u++) - HDfprintf(f, "%lld,", space->select.offset[u]); - HDfprintf(f, "%lld]\n", space->select.offset[dims - 1]); + fprintf(f, "%lld,", space->select.offset[u]); + fprintf(f, "%lld]\n", space->select.offset[dims - 1]); - HDfprintf(f, " low_bounds=["); + fprintf(f, " low_bounds=["); if (space->select.sel_info.hslab->diminfo_valid == H5S_DIMINFO_VALID_YES) { for (u = 0; u < dims - 1; u++) - HDfprintf(f, "%" PRIuHSIZE ",", space->select.sel_info.hslab->diminfo.low_bounds[u]); - HDfprintf(f, "%" PRIuHSIZE "]\n", space->select.sel_info.hslab->diminfo.low_bounds[dims - 1]); + fprintf(f, "%" PRIuHSIZE ",", space->select.sel_info.hslab->diminfo.low_bounds[u]); + fprintf(f, "%" PRIuHSIZE "]\n", space->select.sel_info.hslab->diminfo.low_bounds[dims - 1]); } /* end if */ else { for (u = 0; u < dims - 1; u++) - HDfprintf(f, "%" PRIuHSIZE ",", space->select.sel_info.hslab->span_lst->low_bounds[u]); - HDfprintf(f, "%" PRIuHSIZE "]\n", space->select.sel_info.hslab->span_lst->low_bounds[dims - 1]); + fprintf(f, "%" PRIuHSIZE ",", space->select.sel_info.hslab->span_lst->low_bounds[u]); + fprintf(f, "%" PRIuHSIZE "]\n", space->select.sel_info.hslab->span_lst->low_bounds[dims - 1]); } /* end else */ - HDfprintf(f, " high_bounds=["); + fprintf(f, " high_bounds=["); if (space->select.sel_info.hslab->diminfo_valid == H5S_DIMINFO_VALID_YES) { for (u = 0; u < dims - 1; u++) - HDfprintf(f, "%" PRIuHSIZE ",", space->select.sel_info.hslab->diminfo.high_bounds[u]); - HDfprintf(f, "%" PRIuHSIZE "]\n", space->select.sel_info.hslab->diminfo.high_bounds[dims - 1]); + fprintf(f, "%" PRIuHSIZE ",", space->select.sel_info.hslab->diminfo.high_bounds[u]); + fprintf(f, "%" PRIuHSIZE "]\n", space->select.sel_info.hslab->diminfo.high_bounds[dims - 1]); } /* end if */ else { for (u = 0; u < dims - 1; u++) - HDfprintf(f, "%" PRIuHSIZE ",", space->select.sel_info.hslab->span_lst->high_bounds[u]); - HDfprintf(f, "%" PRIuHSIZE "]\n", space->select.sel_info.hslab->span_lst->high_bounds[dims - 1]); + fprintf(f, "%" PRIuHSIZE ",", space->select.sel_info.hslab->span_lst->high_bounds[u]); + fprintf(f, "%" PRIuHSIZE "]\n", space->select.sel_info.hslab->span_lst->high_bounds[dims - 1]); } /* end else */ /* Print out diminfo, if it's valid */ @@ -514,7 +514,7 @@ H5S__hyper_print_space_dfs(FILE *f, const H5S_t *space) /* Start print out the highest-order of dimension */ if (hslab->span_lst) H5S__hyper_print_spans_dfs(f, hslab->span_lst, 0, dims); - HDfprintf(f, "=======================\n\n"); + fprintf(f, "=======================\n\n"); FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5S__hyper_print_space_dfs() */ diff --git a/src/H5Smpio.c b/src/H5Smpio.c index f0f55c4..417ade6 100644 --- a/src/H5Smpio.c +++ b/src/H5Smpio.c @@ -707,7 +707,7 @@ H5S__mpio_reg_hyper_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type, rank = sel_iter->u.hyp.iter_rank; #ifdef H5S_DEBUG if (H5DEBUG(S)) - HDfprintf(H5DEBUG(S), "%s: Flattened selection\n", __func__); + fprintf(H5DEBUG(S), "%s: Flattened selection\n", __func__); #endif for (u = 0; u < rank; ++u) { H5_CHECK_OVERFLOW(diminfo[u].start, hsize_t, hssize_t) @@ -719,14 +719,14 @@ H5S__mpio_reg_hyper_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type, #ifdef H5S_DEBUG if (H5DEBUG(S)) { - HDfprintf(H5DEBUG(S), - "%s: start=%" PRIdHSIZE " stride=%" PRIuHSIZE " count=%" PRIuHSIZE - " block=%" PRIuHSIZE " xtent=%" PRIuHSIZE, - __func__, d[u].start, d[u].strid, d[u].count, d[u].block, d[u].xtent); + fprintf(H5DEBUG(S), + "%s: start=%" PRIdHSIZE " stride=%" PRIuHSIZE " count=%" PRIuHSIZE + " block=%" PRIuHSIZE " xtent=%" PRIuHSIZE, + __func__, d[u].start, d[u].strid, d[u].count, d[u].block, d[u].xtent); if (u == 0) - HDfprintf(H5DEBUG(S), " rank=%u\n", rank); + fprintf(H5DEBUG(S), " rank=%u\n", rank); else - HDfprintf(H5DEBUG(S), "\n"); + fprintf(H5DEBUG(S), "\n"); } #endif @@ -741,7 +741,7 @@ H5S__mpio_reg_hyper_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type, rank = space->extent.rank; #ifdef H5S_DEBUG if (H5DEBUG(S)) - HDfprintf(H5DEBUG(S), "%s: Non-flattened selection\n", __func__); + fprintf(H5DEBUG(S), "%s: Non-flattened selection\n", __func__); #endif for (u = 0; u < rank; ++u) { H5_CHECK_OVERFLOW(diminfo[u].start, hsize_t, hssize_t) @@ -753,14 +753,14 @@ H5S__mpio_reg_hyper_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type, #ifdef H5S_DEBUG if (H5DEBUG(S)) { - HDfprintf(H5DEBUG(S), - "%s: start=%" PRIdHSIZE " stride=%" PRIuHSIZE " count=%" PRIuHSIZE - " block=%" PRIuHSIZE " xtent=%" PRIuHSIZE, - __func__, d[u].start, d[u].strid, d[u].count, d[u].block, d[u].xtent); + fprintf(H5DEBUG(S), + "%s: start=%" PRIdHSIZE " stride=%" PRIuHSIZE " count=%" PRIuHSIZE + " block=%" PRIuHSIZE " xtent=%" PRIuHSIZE, + __func__, d[u].start, d[u].strid, d[u].count, d[u].block, d[u].xtent); if (u == 0) - HDfprintf(H5DEBUG(S), " rank=%u\n", rank); + fprintf(H5DEBUG(S), " rank=%u\n", rank); else - HDfprintf(H5DEBUG(S), "\n"); + fprintf(H5DEBUG(S), "\n"); } #endif @@ -780,8 +780,8 @@ H5S__mpio_reg_hyper_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type, #ifdef H5S_DEBUG if (H5DEBUG(S)) { i = ((int)rank) - 1; - HDfprintf(H5DEBUG(S), " offset[%2d]=%" PRIuHSIZE "; max_xtent[%2d]=%" PRIuHSIZE "\n", i, offset[i], i, - max_xtent[i]); + fprintf(H5DEBUG(S), " offset[%2d]=%" PRIuHSIZE "; max_xtent[%2d]=%" PRIuHSIZE "\n", i, offset[i], i, + max_xtent[i]); } #endif for (i = ((int)rank) - 2; i >= 0; --i) { @@ -789,8 +789,8 @@ H5S__mpio_reg_hyper_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type, max_xtent[i] = max_xtent[i + 1] * d[i].xtent; #ifdef H5S_DEBUG if (H5DEBUG(S)) - HDfprintf(H5DEBUG(S), " offset[%2d]=%" PRIuHSIZE "; max_xtent[%2d]=%" PRIuHSIZE "\n", i, - offset[i], i, max_xtent[i]); + fprintf(H5DEBUG(S), " offset[%2d]=%" PRIuHSIZE "; max_xtent[%2d]=%" PRIuHSIZE "\n", i, offset[i], + i, max_xtent[i]); #endif } /* end for */ @@ -805,9 +805,9 @@ H5S__mpio_reg_hyper_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type, *******************************************************/ #ifdef H5S_DEBUG if (H5DEBUG(S)) { - HDfprintf(H5DEBUG(S), "%s: Making contig type %zu MPI_BYTEs\n", __func__, elmt_size); + fprintf(H5DEBUG(S), "%s: Making contig type %zu MPI_BYTEs\n", __func__, elmt_size); for (i = ((int)rank) - 1; i >= 0; --i) - HDfprintf(H5DEBUG(S), "d[%d].xtent=%" PRIuHSIZE "\n", i, d[i].xtent); + fprintf(H5DEBUG(S), "d[%d].xtent=%" PRIuHSIZE "\n", i, d[i].xtent); } #endif @@ -835,16 +835,16 @@ H5S__mpio_reg_hyper_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type, for (i = ((int)rank) - 1; i >= 0; --i) { #ifdef H5S_DEBUG if (H5DEBUG(S)) - HDfprintf(H5DEBUG(S), - "%s: Dimension i=%d \n" - "start=%" PRIdHSIZE " count=%" PRIuHSIZE " block=%" PRIuHSIZE " stride=%" PRIuHSIZE - ", xtent=%" PRIuHSIZE " max_xtent=%" PRIuHSIZE "\n", - __func__, i, d[i].start, d[i].count, d[i].block, d[i].strid, d[i].xtent, max_xtent[i]); + fprintf(H5DEBUG(S), + "%s: Dimension i=%d \n" + "start=%" PRIdHSIZE " count=%" PRIuHSIZE " block=%" PRIuHSIZE " stride=%" PRIuHSIZE + ", xtent=%" PRIuHSIZE " max_xtent=%" PRIuHSIZE "\n", + __func__, i, d[i].start, d[i].count, d[i].block, d[i].strid, d[i].xtent, max_xtent[i]); #endif #ifdef H5S_DEBUG if (H5DEBUG(S)) - HDfprintf(H5DEBUG(S), "%s: i=%d Making vector-type \n", __func__, i); + fprintf(H5DEBUG(S), "%s: i=%d Making vector-type \n", __func__, i); #endif /**************************************** * Build vector type of the selection. @@ -981,8 +981,8 @@ done: #ifdef H5S_DEBUG if (H5DEBUG(S)) - HDfprintf(H5DEBUG(S), "Leave %s, count=%d is_derived_type=%s\n", __func__, *count, - (*is_derived_type) ? "TRUE" : "FALSE"); + fprintf(H5DEBUG(S), "Leave %s, count=%d is_derived_type=%s\n", __func__, *count, + (*is_derived_type) ? "TRUE" : "FALSE"); #endif FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__mpio_reg_hyper_type() */ @@ -1495,11 +1495,11 @@ H5T_top_term_package(void) (size_t)0, (size_t)0, NULL, NULL, H5CX_get_dxpl()) < 0) { #ifdef H5T_DEBUG if (H5DEBUG(T)) { - HDfprintf(H5DEBUG(T), - "H5T: conversion function " - "0x%016zx failed to free private data for " - "%s (ignored)\n", - (size_t)path->conv.u.app_func, path->name); + fprintf(H5DEBUG(T), + "H5T: conversion function " + "0x%016zx failed to free private data for " + "%s (ignored)\n", + (size_t)path->conv.u.app_func, path->name); } /* end if */ #endif H5E_clear_stack(NULL); /*ignore the error*/ @@ -1510,11 +1510,11 @@ H5T_top_term_package(void) (size_t)0, (size_t)0, NULL, NULL) < 0) { #ifdef H5T_DEBUG if (H5DEBUG(T)) { - HDfprintf(H5DEBUG(T), - "H5T: conversion function " - "0x%016zx failed to free private data for " - "%s (ignored)\n", - (size_t)path->conv.u.lib_func, path->name); + fprintf(H5DEBUG(T), + "H5T: conversion function " + "0x%016zx failed to free private data for " + "%s (ignored)\n", + (size_t)path->conv.u.lib_func, path->name); } /* end if */ #endif H5E_clear_stack(NULL); /*ignore the error*/ @@ -2625,10 +2625,10 @@ H5T__register(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T_con (size_t)0, NULL, NULL, H5CX_get_dxpl()) < 0) { #ifdef H5T_DEBUG if (H5DEBUG(T)) - HDfprintf(H5DEBUG(T), - "H5T: conversion function 0x%016zx " - "failed to free private data for %s (ignored)\n", - (size_t)old_path->conv.u.app_func, old_path->name); + fprintf(H5DEBUG(T), + "H5T: conversion function 0x%016zx " + "failed to free private data for %s (ignored)\n", + (size_t)old_path->conv.u.app_func, old_path->name); #endif } /* end if */ } /* end if */ @@ -2636,10 +2636,10 @@ H5T__register(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T_con (size_t)0, NULL, NULL) < 0) { #ifdef H5T_DEBUG if (H5DEBUG(T)) - HDfprintf(H5DEBUG(T), - "H5T: conversion function 0x%016zx " - "failed to free private data for %s (ignored)\n", - (size_t)old_path->conv.u.lib_func, old_path->name); + fprintf(H5DEBUG(T), + "H5T: conversion function 0x%016zx " + "failed to free private data for %s (ignored)\n", + (size_t)old_path->conv.u.lib_func, old_path->name); #endif } /* end if */ (void)H5T_close_real(old_path->src); @@ -2805,10 +2805,10 @@ H5T__unregister(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T_c (size_t)0, NULL, NULL, H5CX_get_dxpl()) < 0) { #ifdef H5T_DEBUG if (H5DEBUG(T)) - HDfprintf(H5DEBUG(T), - "H5T: conversion function 0x%016zx failed " - "to free private data for %s (ignored)\n", - (size_t)path->conv.u.app_func, path->name); + fprintf(H5DEBUG(T), + "H5T: conversion function 0x%016zx failed " + "to free private data for %s (ignored)\n", + (size_t)path->conv.u.app_func, path->name); #endif } /* end if */ } /* end if */ @@ -2816,10 +2816,10 @@ H5T__unregister(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T_c (size_t)0, NULL, NULL) < 0) { #ifdef H5T_DEBUG if (H5DEBUG(T)) - HDfprintf(H5DEBUG(T), - "H5T: conversion function 0x%016zx failed " - "to free private data for %s (ignored)\n", - (size_t)path->conv.u.lib_func, path->name); + fprintf(H5DEBUG(T), + "H5T: conversion function 0x%016zx failed " + "to free private data for %s (ignored)\n", + (size_t)path->conv.u.lib_func, path->name); #endif } /* end if */ (void)H5T_close_real(path->src); @@ -5036,7 +5036,7 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co NULL, NULL) < 0) { #ifdef H5T_DEBUG if (H5DEBUG(T)) - HDfprintf(H5DEBUG(T), "H5T: unable to initialize no-op conversion function (ignored)\n"); + fprintf(H5DEBUG(T), "H5T: unable to initialize no-op conversion function (ignored)\n"); #endif H5E_clear_stack(NULL); /*ignore the error*/ } /* end if */ @@ -5221,8 +5221,8 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co (size_t)0, NULL, NULL, H5CX_get_dxpl()) < 0) { #ifdef H5T_DEBUG if (H5DEBUG(T)) - HDfprintf(H5DEBUG(T), "H5T: conversion function 0x%016zx free failed for %s (ignored)\n", - (size_t)path->conv.u.app_func, path->name); + fprintf(H5DEBUG(T), "H5T: conversion function 0x%016zx free failed for %s (ignored)\n", + (size_t)path->conv.u.app_func, path->name); #endif H5E_clear_stack(NULL); /*ignore the failure*/ } /* end if */ @@ -5231,8 +5231,8 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co (size_t)0, NULL, NULL) < 0) { #ifdef H5T_DEBUG if (H5DEBUG(T)) - HDfprintf(H5DEBUG(T), "H5T: conversion function 0x%016zx free failed for %s (ignored)\n", - (size_t)path->conv.u.lib_func, path->name); + fprintf(H5DEBUG(T), "H5T: conversion function 0x%016zx free failed for %s (ignored)\n", + (size_t)path->conv.u.lib_func, path->name); #endif H5E_clear_stack(NULL); /*ignore the failure*/ } /* end if */ diff --git a/src/H5Tconv.c b/src/H5Tconv.c index 937cad2..1835c11 100644 --- a/src/H5Tconv.c +++ b/src/H5Tconv.c @@ -1002,12 +1002,12 @@ done: #define CI_PRINT_STATS(STYPE, DTYPE) \ { \ if (H5DEBUG(T) && ((H5T_conv_hw_t *)cdata->priv)->s_aligned) { \ - HDfprintf(H5DEBUG(T), " %zu src elements aligned on %zu-byte boundaries\n", \ - ((H5T_conv_hw_t *)cdata->priv)->s_aligned, H5T_NATIVE_##STYPE##_ALIGN_g); \ + fprintf(H5DEBUG(T), " %zu src elements aligned on %zu-byte boundaries\n", \ + ((H5T_conv_hw_t *)cdata->priv)->s_aligned, H5T_NATIVE_##STYPE##_ALIGN_g); \ } \ if (H5DEBUG(T) && ((H5T_conv_hw_t *)cdata->priv)->d_aligned) { \ - HDfprintf(H5DEBUG(T), " %zu dst elements aligned on %zu-byte boundaries\n", \ - ((H5T_conv_hw_t *)cdata->priv)->d_aligned, H5T_NATIVE_##DTYPE##_ALIGN_g); \ + fprintf(H5DEBUG(T), " %zu dst elements aligned on %zu-byte boundaries\n", \ + ((H5T_conv_hw_t *)cdata->priv)->d_aligned, H5T_NATIVE_##DTYPE##_ALIGN_g); \ } \ } @@ -2869,9 +2869,8 @@ H5T__conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si case H5T_CONV_FREE: #ifdef H5T_DEBUG if (H5DEBUG(T)) { - HDfprintf(H5DEBUG(T), " Using %s mapping function%s\n", - priv->length ? "O(1)" : "O(log N)", - priv->length ? "" : ", where N is the number of enum members"); + fprintf(H5DEBUG(T), " Using %s mapping function%s\n", priv->length ? "O(1)" : "O(log N)", + priv->length ? "" : ", where N is the number of enum members"); } #endif if (priv) { diff --git a/src/H5Tdbg.c b/src/H5Tdbg.c index 2f14a0f..52c70b9 100644 --- a/src/H5Tdbg.c +++ b/src/H5Tdbg.c @@ -99,11 +99,11 @@ H5T__print_stats(H5T_path_t H5_ATTR_UNUSED *path, int H5_ATTR_UNUSED *nprint /*i H5_timer_get_time_string(path->stats.times.elapsed)}; if (nprint && 0 == (*nprint)++) { - HDfprintf(H5DEBUG(T), "H5T: type conversion statistics:\n"); - HDfprintf(H5DEBUG(T), " %-16s %10s %10s %8s %8s %8s %10s\n", "Conversion", "Elmts", "Calls", - "User", "System", "Elapsed", "Bandwidth"); - HDfprintf(H5DEBUG(T), " %-16s %10s %10s %8s %8s %8s %10s\n", "----------", "-----", "-----", - "----", "------", "-------", "---------"); + fprintf(H5DEBUG(T), "H5T: type conversion statistics:\n"); + fprintf(H5DEBUG(T), " %-16s %10s %10s %8s %8s %8s %10s\n", "Conversion", "Elmts", "Calls", + "User", "System", "Elapsed", "Bandwidth"); + fprintf(H5DEBUG(T), " %-16s %10s %10s %8s %8s %8s %10s\n", "----------", "-----", "-----", + "----", "------", "-------", "---------"); } /* end if */ if (path->src && path->dst) @@ -116,9 +116,9 @@ H5T__print_stats(H5T_path_t H5_ATTR_UNUSED *path, int H5_ATTR_UNUSED *nprint /*i nbytes = 0; nbytes *= path->stats.nelmts; H5_bandwidth(bandwidth, sizeof(bandwidth), (double)nbytes, path->stats.times.elapsed); - HDfprintf(H5DEBUG(T), " %-16s %10" PRIdHSIZE " %10u %8s %8s %8s %10s\n", path->name, - path->stats.nelmts, path->stats.ncalls, timestrs.user, timestrs.system, timestrs.elapsed, - bandwidth); + fprintf(H5DEBUG(T), " %-16s %10" PRIdHSIZE " %10u %8s %8s %8s %10s\n", path->name, + path->stats.nelmts, path->stats.ncalls, timestrs.user, timestrs.system, timestrs.elapsed, + bandwidth); HDfree(timestrs.user); HDfree(timestrs.system); HDfree(timestrs.elapsed); @@ -227,7 +227,7 @@ H5T_debug(const H5T_t *dt, FILE *stream) assert(0 && "This Should never be executed!"); } /* end switch */ - HDfprintf(stream, "%s%s {nbytes=%lu", s1, s2, (unsigned long)(dt->shared->size)); + fprintf(stream, "%s%s {nbytes=%lu", s1, s2, (unsigned long)(dt->shared->size)); if (H5T_IS_ATOMIC(dt->shared)) { uint64_t tmp; @@ -259,12 +259,12 @@ H5T_debug(const H5T_t *dt, FILE *stream) break; } /* end switch */ - HDfprintf(stream, ", %s", s1); + fprintf(stream, ", %s", s1); if (dt->shared->u.atomic.offset) - HDfprintf(stream, ", offset=%lu", (unsigned long)(dt->shared->u.atomic.offset)); + fprintf(stream, ", offset=%lu", (unsigned long)(dt->shared->u.atomic.offset)); if (dt->shared->u.atomic.prec != 8 * dt->shared->size) - HDfprintf(stream, ", prec=%lu", (unsigned long)(dt->shared->u.atomic.prec)); + fprintf(stream, ", prec=%lu", (unsigned long)(dt->shared->u.atomic.prec)); switch (dt->shared->type) { case H5T_NO_CLASS: @@ -292,7 +292,7 @@ H5T_debug(const H5T_t *dt, FILE *stream) } /* end switch */ if (s1) - HDfprintf(stream, ", %s", s1); + fprintf(stream, ", %s", s1); break; case H5T_FLOAT: @@ -318,20 +318,20 @@ H5T_debug(const H5T_t *dt, FILE *stream) break; } /* end switch */ - HDfprintf(stream, ", sign=%lu+1", (unsigned long)(dt->shared->u.atomic.u.f.sign)); - HDfprintf(stream, ", mant=%lu+%lu (%s)", (unsigned long)(dt->shared->u.atomic.u.f.mpos), - (unsigned long)(dt->shared->u.atomic.u.f.msize), s1); - HDfprintf(stream, ", exp=%lu+%lu", (unsigned long)(dt->shared->u.atomic.u.f.epos), - (unsigned long)(dt->shared->u.atomic.u.f.esize)); + fprintf(stream, ", sign=%lu+1", (unsigned long)(dt->shared->u.atomic.u.f.sign)); + fprintf(stream, ", mant=%lu+%lu (%s)", (unsigned long)(dt->shared->u.atomic.u.f.mpos), + (unsigned long)(dt->shared->u.atomic.u.f.msize), s1); + fprintf(stream, ", exp=%lu+%lu", (unsigned long)(dt->shared->u.atomic.u.f.epos), + (unsigned long)(dt->shared->u.atomic.u.f.esize)); tmp = dt->shared->u.atomic.u.f.ebias >> 32; if (tmp) { size_t hi = (size_t)tmp; size_t lo = (size_t)(dt->shared->u.atomic.u.f.ebias & 0xffffffff); - HDfprintf(stream, " bias=0x%08lx%08lx", (unsigned long)hi, (unsigned long)lo); + fprintf(stream, " bias=0x%08lx%08lx", (unsigned long)hi, (unsigned long)lo); } else { size_t lo = (size_t)(dt->shared->u.atomic.u.f.ebias & 0xffffffff); - HDfprintf(stream, " bias=0x%08lx", (unsigned long)lo); + fprintf(stream, " bias=0x%08lx", (unsigned long)lo); } break; @@ -353,12 +353,12 @@ H5T_debug(const H5T_t *dt, FILE *stream) else if (H5T_COMPOUND == dt->shared->type) { /* Compound data type */ for (i = 0; i < dt->shared->u.compnd.nmembs; i++) { - HDfprintf(stream, "\n\"%s\" @%lu", dt->shared->u.compnd.memb[i].name, - (unsigned long)(dt->shared->u.compnd.memb[i].offset)); - HDfprintf(stream, " "); + fprintf(stream, "\n\"%s\" @%lu", dt->shared->u.compnd.memb[i].name, + (unsigned long)(dt->shared->u.compnd.memb[i].offset)); + fprintf(stream, " "); H5T_debug(dt->shared->u.compnd.memb[i].type, stream); } /* end for */ - HDfprintf(stream, "\n"); + fprintf(stream, "\n"); } else if (H5T_VLEN == dt->shared->type) { switch (dt->shared->u.vlen.loc) { @@ -367,54 +367,53 @@ H5T_debug(const H5T_t *dt, FILE *stream) break; case H5T_LOC_MEMORY: - HDfprintf(stream, ", loc=memory"); + fprintf(stream, ", loc=memory"); break; case H5T_LOC_DISK: - HDfprintf(stream, ", loc=disk"); + fprintf(stream, ", loc=disk"); break; case H5T_LOC_MAXLOC: default: - HDfprintf(stream, ", loc=UNKNOWN"); + fprintf(stream, ", loc=UNKNOWN"); break; } /* end switch */ if (H5T_IS_VL_STRING(dt->shared)) /* Variable length string datatype */ - HDfprintf(stream, ", variable-length"); + fprintf(stream, ", variable-length"); else { /* Variable length sequence datatype */ - HDfprintf(stream, " VLEN "); + fprintf(stream, " VLEN "); H5T_debug(dt->shared->parent, stream); - HDfprintf(stream, "\n"); + fprintf(stream, "\n"); } /* end else */ } else if (H5T_ENUM == dt->shared->type) { size_t base_size; /* Enumeration data type */ - HDfprintf(stream, " "); + fprintf(stream, " "); H5T_debug(dt->shared->parent, stream); base_size = dt->shared->parent->shared->size; for (i = 0; i < dt->shared->u.enumer.nmembs; i++) { size_t k; - HDfprintf(stream, "\n\"%s\" = 0x", dt->shared->u.enumer.name[i]); + fprintf(stream, "\n\"%s\" = 0x", dt->shared->u.enumer.name[i]); for (k = 0; k < base_size; k++) - HDfprintf(stream, "%02" PRIx8, - *((uint8_t *)dt->shared->u.enumer.value + (i * base_size) + k)); + fprintf(stream, "%02" PRIx8, *((uint8_t *)dt->shared->u.enumer.value + (i * base_size) + k)); } /* end for */ - HDfprintf(stream, "\n"); + fprintf(stream, "\n"); } else if (H5T_OPAQUE == dt->shared->type) { - HDfprintf(stream, ", tag=\"%s\"", dt->shared->u.opaque.tag); + fprintf(stream, ", tag=\"%s\"", dt->shared->u.opaque.tag); } else { /* Unknown */ - HDfprintf(stream, "unknown class %d\n", (int)(dt->shared->type)); + fprintf(stream, "unknown class %d\n", (int)(dt->shared->type)); } - HDfprintf(stream, "}"); + fprintf(stream, "}"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5Tref.c b/src/H5Tref.c index 39e4774..37b3604 100644 --- a/src/H5Tref.c +++ b/src/H5Tref.c @@ -46,9 +46,9 @@ #ifdef H5T_REF_DEBUG #define H5T_REF_LOG_DEBUG(...) \ do { \ - HDfprintf(stdout, " # %s(): ", __func__); \ - HDfprintf(stdout, __VA_ARGS__); \ - HDfprintf(stdout, "\n"); \ + fprintf(stdout, " # %s(): ", __func__); \ + fprintf(stdout, __VA_ARGS__); \ + fprintf(stdout, "\n"); \ HDfflush(stdout); \ } while (0) #else @@ -154,12 +154,12 @@ H5Z_term_package(void) if (0 == nprint++) { /* Print column headers */ - HDfprintf(H5DEBUG(Z), "H5Z: filter statistics " - "accumulated over life of library:\n"); - HDfprintf(H5DEBUG(Z), " %-16s %10s %10s %8s %8s %8s %10s\n", "Filter", "Total", - "Errors", "User", "System", "Elapsed", "Bandwidth"); - HDfprintf(H5DEBUG(Z), " %-16s %10s %10s %8s %8s %8s %10s\n", "------", "-----", - "------", "----", "------", "-------", "---------"); + fprintf(H5DEBUG(Z), "H5Z: filter statistics " + "accumulated over life of library:\n"); + fprintf(H5DEBUG(Z), " %-16s %10s %10s %8s %8s %8s %10s\n", "Filter", "Total", "Errors", + "User", "System", "Elapsed", "Bandwidth"); + fprintf(H5DEBUG(Z), " %-16s %10s %10s %8s %8s %8s %10s\n", "------", "-----", "------", + "----", "------", "-------", "---------"); } /* end if */ /* Truncate the comment to fit in the field */ @@ -175,10 +175,10 @@ H5Z_term_package(void) H5Z_stat_table_g[i].stats[dir].times.elapsed); /* Print the statistics */ - HDfprintf(H5DEBUG(Z), " %s%-15s %10" PRIdHSIZE " %10" PRIdHSIZE " %8s %8s %8s %10s\n", - (dir ? "<" : ">"), comment, H5Z_stat_table_g[i].stats[dir].total, - H5Z_stat_table_g[i].stats[dir].errors, timestrs.user, timestrs.system, - timestrs.elapsed, bandwidth); + fprintf(H5DEBUG(Z), " %s%-15s %10" PRIdHSIZE " %10" PRIdHSIZE " %8s %8s %8s %10s\n", + (dir ? "<" : ">"), comment, H5Z_stat_table_g[i].stats[dir].total, + H5Z_stat_table_g[i].stats[dir].errors, timestrs.user, timestrs.system, + timestrs.elapsed, bandwidth); next: HDfree(timestrs.user); HDfree(timestrs.system); diff --git a/src/H5dbg.c b/src/H5dbg.c index ddf33ad..ed517ad 100644 --- a/src/H5dbg.c +++ b/src/H5dbg.c @@ -87,24 +87,24 @@ H5_buffer_dump(FILE *stream, int indent, const uint8_t *buf, const uint8_t *mark /* * Print the buffer in a VMS-style octal dump. */ - HDfprintf(stream, "%*sData follows (`__' indicates free region)...\n", indent, ""); + fprintf(stream, "%*sData follows (`__' indicates free region)...\n", indent, ""); for (u = 0; u < buf_size; u += 16) { uint8_t c; - HDfprintf(stream, "%*s %8zu: ", indent, "", u + buf_offset); + fprintf(stream, "%*s %8zu: ", indent, "", u + buf_offset); /* Print the hex values */ for (v = 0; v < 16; v++) { if (u + v < buf_size) { if (marker[u + v]) - HDfprintf(stream, "__ "); + fprintf(stream, "__ "); else { c = buf[buf_offset + u + v]; - HDfprintf(stream, "%02x ", c); + fprintf(stream, "%02x ", c); } /* end else */ } /* end if */ else - HDfprintf(stream, " "); + fprintf(stream, " "); if (7 == v) HDfputc(' ', stream); diff --git a/src/H5private.h b/src/H5private.h index d8c8aee..f14b54b 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -742,9 +742,6 @@ H5_DLL H5_ATTR_CONST int Nflock(int fd, int operation); #ifndef HDfopen #define HDfopen(S, M) fopen(S, M) #endif -#ifndef HDfprintf -#define HDfprintf fprintf -#endif #ifndef HDfputc #define HDfputc(C, F) fputc(C, F) #endif @@ -949,9 +946,6 @@ H5_DLL H5_ATTR_CONST int Nflock(int fd, int operation); #ifndef HDpread #define HDpread(F, B, C, O) pread(F, B, C, O) #endif -#ifndef HDprintf -#define HDprintf printf /*varargs*/ -#endif #ifndef HDputc #define HDputc(C, F) putc(C, F) #endif diff --git a/src/H5system.c b/src/H5system.c index e9cfd79..7a76723 100644 --- a/src/H5system.c +++ b/src/H5system.c @@ -1272,7 +1272,7 @@ H5_get_option(int argc, const char *const *argv, const char *opts, const struct } else if (l_opts[i].has_arg == require_arg) { if (H5_opterr) - HDfprintf(stderr, "%s: option required for \"--%s\" flag\n", argv[0], arg); + fprintf(stderr, "%s: option required for \"--%s\" flag\n", argv[0], arg); optchar = '?'; } @@ -1281,7 +1281,7 @@ H5_get_option(int argc, const char *const *argv, const char *opts, const struct else { if (H5_optarg) { if (H5_opterr) - HDfprintf(stderr, "%s: no option required for \"%s\" flag\n", argv[0], arg); + fprintf(stderr, "%s: no option required for \"%s\" flag\n", argv[0], arg); optchar = '?'; } @@ -1293,7 +1293,7 @@ H5_get_option(int argc, const char *const *argv, const char *opts, const struct if (l_opts && l_opts[i].name == NULL) { /* exhausted all of the l_opts we have and still didn't match */ if (H5_opterr) - HDfprintf(stderr, "%s: unknown option \"%s\"\n", argv[0], arg); + fprintf(stderr, "%s: unknown option \"%s\"\n", argv[0], arg); optchar = '?'; } @@ -1311,7 +1311,7 @@ H5_get_option(int argc, const char *const *argv, const char *opts, const struct if (optchar == ':' || (cp = HDstrchr(opts, optchar)) == 0) { if (H5_opterr) - HDfprintf(stderr, "%s: unknown option \"%c\"\n", argv[0], optchar); + fprintf(stderr, "%s: unknown option \"%c\"\n", argv[0], optchar); /* if no chars left in this token, move to next token */ if (argv[H5_optind][++sp] == '\0') { @@ -1329,7 +1329,7 @@ H5_get_option(int argc, const char *const *argv, const char *opts, const struct } else if (++H5_optind >= argc) { if (H5_opterr) - HDfprintf(stderr, "%s: value expected for option \"%c\"\n", argv[0], optchar); + fprintf(stderr, "%s: value expected for option \"%c\"\n", argv[0], optchar); optchar = '?'; } |