Skip to content

Commit

Permalink
Rename HD(f)printf() to (f)printf() (#3194)
Browse files Browse the repository at this point in the history
  • Loading branch information
derobins authored Jun 28, 2023
1 parent 7a44581 commit 187ea8a
Show file tree
Hide file tree
Showing 349 changed files with 18,690 additions and 19,025 deletions.
2 changes: 1 addition & 1 deletion c++/test/titerate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ test_iter_group(FileAccPropList &fapl)
check_values(lnames[NDATASETS], "HDstrdup returns NULL", __LINE__, __FILE__);

/* Sort the dataset names */
HDqsort(lnames, NDATASETS + 2, sizeof(char *), iter_strcmp);
qsort(lnames, NDATASETS + 2, sizeof(char *), iter_strcmp);

/* Iterate through the datasets in the root group in various ways */

Expand Down
75 changes: 36 additions & 39 deletions src/H5.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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)) {
Expand Down Expand Up @@ -896,32 +896,32 @@ 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);
HDabort();
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 */
Expand All @@ -938,31 +938,28 @@ 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);
HDabort();
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 */
Expand Down Expand Up @@ -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 */
}

Expand Down
10 changes: 5 additions & 5 deletions src/H5ACmpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions src/H5Abtree2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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() */
Expand Down Expand Up @@ -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() */
6 changes: 3 additions & 3 deletions src/H5B.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

/*
Expand Down
Loading

0 comments on commit 187ea8a

Please sign in to comment.