summaryrefslogtreecommitdiffstats
path: root/test/swmr_sparse_writer.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 /test/swmr_sparse_writer.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 'test/swmr_sparse_writer.c')
-rw-r--r--test/swmr_sparse_writer.c68
1 files changed, 34 insertions, 34 deletions
diff --git a/test/swmr_sparse_writer.c b/test/swmr_sparse_writer.c
index 3644d89..79889b1 100644
--- a/test/swmr_sparse_writer.c
+++ b/test/swmr_sparse_writer.c
@@ -73,7 +73,7 @@ open_skeleton(const char *filename, unsigned verbose)
unsigned seed; /* Seed for random number generator */
unsigned u, v; /* Local index variable */
- HDassert(filename);
+ assert(filename);
/* Create file access property list */
if ((fapl = h5_fileaccess()) < 0)
@@ -93,7 +93,7 @@ open_skeleton(const char *filename, unsigned verbose)
/* Emit informational message */
if (verbose)
- HDfprintf(stderr, "Opening datasets\n");
+ fprintf(stderr, "Opening datasets\n");
/* Seed the random number generator with the attribute in the file */
if ((aid = H5Aopen(fid, "seed", H5P_DEFAULT)) < 0)
@@ -153,11 +153,11 @@ add_records(hid_t fid, unsigned verbose, unsigned long nrecords, unsigned long f
hsize_t dim[2] = {1, 0}; /* Dataspace dimensions */
unsigned long u, v; /* Local index variables */
- HDassert(fid >= 0);
+ assert(fid >= 0);
/* Reset the record */
/* (record's 'info' field might need to change for each record written, also) */
- HDmemset(&record, 0, sizeof(record));
+ memset(&record, 0, sizeof(record));
/* Create a dataspace for the record to add */
if ((mem_sid = H5Screate(H5S_SCALAR)) < 0)
@@ -287,7 +287,7 @@ add_records(hid_t fid, unsigned verbose, unsigned long nrecords, unsigned long f
/* Emit informational message */
if (verbose)
- HDfprintf(stderr, "Closing datasets\n");
+ fprintf(stderr, "Closing datasets\n");
/* Close the datasets */
for (u = 0; u < NLEVELS; u++)
@@ -301,19 +301,19 @@ add_records(hid_t fid, unsigned verbose, unsigned long nrecords, unsigned long f
static void
usage(void)
{
- HDprintf("\n");
- HDprintf("Usage error!\n");
- HDprintf("\n");
- HDprintf("Usage: swmr_sparse_writer [-q] [-f <# of records to write between\n");
- HDprintf(" flushing file contents>] <# of records>\n");
- HDprintf("\n");
- HDprintf("<# of records to write between flushing file contents> should be 0\n");
- HDprintf("(for no flushing) or between 1 and (<# of records> - 1)\n");
- HDprintf("\n");
- HDprintf("Defaults to verbose (no '-q' given) and flushing every 1000 records\n");
- HDprintf("('-f 1000')\n");
- HDprintf("\n");
- HDexit(EXIT_FAILURE);
+ printf("\n");
+ printf("Usage error!\n");
+ printf("\n");
+ printf("Usage: swmr_sparse_writer [-q] [-f <# of records to write between\n");
+ printf(" flushing file contents>] <# of records>\n");
+ printf("\n");
+ printf("<# of records to write between flushing file contents> should be 0\n");
+ printf("(for no flushing) or between 1 and (<# of records> - 1)\n");
+ printf("\n");
+ printf("Defaults to verbose (no '-q' given) and flushing every 1000 records\n");
+ printf("('-f 1000')\n");
+ printf("\n");
+ exit(EXIT_FAILURE);
}
int
@@ -369,14 +369,14 @@ main(int argc, char *argv[])
/* Emit informational message */
if (verbose) {
- HDfprintf(stderr, "Parameters:\n");
- HDfprintf(stderr, "\t# of records between flushes = %ld\n", flush_count);
- HDfprintf(stderr, "\t# of records to write = %ld\n", nrecords);
+ fprintf(stderr, "Parameters:\n");
+ fprintf(stderr, "\t# of records between flushes = %ld\n", flush_count);
+ fprintf(stderr, "\t# of records to write = %ld\n", nrecords);
} /* end if */
/* Emit informational message */
if (verbose)
- HDfprintf(stderr, "Generating symbol names\n");
+ fprintf(stderr, "Generating symbol names\n");
/* Generate dataset names */
if (generate_symbols() < 0)
@@ -384,12 +384,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)) < 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 */
@@ -397,32 +397,32 @@ main(int argc, char *argv[])
/* Emit informational message */
if (verbose)
- HDfprintf(stderr, "Adding records\n");
+ fprintf(stderr, "Adding records\n");
/* Append records to datasets */
if (add_records(fid, verbose, (unsigned long)nrecords, (unsigned long)flush_count) < 0) {
- HDfprintf(stderr, "Error appending records to datasets!\n");
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "Error appending records to 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;