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 /tools/src/misc | |
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 'tools/src/misc')
-rw-r--r-- | tools/src/misc/h5clear.c | 65 | ||||
-rw-r--r-- | tools/src/misc/h5debug.c | 229 | ||||
-rw-r--r-- | tools/src/misc/h5delete.c | 4 | ||||
-rw-r--r-- | tools/src/misc/h5mkgrp.c | 6 | ||||
-rw-r--r-- | tools/src/misc/h5repart.c | 48 |
5 files changed, 173 insertions, 179 deletions
diff --git a/tools/src/misc/h5clear.c b/tools/src/misc/h5clear.c index faf7d94..5f26ef4 100644 --- a/tools/src/misc/h5clear.c +++ b/tools/src/misc/h5clear.c @@ -61,39 +61,36 @@ static struct h5_long_options l_opts[] = { static void usage(const char *prog) { - HDfprintf(stdout, "usage: %s [OPTIONS] file_name\n", prog); - HDfprintf(stdout, " OPTIONS\n"); - HDfprintf(stdout, " -h, --help Print a usage message and exit\n"); - HDfprintf(stdout, " -V, --version Print version number and exit\n"); - HDfprintf(stdout, " -s, --status Clear the status_flags field in the file's superblock\n"); - HDfprintf(stdout, " -m, --image Remove the metadata cache image from the file\n"); - HDfprintf(stdout, " --filesize Print the file's EOA and EOF\n"); - HDfprintf(stdout, - " --increment=C Set the file's EOA to the maximum of (EOA, EOF) + C for\n"); - HDfprintf(stdout, " the file <file_name>.\n"); - HDfprintf(stdout, - " C is >= 0; C is optional and will default to 1M when not set.\n"); - HDfprintf( - stdout, - " This option helps to repair a crashed file where the stored EOA\n"); - HDfprintf(stdout, " in the superblock is different from the actual EOF.\n"); - HDfprintf(stdout, - " The file’s EOA and EOF will be the same after applying\n"); - HDfprintf(stdout, " this option to the file.\n"); - HDfprintf(stdout, "\n"); - HDfprintf(stdout, "Examples of use:\n"); - HDfprintf(stdout, "\n"); - HDfprintf(stdout, "h5clear -s file_name\n"); - HDfprintf(stdout, " Clear the status_flags field in the superblock of the HDF5 file <file_name>.\n"); - HDfprintf(stdout, "\n"); - HDfprintf(stdout, "h5clear -m file_name\n"); - HDfprintf(stdout, " Remove the metadata cache image from the HDF5 file <file_name>.\n"); - HDfprintf(stdout, "\n"); - HDfprintf(stdout, "h5clear --increment file_name\n"); - HDfprintf(stdout, " Set the EOA to the maximum of (EOA, EOF) + 1M for the file <file_name>.\n"); - HDfprintf(stdout, "\n"); - HDfprintf(stdout, "h5clear --increment=512 file_name\n"); - HDfprintf(stdout, " Set the EOA to the maximum of (EOA, EOF) + 512 for the file <file_name>.\n"); + fprintf(stdout, "usage: %s [OPTIONS] file_name\n", prog); + fprintf(stdout, " OPTIONS\n"); + fprintf(stdout, " -h, --help Print a usage message and exit\n"); + fprintf(stdout, " -V, --version Print version number and exit\n"); + fprintf(stdout, " -s, --status Clear the status_flags field in the file's superblock\n"); + fprintf(stdout, " -m, --image Remove the metadata cache image from the file\n"); + fprintf(stdout, " --filesize Print the file's EOA and EOF\n"); + fprintf(stdout, " --increment=C Set the file's EOA to the maximum of (EOA, EOF) + C for\n"); + fprintf(stdout, " the file <file_name>.\n"); + fprintf(stdout, + " C is >= 0; C is optional and will default to 1M when not set.\n"); + fprintf(stdout, + " This option helps to repair a crashed file where the stored EOA\n"); + fprintf(stdout, " in the superblock is different from the actual EOF.\n"); + fprintf(stdout, " The file’s EOA and EOF will be the same after applying\n"); + fprintf(stdout, " this option to the file.\n"); + fprintf(stdout, "\n"); + fprintf(stdout, "Examples of use:\n"); + fprintf(stdout, "\n"); + fprintf(stdout, "h5clear -s file_name\n"); + fprintf(stdout, " Clear the status_flags field in the superblock of the HDF5 file <file_name>.\n"); + fprintf(stdout, "\n"); + fprintf(stdout, "h5clear -m file_name\n"); + fprintf(stdout, " Remove the metadata cache image from the HDF5 file <file_name>.\n"); + fprintf(stdout, "\n"); + fprintf(stdout, "h5clear --increment file_name\n"); + fprintf(stdout, " Set the EOA to the maximum of (EOA, EOF) + 1M for the file <file_name>.\n"); + fprintf(stdout, "\n"); + fprintf(stdout, "h5clear --increment=512 file_name\n"); + fprintf(stdout, " Set the EOA to the maximum of (EOA, EOF) + 512 for the file <file_name>.\n"); } /* usage() */ /*------------------------------------------------------------------------- @@ -328,7 +325,7 @@ main(int argc, char *argv[]) h5tools_setstatus(EXIT_FAILURE); goto done; } - HDfprintf(stdout, "EOA is %" PRIuHADDR "; EOF is %" PRIuHADDR " \n", eoa, (haddr_t)st.st_size); + fprintf(stdout, "EOA is %" PRIuHADDR "; EOF is %" PRIuHADDR " \n", eoa, (haddr_t)st.st_size); } /* --increment option */ diff --git a/tools/src/misc/h5debug.c b/tools/src/misc/h5debug.c index 0d268c6..0f841a9 100644 --- a/tools/src/misc/h5debug.c +++ b/tools/src/misc/h5debug.c @@ -131,7 +131,7 @@ get_H5B2_class(const uint8_t *sig) case H5B2_NUM_BTREE_ID: default: - HDfprintf(stderr, "Unknown v2 B-tree subtype %u\n", (unsigned)(subtype)); + fprintf(stderr, "Unknown v2 B-tree subtype %u\n", (unsigned)(subtype)); } /* end switch */ return (cls); @@ -172,7 +172,7 @@ get_H5EA_class(const uint8_t *sig) case H5EA_NUM_CLS_ID: default: - HDfprintf(stderr, "Unknown extensible array class %u\n", (unsigned)(clsid)); + fprintf(stderr, "Unknown extensible array class %u\n", (unsigned)(clsid)); } /* end switch */ return (cls); @@ -213,7 +213,7 @@ get_H5FA_class(const uint8_t *sig) case H5FA_NUM_CLS_ID: default: - HDfprintf(stderr, "Unknown fixed array class %u\n", (unsigned)(clsid)); + fprintf(stderr, "Unknown fixed array class %u\n", (unsigned)(clsid)); } /* end switch */ return (cls); @@ -252,14 +252,14 @@ main(int argc, char *argv[]) int exit_value = 0; if (argc == 1) { - HDfprintf(stderr, "Usage: %s filename [signature-addr [extra]*]\n", argv[0]); + fprintf(stderr, "Usage: %s filename [signature-addr [extra]*]\n", argv[0]); exit_value = 1; goto done; } /* end if */ /* Initialize the library */ if (H5open() < 0) { - HDfprintf(stderr, "cannot initialize the library\n"); + fprintf(stderr, "cannot initialize the library\n"); exit_value = 1; goto done; } /* end if */ @@ -272,45 +272,45 @@ main(int argc, char *argv[]) * Open the file and get the file descriptor. */ if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) { - HDfprintf(stderr, "cannot create file access property list\n"); + fprintf(stderr, "cannot create file access property list\n"); exit_value = 1; goto done; } /* end if */ if (HDstrchr(argv[1], '%')) if (H5Pset_fapl_family(fapl, (hsize_t)0, H5P_DEFAULT) < 0) { - HDfprintf(stderr, "cannot set file access property list\n"); + fprintf(stderr, "cannot set file access property list\n"); exit_value = 1; goto done; } if ((fid = H5Fopen(argv[1], H5F_ACC_RDONLY, fapl)) < 0) { - HDfprintf(stderr, "cannot open file\n"); + fprintf(stderr, "cannot open file\n"); exit_value = 1; goto done; } /* end if */ /* Push API context */ if (H5CX_push() < 0) { - HDfprintf(stderr, "cannot set API context\n"); + fprintf(stderr, "cannot set API context\n"); exit_value = 1; goto done; } api_ctx_pushed = TRUE; if (NULL == (vol_obj = (H5VL_object_t *)H5VL_vol_object(fid))) { - HDfprintf(stderr, "cannot obtain vol_obj pointer\n"); + fprintf(stderr, "cannot obtain vol_obj pointer\n"); exit_value = 2; goto done; } /* end if */ if (NULL == (f = (H5F_t *)H5VL_object_data(vol_obj))) { - HDfprintf(stderr, "cannot obtain H5F_t pointer\n"); + fprintf(stderr, "cannot obtain H5F_t pointer\n"); exit_value = 2; goto done; } /* end if */ /* Ignore metadata tags while using h5debug */ if (H5AC_ignore_tags(f) < 0) { - HDfprintf(stderr, "cannot ignore metadata tags\n"); + fprintf(stderr, "cannot ignore metadata tags\n"); exit_value = 1; goto done; } @@ -331,8 +331,8 @@ main(int argc, char *argv[]) /* Range check against 'extra' array size */ if (extra_count > (int)(sizeof(extra) / sizeof(haddr_t))) { - HDfprintf(stderr, "\nWARNING: Only using first %d extra parameters\n\n", - (int)(sizeof(extra) / sizeof(haddr_t))); + fprintf(stderr, "\nWARNING: Only using first %d extra parameters\n\n", + (int)(sizeof(extra) / sizeof(haddr_t))); extra_count = (int)(sizeof(extra) / sizeof(haddr_t)); } /* end if */ @@ -343,9 +343,9 @@ main(int argc, char *argv[]) /* * Read the signature at the specified file position. */ - HDfprintf(stdout, "Reading signature at address %" PRIuHADDR " (rel)\n", addr); + fprintf(stdout, "Reading signature at address %" PRIuHADDR " (rel)\n", addr); if (H5F_block_read(f, H5FD_MEM_SUPER, addr, sizeof(sig), sig) < 0) { - HDfprintf(stderr, "cannot read signature\n"); + fprintf(stderr, "cannot read signature\n"); exit_value = 3; goto done; } @@ -374,10 +374,10 @@ main(int argc, char *argv[]) /* Check for extra parameters */ if (extra_count == 0 || extra[0] == 0) { - 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"); + 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"); } /* end if */ status = H5G_node_debug(f, addr, stdout, 0, VCOL, extra[0]); @@ -396,12 +396,11 @@ main(int argc, char *argv[]) case H5B_SNODE_ID: /* Check for extra parameters */ if (extra_count == 0 || extra[0] == 0) { - HDfprintf( + fprintf( 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"); + fprintf(stderr, "B-tree symbol table node usage:\n"); + fprintf(stderr, "\th5debug <filename> <B-tree node address> <address of local heap>\n\n"); exit_value = 4; goto done; } /* end if */ @@ -412,12 +411,11 @@ main(int argc, char *argv[]) case H5B_CHUNK_ID: /* Check for extra parameters */ if (extra_count == 0 || extra[0] == 0) { - 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> <slowest " - "chunk dim>...<fastest chunk dim>\n"); + 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> <slowest " + "chunk dim>...<fastest chunk dim>\n"); exit_value = 4; goto done; } /* end if */ @@ -427,10 +425,10 @@ main(int argc, char *argv[]) /* Check for dimension error */ if (ndims > 9) { - HDfprintf(stderr, "ERROR: Only 9 dimensions support currently (fix h5debug)\n"); - HDfprintf(stderr, "B-tree chunked storage node usage:\n"); - HDfprintf(stderr, "\th5debug <filename> <B-tree node address> <# of dimensions> <slowest " - "chunk dim>...<fastest chunk dim>\n"); + fprintf(stderr, "ERROR: Only 9 dimensions support currently (fix h5debug)\n"); + fprintf(stderr, "B-tree chunked storage node usage:\n"); + fprintf(stderr, "\th5debug <filename> <B-tree node address> <# of dimensions> <slowest " + "chunk dim>...<fastest chunk dim>\n"); exit_value = 4; goto done; } /* end for */ @@ -442,10 +440,10 @@ main(int argc, char *argv[]) /* Check for dimension error */ for (u = 0; u < ndims; u++) if (0 == dim[u]) { - HDfprintf(stderr, "ERROR: Chunk dimensions should be >0\n"); - HDfprintf(stderr, "B-tree chunked storage node usage:\n"); - HDfprintf(stderr, "\th5debug <filename> <B-tree node address> <# of dimensions> " - "<slowest chunk dim>...<fastest chunk dim>\n"); + fprintf(stderr, "ERROR: Chunk dimensions should be >0\n"); + fprintf(stderr, "B-tree chunked storage node usage:\n"); + fprintf(stderr, "\th5debug <filename> <B-tree node address> <# of dimensions> " + "<slowest chunk dim>...<fastest chunk dim>\n"); exit_value = 4; goto done; } /* end if */ @@ -458,7 +456,7 @@ main(int argc, char *argv[]) case H5B_NUM_BTREE_ID: default: - HDfprintf(stderr, "Unknown v1 B-tree subtype %u\n", (unsigned)(subtype)); + fprintf(stderr, "Unknown v1 B-tree subtype %u\n", (unsigned)(subtype)); exit_value = 4; goto done; } @@ -471,10 +469,10 @@ main(int argc, char *argv[]) assert(cls); if ((cls == H5D_BT2 || cls == H5D_BT2_FILT) && (extra_count == 0 || extra[0] == 0)) { - HDfprintf(stderr, "ERROR: Need v2 B-tree header address and object header address containing the " - "layout message in order to dump header\n"); - HDfprintf(stderr, "v2 B-tree hdr usage:\n"); - HDfprintf(stderr, "\th5debug <filename> <v2 B-tree header address> <object header address>\n"); + fprintf(stderr, "ERROR: Need v2 B-tree header address and object header address containing the " + "layout message in order to dump header\n"); + fprintf(stderr, "v2 B-tree hdr usage:\n"); + fprintf(stderr, "\th5debug <filename> <v2 B-tree header address> <object header address>\n"); exit_value = 4; goto done; } /* end if */ @@ -491,25 +489,25 @@ main(int argc, char *argv[]) /* Check for enough valid parameters */ if ((cls == H5D_BT2 || cls == H5D_BT2_FILT) && (extra_count == 0 || extra[0] == 0 || extra[1] == 0 || extra[2] == 0 || extra[3] == 0)) { - HDfprintf(stderr, - "ERROR: Need v2 B-tree header address, the node's number of records, depth, and object " - "header address containing the layout message 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> <object header address>\n"); + fprintf(stderr, + "ERROR: Need v2 B-tree header address, the node's number of records, depth, and object " + "header address containing the layout message 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> <object header address>\n"); exit_value = 4; goto done; } else if (extra_count == 0 || extra[0] == 0 || extra[1] == 0 || extra[2] == 0) { - 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"); + 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"); exit_value = 4; goto done; } /* end if */ @@ -528,20 +526,20 @@ main(int argc, char *argv[]) if ((cls == H5D_BT2 || cls == H5D_BT2_FILT) && (extra_count == 0 || extra[0] == 0 || extra[1] == 0 || extra[2] == 0)) { - HDfprintf(stderr, "ERROR: Need v2 B-tree header address, number of records, and object header " - "address containing the layout message 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> <object header address>\n"); + fprintf(stderr, "ERROR: Need v2 B-tree header address, number of records, and object header " + "address containing the layout message 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> <object header address>\n"); exit_value = 4; goto done; } else if (extra_count == 0 || extra[0] == 0 || extra[1] == 0) { - HDfprintf( + fprintf( 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( + 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"); exit_value = 4; @@ -564,10 +562,10 @@ main(int argc, char *argv[]) /* Check for enough valid parameters */ if (extra_count == 0 || extra[0] == 0 || extra[1] == 0) { - 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( + 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"); exit_value = 4; @@ -583,12 +581,11 @@ main(int argc, char *argv[]) /* Check for enough valid parameters */ if (extra_count == 0 || extra[0] == 0 || extra[1] == 0) { - 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"); + 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"); exit_value = 4; goto done; } /* end if */ @@ -609,11 +606,11 @@ main(int argc, char *argv[]) /* Check for enough valid parameters */ if (extra_count == 0 || extra[0] == 0 || extra[1] == 0) { - 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"); + 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"); exit_value = 4; goto done; } /* end if */ @@ -634,10 +631,10 @@ main(int argc, char *argv[]) /* Check for enough valid parameters */ if (extra_count == 0 || extra[0] == 0) { - HDfprintf(stderr, "ERROR: Need shared message header address in order to shared message list\n"); - HDfprintf(stderr, "Shared message list usage:\n"); - HDfprintf(stderr, - "\th5debug <filename> <shared message list address> <shared message header address>\n"); + fprintf(stderr, "ERROR: Need shared message header address in order to shared message list\n"); + fprintf(stderr, "Shared message list usage:\n"); + fprintf(stderr, + "\th5debug <filename> <shared message list address> <shared message header address>\n"); exit_value = 4; goto done; } /* end if */ @@ -653,12 +650,12 @@ main(int argc, char *argv[]) /* Check for enough valid parameters */ if (extra_count == 0 || extra[0] == 0) { - HDfprintf( + fprintf( stderr, "ERROR: Need object header address containing the layout message in order to dump header\n"); - HDfprintf(stderr, "Extensible array header block usage:\n"); - HDfprintf(stderr, - "\th5debug <filename> <Extensible Array header address> <object header address>\n"); + fprintf(stderr, "Extensible array header block usage:\n"); + fprintf(stderr, + "\th5debug <filename> <Extensible Array header address> <object header address>\n"); exit_value = 4; goto done; } /* end if */ @@ -674,10 +671,10 @@ main(int argc, char *argv[]) /* Check for enough valid parameters */ if (extra_count == 0 || extra[0] == 0 || extra[1] == 0) { - HDfprintf(stderr, "ERROR: Need extensible array header address and object header address " - "containing the layout message in order to dump index block\n"); - HDfprintf(stderr, "Extensible array index block usage:\n"); - HDfprintf( + fprintf(stderr, "ERROR: Need extensible array header address and object header address " + "containing the layout message in order to dump index block\n"); + fprintf(stderr, "Extensible array index block usage:\n"); + fprintf( stderr, "\th5debug <filename> <index block address> <array header address> <object header address\n"); exit_value = 4; @@ -695,11 +692,11 @@ main(int argc, char *argv[]) /* Check for enough valid parameters */ if (extra_count == 0 || extra[0] == 0 || extra[1] == 0 || extra[2] == 0) { - HDfprintf(stderr, "ERROR: Need extensible array header address, super block index and object " - "header address containing the layout message in order to dump super block\n"); - HDfprintf(stderr, "Extensible array super block usage:\n"); - HDfprintf(stderr, "\th5debug <filename> <super block address> <array header address> <super " - "block index> <object header address>\n"); + fprintf(stderr, "ERROR: Need extensible array header address, super block index and object " + "header address containing the layout message in order to dump super block\n"); + fprintf(stderr, "Extensible array super block usage:\n"); + fprintf(stderr, "\th5debug <filename> <super block address> <array header address> <super " + "block index> <object header address>\n"); exit_value = 4; goto done; } /* end if */ @@ -715,12 +712,12 @@ main(int argc, char *argv[]) /* Check for enough valid parameters */ if (extra_count == 0 || extra[0] == 0 || extra[1] == 0 || extra[2] == 0) { - HDfprintf(stderr, - "ERROR: Need extensible array header address, # of elements in data block and object " - "header address containing the layout message in order to dump data block\n"); - HDfprintf(stderr, "Extensible array data block usage:\n"); - HDfprintf(stderr, "\th5debug <filename> <data block address> <array header address> <# of " - "elements in data block> <object header address\n"); + fprintf(stderr, + "ERROR: Need extensible array header address, # of elements in data block and object " + "header address containing the layout message in order to dump data block\n"); + fprintf(stderr, "Extensible array data block usage:\n"); + fprintf(stderr, "\th5debug <filename> <data block address> <array header address> <# of " + "elements in data block> <object header address\n"); exit_value = 4; goto done; } /* end if */ @@ -736,11 +733,11 @@ main(int argc, char *argv[]) /* Check for enough valid parameters */ if (extra_count == 0 || extra[0] == 0) { - HDfprintf( + fprintf( stderr, "ERROR: Need object header address containing the layout message in order to dump header\n"); - HDfprintf(stderr, "Fixed array header block usage:\n"); - HDfprintf(stderr, "\th5debug <filename> <Fixed Array header address> <object header address>\n"); + fprintf(stderr, "Fixed array header block usage:\n"); + fprintf(stderr, "\th5debug <filename> <Fixed Array header address> <object header address>\n"); exit_value = 4; goto done; } /* end if */ @@ -756,10 +753,10 @@ main(int argc, char *argv[]) /* Check for enough valid parameters */ if (extra_count == 0 || extra[0] == 0 || extra[1] == 0) { - HDfprintf(stderr, "ERROR: Need fixed array header address and object header address containing " - "the layout message in order to dump data block\n"); - HDfprintf(stderr, "fixed array data block usage:\n"); - HDfprintf( + fprintf(stderr, "ERROR: Need fixed array header address and object header address containing " + "the layout message in order to dump data block\n"); + fprintf(stderr, "fixed array data block usage:\n"); + fprintf( stderr, "\th5debug <filename> <data block address> <array header address> <object header address>\n"); exit_value = 4; @@ -786,7 +783,7 @@ main(int argc, char *argv[]) /* * Got some other unrecognized signature. */ - HDprintf("%-*s ", VCOL, "Signature:"); + printf("%-*s ", VCOL, "Signature:"); for (u = 0; u < sizeof(sig); u++) { if (sig[u] > ' ' && sig[u] <= '~' && '\\' != sig[u]) HDputchar(sig[u]); @@ -795,18 +792,18 @@ main(int argc, char *argv[]) HDputchar('\\'); } else - HDprintf("\\%03o", sig[u]); + printf("\\%03o", sig[u]); } HDputchar('\n'); - HDfprintf(stderr, "unknown signature\n"); + fprintf(stderr, "unknown signature\n"); exit_value = 4; goto done; } /* end else */ /* Check for an error when dumping information */ if (status < 0) { - HDfprintf(stderr, "An error occurred!\n"); + fprintf(stderr, "An error occurred!\n"); H5Eprint2(H5E_DEFAULT, stderr); exit_value = 5; goto done; @@ -817,7 +814,7 @@ done: H5Pclose(fapl); if (fid > 0) { if (H5Fclose(fid) < 0) { - HDfprintf(stderr, "Error in closing file!\n"); + fprintf(stderr, "Error in closing file!\n"); exit_value = 1; } } diff --git a/tools/src/misc/h5delete.c b/tools/src/misc/h5delete.c index f83b379..f996d8d 100644 --- a/tools/src/misc/h5delete.c +++ b/tools/src/misc/h5delete.c @@ -25,7 +25,7 @@ static void usage(void); static void usage(void) { - HDfprintf(stderr, "usage: h5delete [-f] <filename>\n"); + fprintf(stderr, "usage: h5delete [-f] <filename>\n"); } int @@ -60,7 +60,7 @@ main(int argc, char *argv[]) H5E_END_TRY if (ret < 0 && !quiet) - HDfprintf(stderr, "Unable to delete storage at: %s\n", name); + fprintf(stderr, "Unable to delete storage at: %s\n", name); return ret < 0 ? EXIT_FAILURE : EXIT_SUCCESS; } diff --git a/tools/src/misc/h5mkgrp.c b/tools/src/misc/h5mkgrp.c index c183a41..2e146c0 100644 --- a/tools/src/misc/h5mkgrp.c +++ b/tools/src/misc/h5mkgrp.c @@ -320,7 +320,7 @@ main(int argc, char *argv[]) /* Display some output if requested */ if (params_g.verbose) - HDprintf("%s: Creating groups with latest version of the format\n", h5tools_getprogname()); + printf("%s: Creating groups with latest version of the format\n", h5tools_getprogname()); } /* Attempt to open an existing HDF5 file first */ @@ -354,7 +354,7 @@ main(int argc, char *argv[]) /* Display some output if requested */ if (params_g.verbose) - HDprintf("%s: Creating parent groups\n", h5tools_getprogname()); + printf("%s: Creating parent groups\n", h5tools_getprogname()); } /* Loop over creating requested groups */ @@ -375,7 +375,7 @@ main(int argc, char *argv[]) /* Display some output if requested */ if (params_g.verbose) - HDprintf("%s: created group '%s'\n", h5tools_getprogname(), params_g.groups[curr_group]); + printf("%s: created group '%s'\n", h5tools_getprogname(), params_g.groups[curr_group]); } /* end for */ /* Close link creation property list */ diff --git a/tools/src/misc/h5repart.c b/tools/src/misc/h5repart.c index e0201f9..c4ea0a6 100644 --- a/tools/src/misc/h5repart.c +++ b/tools/src/misc/h5repart.c @@ -50,21 +50,21 @@ static void usage(const char *progname) { - HDfprintf(stderr, "usage: %s [-v] [-V] [-[b|m] N[g|m|k]] [-family_to_sec2|-family_to_single] SRC DST\n", - progname); - HDfprintf(stderr, " -v Produce verbose output\n"); - HDfprintf(stderr, " -V Print a version number and exit\n"); - HDfprintf(stderr, " -b N The I/O block size, defaults to 1kB\n"); - HDfprintf(stderr, " -m N The destination member size or 1GB\n"); - HDfprintf(stderr, " -family_to_sec2 Deprecated version of -family_to_single (below)\n"); - HDfprintf(stderr, " -family_to_single Change file driver from family to the default single-file VFD " - "(windows or sec2)\n"); - HDfprintf(stderr, " SRC The name of the source file\n"); - HDfprintf(stderr, " DST The name of the destination files\n"); - HDfprintf(stderr, "Sizes may be suffixed with 'g' for GB, 'm' for MB or " - "'k' for kB.\n"); - HDfprintf(stderr, "File family names include an integer printf " - "format such as '%%d'\n"); + fprintf(stderr, "usage: %s [-v] [-V] [-[b|m] N[g|m|k]] [-family_to_sec2|-family_to_single] SRC DST\n", + progname); + fprintf(stderr, " -v Produce verbose output\n"); + fprintf(stderr, " -V Print a version number and exit\n"); + fprintf(stderr, " -b N The I/O block size, defaults to 1kB\n"); + fprintf(stderr, " -m N The destination member size or 1GB\n"); + fprintf(stderr, " -family_to_sec2 Deprecated version of -family_to_single (below)\n"); + fprintf(stderr, " -family_to_single Change file driver from family to the default single-file VFD " + "(windows or sec2)\n"); + fprintf(stderr, " SRC The name of the source file\n"); + fprintf(stderr, " DST The name of the destination files\n"); + fprintf(stderr, "Sizes may be suffixed with 'g' for GB, 'm' for MB or " + "'k' for kB.\n"); + fprintf(stderr, "File family names include an integer printf " + "format such as '%%d'\n"); HDexit(EXIT_FAILURE); } @@ -202,8 +202,8 @@ main(int argc, char *argv[]) argno++; } else if (!HDstrcmp(argv[argno], "-V")) { - HDprintf("This is %s version %u.%u release %u\n", prog_name, H5_VERS_MAJOR, H5_VERS_MINOR, - H5_VERS_RELEASE); + printf("This is %s version %u.%u release %u\n", prog_name, H5_VERS_MAJOR, H5_VERS_MINOR, + H5_VERS_RELEASE); HDexit(EXIT_SUCCESS); } else if (!HDstrcmp(argv[argno], "-family_to_sec2")) { @@ -252,7 +252,7 @@ main(int argc, char *argv[]) } src_size = src_act_size = sb.st_size; if (verbose) - HDfprintf(stderr, "< %s\n", src_name); + fprintf(stderr, "< %s\n", src_name); /* * Get the name for the destination file and open the first member. @@ -268,7 +268,7 @@ main(int argc, char *argv[]) HDexit(EXIT_FAILURE); } if (verbose) - HDfprintf(stderr, "> %s\n", dst_name); + fprintf(stderr, "> %s\n", dst_name); /* No more arguments */ if (argno < argc) @@ -298,7 +298,7 @@ main(int argc, char *argv[]) HDexit(EXIT_FAILURE); } else if ((size_t)nio != n) { - HDfprintf(stderr, "%s: short read\n", src_name); + fprintf(stderr, "%s: short read\n", src_name); HDexit(EXIT_FAILURE); } for (i = 0; i < n; i++) { @@ -328,7 +328,7 @@ main(int argc, char *argv[]) HDexit(EXIT_FAILURE); } else if ((size_t)nio != n) { - HDfprintf(stderr, "%s: short write\n", dst_name); + fprintf(stderr, "%s: short write\n", dst_name); HDexit(EXIT_FAILURE); } need_seek = FALSE; @@ -367,11 +367,11 @@ main(int argc, char *argv[]) } src_act_size = sb.st_size; if (src_act_size > src_size) { - HDfprintf(stderr, "%s: member truncated to %lu bytes\n", src_name, (unsigned long)src_size); + fprintf(stderr, "%s: member truncated to %lu bytes\n", src_name, (unsigned long)src_size); } src_offset = 0; if (verbose) - HDfprintf(stderr, "< %s\n", src_name); + fprintf(stderr, "< %s\n", src_name); } /* @@ -408,7 +408,7 @@ main(int argc, char *argv[]) dst_offset = 0; need_seek = FALSE; if (verbose) - HDfprintf(stderr, "> %s\n", dst_name); + fprintf(stderr, "> %s\n", dst_name); } } |