summaryrefslogtreecommitdiffstats
path: root/tools/misc/h5debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/misc/h5debug.c')
-rw-r--r--tools/misc/h5debug.c90
1 files changed, 45 insertions, 45 deletions
diff --git a/tools/misc/h5debug.c b/tools/misc/h5debug.c
index b0bcfbb..ad4188c 100644
--- a/tools/misc/h5debug.c
+++ b/tools/misc/h5debug.c
@@ -118,7 +118,7 @@ get_H5B2_class(const uint8_t *sig)
break;
default:
- fprintf(stderr, "Unknown B-tree subtype %u\n", (unsigned)(subtype));
+ HDfprintf(stderr, "Unknown B-tree subtype %u\n", (unsigned)(subtype));
HDexit(4);
} /* end switch */
@@ -152,35 +152,35 @@ main(int argc, char *argv[])
herr_t status = SUCCEED;
if(argc == 1) {
- fprintf(stderr, "Usage: %s filename [signature-addr [extra]]\n", argv[0]);
- HDexit(1);
+ HDfprintf(stderr, "Usage: %s filename [signature-addr [extra]]\n", argv[0]);
+ HDexit(1);
} /* end if */
/* Initialize the library */
if(H5open() < 0) {
- fprintf(stderr, "cannot initialize the library\n");
+ HDfprintf(stderr, "cannot initialize the library\n");
HDexit(1);
} /* end if */
/*
* Open the file and get the file descriptor.
*/
- if((dxpl = H5Pcreate (H5P_DATASET_XFER))<0) {
- fprintf(stderr, "cannot create dataset transfer property list\n");
+ if((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0) {
+ HDfprintf(stderr, "cannot create dataset transfer property list\n");
HDexit(1);
} /* end if */
- if((fapl = H5Pcreate (H5P_FILE_ACCESS))<0) {
- fprintf(stderr, "cannot create file access property list\n");
+ if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) {
+ HDfprintf(stderr, "cannot create file access property list\n");
HDexit(1);
} /* end if */
- if(strchr (argv[1], '%'))
- H5Pset_fapl_family (fapl, (hsize_t)0, H5P_DEFAULT);
+ if(HDstrchr(argv[1], '%'))
+ H5Pset_fapl_family (fapl, (hsize_t)0, H5P_DEFAULT);
if((fid = H5Fopen(argv[1], H5F_ACC_RDONLY, fapl)) < 0) {
- fprintf(stderr, "cannot open file\n");
+ HDfprintf(stderr, "cannot open file\n");
HDexit(1);
} /* end if */
- if(NULL == (f = H5I_object(fid))) {
- fprintf(stderr, "cannot obtain H5F_t pointer\n");
+ if(NULL == (f = (H5F_t *)H5I_object(fid))) {
+ HDfprintf(stderr, "cannot obtain H5F_t pointer\n");
HDexit(2);
} /* end if */
@@ -203,7 +203,7 @@ main(int argc, char *argv[])
*/
HDfprintf(stdout, "Reading signature at address %a (rel)\n", addr);
if(H5F_block_read(f, H5FD_MEM_SUPER, addr, sizeof(sig), dxpl, sig) < 0) {
- fprintf(stderr, "cannot read signature\n");
+ HDfprintf(stderr, "cannot read signature\n");
HDexit(3);
}
if(!HDmemcmp(sig, H5F_SIGNATURE, (size_t)H5F_SIGNATURE_LEN)) {
@@ -231,9 +231,9 @@ main(int argc, char *argv[])
/* Check for extra parameters */
if(extra == 0) {
- fprintf(stderr, "\nWarning: Providing the group's local heap address will give more information\n");
- fprintf(stderr, "Symbol table node usage:\n");
- fprintf(stderr, "\th5debug <filename> <Symbol table node address> <address of local heap>\n\n");
+ HDfprintf(stderr, "\nWarning: Providing the group's local heap address will give more information\n");
+ HDfprintf(stderr, "Symbol table node usage:\n");
+ HDfprintf(stderr, "\th5debug <filename> <Symbol table node address> <address of local heap>\n\n");
} /* end if */
status = H5G_node_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, extra);
@@ -251,9 +251,9 @@ main(int argc, char *argv[])
case H5B_SNODE_ID:
/* Check for extra parameters */
if(extra == 0) {
- fprintf(stderr, "\nWarning: Providing the group's local heap address will give more information\n");
- fprintf(stderr, "B-tree symbol table node usage:\n");
- fprintf(stderr, "\th5debug <filename> <B-tree node address> <address of local heap>\n\n");
+ HDfprintf(stderr, "\nWarning: Providing the group's local heap address will give more information\n");
+ HDfprintf(stderr, "B-tree symbol table node usage:\n");
+ HDfprintf(stderr, "\th5debug <filename> <B-tree node address> <address of local heap>\n\n");
} /* end if */
status = H5G_node_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, extra);
@@ -262,9 +262,9 @@ main(int argc, char *argv[])
case H5B_CHUNK_ID:
/* Check for extra parameters */
if(extra == 0) {
- fprintf(stderr, "ERROR: Need number of dimensions of chunk in order to dump chunk B-tree node\n");
- fprintf(stderr, "B-tree chunked storage node usage:\n");
- fprintf(stderr, "\th5debug <filename> <B-tree node address> <# of dimensions>\n");
+ HDfprintf(stderr, "ERROR: Need number of dimensions of chunk in order to dump chunk B-tree node\n");
+ HDfprintf(stderr, "B-tree chunked storage node usage:\n");
+ HDfprintf(stderr, "\th5debug <filename> <B-tree node address> <# of dimensions>\n");
HDexit(4);
} /* end if */
@@ -273,7 +273,7 @@ main(int argc, char *argv[])
break;
default:
- fprintf(stderr, "Unknown B-tree subtype %u\n", (unsigned)(subtype));
+ HDfprintf(stderr, "Unknown B-tree subtype %u\n", (unsigned)(subtype));
HDexit(4);
}
@@ -295,10 +295,10 @@ main(int argc, char *argv[])
/* Check for enough valid parameters */
if(extra == 0 || extra2 == 0 || extra3 == 0) {
- fprintf(stderr, "ERROR: Need v2 B-tree header address and the node's number of records and depth in order to dump internal node\n");
- fprintf(stderr, "NOTE: Leaf nodes are depth 0, the internal nodes above them are depth 1, etc.\n");
- fprintf(stderr, "v2 B-tree internal node usage:\n");
- fprintf(stderr, "\th5debug <filename> <internal node address> <v2 B-tree header address> <number of records> <depth>\n");
+ HDfprintf(stderr, "ERROR: Need v2 B-tree header address and the node's number of records and depth in order to dump internal node\n");
+ HDfprintf(stderr, "NOTE: Leaf nodes are depth 0, the internal nodes above them are depth 1, etc.\n");
+ HDfprintf(stderr, "v2 B-tree internal node usage:\n");
+ HDfprintf(stderr, "\th5debug <filename> <internal node address> <v2 B-tree header address> <number of records> <depth>\n");
HDexit(4);
} /* end if */
@@ -313,9 +313,9 @@ main(int argc, char *argv[])
/* Check for enough valid parameters */
if(extra == 0 || extra2 == 0) {
- fprintf(stderr, "ERROR: Need v2 B-tree header address and number of records in order to dump leaf node\n");
- fprintf(stderr, "v2 B-tree leaf node usage:\n");
- fprintf(stderr, "\th5debug <filename> <leaf node address> <v2 B-tree header address> <number of records>\n");
+ HDfprintf(stderr, "ERROR: Need v2 B-tree header address and number of records in order to dump leaf node\n");
+ HDfprintf(stderr, "v2 B-tree leaf node usage:\n");
+ HDfprintf(stderr, "\th5debug <filename> <leaf node address> <v2 B-tree header address> <number of records>\n");
HDexit(4);
} /* end if */
@@ -334,9 +334,9 @@ main(int argc, char *argv[])
/* Check for enough valid parameters */
if(extra == 0 || extra2 == 0) {
- fprintf(stderr, "ERROR: Need fractal heap header address and size of direct block in order to dump direct block\n");
- fprintf(stderr, "Fractal heap direct block usage:\n");
- fprintf(stderr, "\th5debug <filename> <direct block address> <heap header address> <size of direct block>\n");
+ HDfprintf(stderr, "ERROR: Need fractal heap header address and size of direct block in order to dump direct block\n");
+ HDfprintf(stderr, "Fractal heap direct block usage:\n");
+ HDfprintf(stderr, "\th5debug <filename> <direct block address> <heap header address> <size of direct block>\n");
HDexit(4);
} /* end if */
@@ -349,9 +349,9 @@ main(int argc, char *argv[])
/* Check for enough valid parameters */
if(extra == 0 || extra2 == 0) {
- fprintf(stderr, "ERROR: Need fractal heap header address and number of rows in order to dump indirect block\n");
- fprintf(stderr, "Fractal heap indirect block usage:\n");
- fprintf(stderr, "\th5debug <filename> <indirect block address> <heap header address> <number of rows>\n");
+ HDfprintf(stderr, "ERROR: Need fractal heap header address and number of rows in order to dump indirect block\n");
+ HDfprintf(stderr, "Fractal heap indirect block usage:\n");
+ HDfprintf(stderr, "\th5debug <filename> <indirect block address> <heap header address> <number of rows>\n");
HDexit(4);
} /* end if */
@@ -371,9 +371,9 @@ main(int argc, char *argv[])
/* Check for enough valid parameters */
if(extra == 0 || extra2 == 0) {
- fprintf(stderr, "ERROR: Need free space header address and client address in order to dump serialized sections\n");
- fprintf(stderr, "Free space serialized sections usage:\n");
- fprintf(stderr, "\th5debug <filename> <serialized sections address> <free space header address> <client address>\n");
+ HDfprintf(stderr, "ERROR: Need free space header address and client address in order to dump serialized sections\n");
+ HDfprintf(stderr, "Free space serialized sections usage:\n");
+ HDfprintf(stderr, "\th5debug <filename> <serialized sections address> <free space header address> <client address>\n");
HDexit(4);
} /* end if */
@@ -393,9 +393,9 @@ main(int argc, char *argv[])
/* Check for enough valid parameters */
if(extra2 == 0) {
- fprintf(stderr, "ERROR: Need list format version and number of messages in order to shared message list\n");
- fprintf(stderr, "Shared message list usage:\n");
- fprintf(stderr, "\th5debug <filename> <shared message list address> <list format version> <number of mesages in list>\n");
+ HDfprintf(stderr, "ERROR: Need list format version and number of messages in order to shared message list\n");
+ HDfprintf(stderr, "Shared message list usage:\n");
+ HDfprintf(stderr, "\th5debug <filename> <shared message list address> <list format version> <number of mesages in list>\n");
HDexit(4);
} /* end if */
@@ -431,13 +431,13 @@ main(int argc, char *argv[])
}
HDputchar('\n');
- fprintf(stderr, "unknown signature\n");
+ HDfprintf(stderr, "unknown signature\n");
HDexit(4);
} /* end else */
/* Check for an error when dumping information */
if(status < 0) {
- fprintf(stderr, "An error occurred!\n");
+ HDfprintf(stderr, "An error occurred!\n");
H5Eprint2(H5E_DEFAULT, stderr);
HDexit(5);
} /* end if */