summaryrefslogtreecommitdiffstats
path: root/test/swmr_sparse_reader.c
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2019-12-09 16:30:58 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2019-12-09 16:30:58 (GMT)
commitc8f533cfc33ac743227cbed8eba361c715a2976f (patch)
treebcae5320f80bac774647cacbbd8493604f9384d2 /test/swmr_sparse_reader.c
parentadcf8a315e82c0848d126e7e46b662930c081896 (diff)
downloadhdf5-c8f533cfc33ac743227cbed8eba361c715a2976f.zip
hdf5-c8f533cfc33ac743227cbed8eba361c715a2976f.tar.gz
hdf5-c8f533cfc33ac743227cbed8eba361c715a2976f.tar.bz2
Merge all of my changes from merge-back-to-feature-vfd_swmr-attempt-1,
including the merge of `hdffv/hdf5/develop`, back to the branch that Vailin and I share. Now I need to put this branch on a fork with a less confusing name than vchoi_fork!
Diffstat (limited to 'test/swmr_sparse_reader.c')
-rw-r--r--test/swmr_sparse_reader.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/test/swmr_sparse_reader.c b/test/swmr_sparse_reader.c
index eb6e4fb..43b6bd3 100644
--- a/test/swmr_sparse_reader.c
+++ b/test/swmr_sparse_reader.c
@@ -232,7 +232,7 @@ read_records(const char *filename, unsigned verbose, unsigned long nrecords,
unsigned long file_u; /* Attribute sequence number (writer's "u") */
/* Get a random dataset, according to the symbol distribution */
- symbol = choose_dataset();
+ symbol = choose_dataset(NULL, NULL);
/* Fill in "nrecords" field. Note that this depends on the writer
* using the same algorithm and "nrecords" */
@@ -327,19 +327,19 @@ read_records(const char *filename, unsigned verbose, unsigned long nrecords,
static void
usage(void)
{
- printf("\n");
- printf("Usage error!\n");
- printf("\n");
- printf("Usage: swmr_sparse_reader [-q] [-s <# of seconds to wait for writer>]\n");
- printf(" [-n <# of reads between reopens>] <# of records>\n");
- printf("\n");
- printf("Defaults to verbose (no '-q' given), 1 second wait ('-s 1') and 1 read\n");
- printf("between reopens ('-r 1')\n");
- printf("\n");
- printf("Note that the # of records *must* be the same as that supplied to\n");
- printf("swmr_sparse_writer\n");
- printf("\n");
- HDexit(1);
+ HDprintf("\n");
+ HDprintf("Usage error!\n");
+ HDprintf("\n");
+ HDprintf("Usage: swmr_sparse_reader [-q] [-s <# of seconds to wait for writer>]\n");
+ HDprintf(" [-n <# of reads between reopens>] <# of records>\n");
+ HDprintf("\n");
+ HDprintf("Defaults to verbose (no '-q' given), 1 second wait ('-s 1') and 1 read\n");
+ HDprintf("between reopens ('-r 1')\n");
+ HDprintf("\n");
+ HDprintf("Note that the # of records *must* be the same as that supplied to\n");
+ HDprintf("swmr_sparse_writer\n");
+ HDprintf("\n");
+ HDexit(EXIT_FAILURE);
} /* end usage() */
int main(int argc, const char *argv[])
@@ -411,7 +411,7 @@ int main(int argc, const char *argv[])
/* Generate dataset names */
if(generate_symbols() < 0) {
HDfprintf(stderr, "Error generating symbol names!\n");
- HDexit(1);
+ HDexit(EXIT_FAILURE);
} /* end if */
/* Create datatype for creating datasets */
@@ -421,7 +421,7 @@ int main(int argc, const char *argv[])
/* Reading records from datasets */
if(read_records(FILENAME, verbose, (unsigned long) nrecords, (unsigned)poll_time, (unsigned)reopen_count) < 0) {
HDfprintf(stderr, "Error reading records from datasets!\n");
- HDexit(1);
+ HDexit(EXIT_FAILURE);
} /* end if */
/* Emit informational message */
@@ -431,7 +431,7 @@ int main(int argc, const char *argv[])
/* Clean up the symbols */
if(shutdown_symbols() < 0) {
HDfprintf(stderr, "Error releasing symbols!\n");
- HDexit(1);
+ HDexit(EXIT_FAILURE);
} /* end if */
/* Emit informational message */
@@ -441,7 +441,7 @@ int main(int argc, const char *argv[])
/* Close objects created */
if(H5Tclose(symbol_tid) < 0) {
HDfprintf(stderr, "Error closing symbol datatype!\n");
- HDexit(1);
+ HDexit(EXIT_FAILURE);
} /* end if */
return 0;