summaryrefslogtreecommitdiffstats
path: root/src/H5Odbg.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2023-07-27 20:43:30 (GMT)
committerGitHub <noreply@github.com>2023-07-27 20:43:30 (GMT)
commit1e91d96fa02466ffe451319bdac1005f84dc7993 (patch)
tree4de04ef502c313dfd766497b20235188761146c0 /src/H5Odbg.c
parent95e5349089b95dfb95f0f8ce2d6db1bc04ba6c82 (diff)
downloadhdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.zip
hdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.tar.gz
hdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.tar.bz2
Brings over most of the HD prefix removal (#3293)
Diffstat (limited to 'src/H5Odbg.c')
-rw-r--r--src/H5Odbg.c230
1 files changed, 114 insertions, 116 deletions
diff --git a/src/H5Odbg.c b/src/H5Odbg.c
index 203d411..594bcf8 100644
--- a/src/H5Odbg.c
+++ b/src/H5Odbg.c
@@ -108,24 +108,23 @@ H5O__assert(const H5O_t *oh)
free_space += oh->chunk[u].gap;
/* Check for valid raw data image */
- HDassert(oh->chunk[u].image);
- HDassert(oh->chunk[u].size > (size_t)H5O_SIZEOF_CHKHDR_OH(oh));
+ assert(oh->chunk[u].image);
+ assert(oh->chunk[u].size > (size_t)H5O_SIZEOF_CHKHDR_OH(oh));
/* All chunks must be allocated on disk */
- HDassert(H5F_addr_defined(oh->chunk[u].addr));
+ assert(H5F_addr_defined(oh->chunk[u].addr));
/* Version specific checks */
if (oh->version > H5O_VERSION_1) {
/* Make certain that the magic number is correct for each chunk */
- HDassert(
- !HDmemcmp(oh->chunk[u].image, (u == 0 ? H5O_HDR_MAGIC : H5O_CHK_MAGIC), H5_SIZEOF_MAGIC));
+ assert(!memcmp(oh->chunk[u].image, (u == 0 ? H5O_HDR_MAGIC : H5O_CHK_MAGIC), H5_SIZEOF_MAGIC));
/* Check for valid gap size */
- HDassert(oh->chunk[u].gap < (size_t)H5O_SIZEOF_MSGHDR_OH(oh));
+ assert(oh->chunk[u].gap < (size_t)H5O_SIZEOF_MSGHDR_OH(oh));
} /* end if */
else
/* Gaps should never occur in version 1 of the format */
- HDassert(oh->chunk[u].gap == 0);
+ assert(oh->chunk[u].gap == 0);
} /* end for */
/* Check for correct chunk #0 size flags */
@@ -133,13 +132,13 @@ H5O__assert(const H5O_t *oh)
uint64_t chunk0_size = oh->chunk[0].size - (size_t)H5O_SIZEOF_HDR(oh);
if (chunk0_size <= 255)
- HDassert((oh->flags & H5O_HDR_CHUNK0_SIZE) == H5O_HDR_CHUNK0_1);
+ assert((oh->flags & H5O_HDR_CHUNK0_SIZE) == H5O_HDR_CHUNK0_1);
else if (chunk0_size <= 65535)
- HDassert((oh->flags & H5O_HDR_CHUNK0_SIZE) == H5O_HDR_CHUNK0_2);
+ assert((oh->flags & H5O_HDR_CHUNK0_SIZE) == H5O_HDR_CHUNK0_2);
else if (chunk0_size <= 4294967295)
- HDassert((oh->flags & H5O_HDR_CHUNK0_SIZE) == H5O_HDR_CHUNK0_4);
+ assert((oh->flags & H5O_HDR_CHUNK0_SIZE) == H5O_HDR_CHUNK0_4);
else
- HDassert((oh->flags & H5O_HDR_CHUNK0_SIZE) == H5O_HDR_CHUNK0_8);
+ assert((oh->flags & H5O_HDR_CHUNK0_SIZE) == H5O_HDR_CHUNK0_8);
} /* end if */
/* Loop over all messages in object header */
@@ -157,7 +156,7 @@ H5O__assert(const H5O_t *oh)
H5O_cont_t *cont = (H5O_cont_t *)curr_msg->native;
hbool_t H5_ATTR_NDEBUG_UNUSED found_chunk = FALSE; /* Found a chunk that matches */
- HDassert(cont);
+ assert(cont);
/* Increment # of continuation messages found */
cont_msgs_found++;
@@ -166,12 +165,12 @@ H5O__assert(const H5O_t *oh)
/* (and only one) */
for (v = 0; v < oh->nchunks; v++) {
if (H5F_addr_eq(cont->addr, oh->chunk[v].addr) && cont->size == oh->chunk[v].size) {
- HDassert(cont->chunkno == v);
- HDassert(!found_chunk);
+ assert(cont->chunkno == v);
+ assert(!found_chunk);
found_chunk = TRUE;
} /* end if */
} /* end for */
- HDassert(found_chunk);
+ assert(found_chunk);
meta_space += curr_tot_size;
} /* end if */
@@ -180,42 +179,42 @@ H5O__assert(const H5O_t *oh)
mesg_space += curr_msg->raw_size;
/* Make sure the message has a native form if it is marked dirty */
- HDassert(curr_msg->native || !curr_msg->dirty);
+ assert(curr_msg->native || !curr_msg->dirty);
} /* end else */
/* Make certain that the message is in a valid chunk */
- HDassert(curr_msg->chunkno < oh->nchunks);
+ assert(curr_msg->chunkno < oh->nchunks);
/* Make certain null messages aren't in chunks with gaps */
if (H5O_NULL_ID == curr_msg->type->id)
- HDassert(oh->chunk[curr_msg->chunkno].gap == 0);
+ assert(oh->chunk[curr_msg->chunkno].gap == 0);
/* Make certain that the message is completely in a chunk message area */
- HDassert(curr_tot_size <= (oh->chunk[curr_msg->chunkno].size) -
- (H5O_SIZEOF_CHKSUM_OH(oh) + oh->chunk[curr_msg->chunkno].gap));
+ assert(curr_tot_size <= (oh->chunk[curr_msg->chunkno].size) -
+ (H5O_SIZEOF_CHKSUM_OH(oh) + oh->chunk[curr_msg->chunkno].gap));
if (curr_msg->chunkno == 0)
- HDassert(curr_hdr >=
- oh->chunk[curr_msg->chunkno].image + (H5O_SIZEOF_HDR(oh) - H5O_SIZEOF_CHKSUM_OH(oh)));
+ assert(curr_hdr >=
+ oh->chunk[curr_msg->chunkno].image + (H5O_SIZEOF_HDR(oh) - H5O_SIZEOF_CHKSUM_OH(oh)));
else
- HDassert(curr_hdr >= oh->chunk[curr_msg->chunkno].image +
- (H5O_SIZEOF_CHKHDR_OH(oh) - H5O_SIZEOF_CHKSUM_OH(oh)));
- HDassert(curr_msg->raw + curr_msg->raw_size <=
- (oh->chunk[curr_msg->chunkno].image + oh->chunk[curr_msg->chunkno].size) -
- (H5O_SIZEOF_CHKSUM_OH(oh) + oh->chunk[curr_msg->chunkno].gap));
+ assert(curr_hdr >= oh->chunk[curr_msg->chunkno].image +
+ (H5O_SIZEOF_CHKHDR_OH(oh) - H5O_SIZEOF_CHKSUM_OH(oh)));
+ assert(curr_msg->raw + curr_msg->raw_size <=
+ (oh->chunk[curr_msg->chunkno].image + oh->chunk[curr_msg->chunkno].size) -
+ (H5O_SIZEOF_CHKSUM_OH(oh) + oh->chunk[curr_msg->chunkno].gap));
/* Make certain that no other messages overlap this message */
for (v = 0, tmp_msg = &oh->mesg[0]; v < oh->nmesgs; v++, tmp_msg++) {
if (u != v)
- HDassert(!((tmp_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh)) >= curr_hdr &&
- (tmp_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh)) < (curr_hdr + curr_tot_size)));
+ assert(!((tmp_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh)) >= curr_hdr &&
+ (tmp_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh)) < (curr_hdr + curr_tot_size)));
} /* end for */
} /* end for */
/* Sanity check that the # of cont. messages is correct for the # of chunks */
- HDassert(oh->nchunks == (cont_msgs_found + 1));
+ assert(oh->nchunks == (cont_msgs_found + 1));
/* Sanity check that all the bytes are accounted for */
- HDassert(hdr_size == (free_space + meta_space + mesg_space));
+ assert(hdr_size == (free_space + meta_space + mesg_space));
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__assert() */
@@ -243,15 +242,15 @@ H5O_debug_id(unsigned type_id, H5F_t *f, const void *mesg, FILE *stream, int ind
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
- HDassert(type->debug);
- HDassert(f);
- HDassert(mesg);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(type);
+ assert(type->debug);
+ assert(f);
+ assert(mesg);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
/* Call the debug method in the class */
if ((ret_value = (type->debug)(f, mesg, stream, indent, fwidth)) < 0)
@@ -284,36 +283,35 @@ H5O__debug_real(H5F_t *f, H5O_t *oh, haddr_t addr, FILE *stream, int indent, int
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(oh);
- HDassert(H5F_addr_defined(addr));
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(f);
+ assert(oh);
+ assert(H5F_addr_defined(addr));
+ assert(stream);
+ assert(indent >= 0);
+ 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) {
@@ -323,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 (H5F_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
@@ -371,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 */
@@ -390,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;
@@ -416,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) {
- HDassert(oh->mesg[i].flags & H5O_MSG_FLAG_MARK_IF_UNKNOWN);
- HDfprintf(stream, "%sWU", (flag_printed ? ", " : "<"));
+ assert(oh->mesg[i].flags & H5O_MSG_FLAG_MARK_IF_UNKNOWN);
+ 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;
@@ -478,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 */
@@ -518,11 +516,11 @@ H5O_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth)
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
/* Set up the object location */
loc.file = f;