diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-07-27 20:43:30 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-27 20:43:30 (GMT) |
commit | 1e91d96fa02466ffe451319bdac1005f84dc7993 (patch) | |
tree | 4de04ef502c313dfd766497b20235188761146c0 /test/swmr_remove_writer.c | |
parent | 95e5349089b95dfb95f0f8ce2d6db1bc04ba6c82 (diff) | |
download | hdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.zip hdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.tar.gz hdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.tar.bz2 |
Brings over most of the HD prefix removal (#3293)
Diffstat (limited to 'test/swmr_remove_writer.c')
-rw-r--r-- | test/swmr_remove_writer.c | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/test/swmr_remove_writer.c b/test/swmr_remove_writer.c index da09b2b..9e29d71 100644 --- a/test/swmr_remove_writer.c +++ b/test/swmr_remove_writer.c @@ -75,7 +75,7 @@ open_skeleton(const char *filename, unsigned verbose, unsigned old) hsize_t dim[2]; /* Dataspace dimensions */ unsigned u, v; /* Local index variable */ - HDassert(filename); + assert(filename); /* Create file access property list */ if ((fapl = h5_fileaccess()) < 0) @@ -97,7 +97,7 @@ open_skeleton(const char *filename, unsigned verbose, unsigned old) /* Emit informational message */ if (verbose) - HDfprintf(stderr, "Opening datasets\n"); + fprintf(stderr, "Opening datasets\n"); /* Open the datasets */ for (u = 0; u < NLEVELS; u++) @@ -146,7 +146,7 @@ remove_records(hid_t fid, unsigned verbose, unsigned long nshrinks, unsigned lon hsize_t dim[2] = {1, 0}; /* Dataspace dimensions */ unsigned long u, v; /* Local index variables */ - HDassert(fid >= 0); + assert(fid >= 0); /* Remove records from random datasets, according to frequency distribution */ shrink_to_flush = flush_count; @@ -186,7 +186,7 @@ remove_records(hid_t fid, unsigned verbose, unsigned long nshrinks, unsigned lon /* Emit informational message */ if (verbose) - HDfprintf(stderr, "Closing datasets\n"); + fprintf(stderr, "Closing datasets\n"); /* Close the datasets */ for (u = 0; u < NLEVELS; u++) @@ -200,19 +200,19 @@ remove_records(hid_t fid, unsigned verbose, unsigned long nshrinks, unsigned lon static void usage(void) { - HDprintf("\n"); - HDprintf("Usage error!\n"); - HDprintf("\n"); - HDprintf("Usage: swmr_remove_writer [-q] [-o] [-f <# of shrinks between flushing\n"); - HDprintf(" file contents>] [-r <random seed>] <# of shrinks>\n"); - HDprintf("\n"); - HDprintf("<# of shrinks between flushing file contents> should be 0 (for no\n"); - HDprintf("flushing) or between 1 and (<# of shrinks> - 1)\n"); - HDprintf("\n"); - HDprintf("Defaults to verbose (no '-q' given), latest format when opening file (no '-o' given),\n"); - HDprintf("flushing every 1000 shrinks ('-f 1000'), and will generate a random seed (no -r given).\n"); - HDprintf("\n"); - HDexit(EXIT_FAILURE); + printf("\n"); + printf("Usage error!\n"); + printf("\n"); + printf("Usage: swmr_remove_writer [-q] [-o] [-f <# of shrinks between flushing\n"); + printf(" file contents>] [-r <random seed>] <# of shrinks>\n"); + printf("\n"); + printf("<# of shrinks between flushing file contents> should be 0 (for no\n"); + printf("flushing) or between 1 and (<# of shrinks> - 1)\n"); + printf("\n"); + printf("Defaults to verbose (no '-q' given), latest format when opening file (no '-o' given),\n"); + printf("flushing every 1000 shrinks ('-f 1000'), and will generate a random seed (no -r given).\n"); + printf("\n"); + exit(EXIT_FAILURE); } int @@ -253,7 +253,7 @@ main(int argc, char *argv[]) /* Random # seed */ case 'r': use_seed = 1; - temp = HDatoi(argv[u + 1]); + temp = atoi(argv[u + 1]); random_seed = (unsigned)temp; u += 2; break; @@ -286,9 +286,9 @@ main(int argc, char *argv[]) /* Emit informational message */ if (verbose) { - HDfprintf(stderr, "Parameters:\n"); - HDfprintf(stderr, "\t# of shrinks between flushes = %ld\n", flush_count); - HDfprintf(stderr, "\t# of shrinks = %ld\n", nshrinks); + fprintf(stderr, "Parameters:\n"); + fprintf(stderr, "\t# of shrinks between flushes = %ld\n", flush_count); + fprintf(stderr, "\t# of shrinks = %ld\n", nshrinks); } /* end if */ /* Set the random seed */ @@ -299,11 +299,11 @@ main(int argc, char *argv[]) } /* end if */ HDsrandom(random_seed); /* ALWAYS emit the random seed for possible debugging */ - HDfprintf(stderr, "Using writer random seed: %u\n", random_seed); + fprintf(stderr, "Using writer random seed: %u\n", random_seed); /* Emit informational message */ if (verbose) - HDfprintf(stderr, "Generating symbol names\n"); + fprintf(stderr, "Generating symbol names\n"); /* Generate dataset names */ if (generate_symbols() < 0) @@ -311,12 +311,12 @@ main(int argc, char *argv[]) /* Emit informational message */ if (verbose) - HDfprintf(stderr, "Opening skeleton file: %s\n", FILENAME); + fprintf(stderr, "Opening skeleton file: %s\n", FILENAME); /* Open file skeleton */ if ((fid = open_skeleton(FILENAME, verbose, old)) < 0) { - HDfprintf(stderr, "Error opening skeleton file!\n"); - HDexit(EXIT_FAILURE); + fprintf(stderr, "Error opening skeleton file!\n"); + exit(EXIT_FAILURE); } /* end if */ /* Send a message to indicate "H5Fopen" is complete--releasing the file lock */ @@ -324,32 +324,32 @@ main(int argc, char *argv[]) /* Emit informational message */ if (verbose) - HDfprintf(stderr, "Removing records\n"); + fprintf(stderr, "Removing records\n"); /* Remove records from datasets */ if (remove_records(fid, verbose, (unsigned long)nshrinks, (unsigned long)flush_count) < 0) { - HDfprintf(stderr, "Error removing records from datasets!\n"); - HDexit(EXIT_FAILURE); + fprintf(stderr, "Error removing records from datasets!\n"); + exit(EXIT_FAILURE); } /* end if */ /* Emit informational message */ if (verbose) - HDfprintf(stderr, "Releasing symbols\n"); + fprintf(stderr, "Releasing symbols\n"); /* Clean up the symbols */ if (shutdown_symbols() < 0) { - HDfprintf(stderr, "Error releasing symbols!\n"); - HDexit(EXIT_FAILURE); + fprintf(stderr, "Error releasing symbols!\n"); + exit(EXIT_FAILURE); } /* end if */ /* Emit informational message */ if (verbose) - HDfprintf(stderr, "Closing objects\n"); + fprintf(stderr, "Closing objects\n"); /* Close objects opened */ if (H5Fclose(fid) < 0) { - HDfprintf(stderr, "Error closing file!\n"); - HDexit(EXIT_FAILURE); + fprintf(stderr, "Error closing file!\n"); + exit(EXIT_FAILURE); } /* end if */ return 0; |