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/H5Odbg.c | |
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/H5Odbg.c')
-rw-r--r-- | src/H5Odbg.c | 129 |
1 files changed, 64 insertions, 65 deletions
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 */ |