diff options
author | Allen Byrne <50328838+byrnHDF@users.noreply.github.com> | 2022-02-27 01:07:39 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-27 01:07:39 (GMT) |
commit | e8b030363999befa548b94ac5c505d170540aebc (patch) | |
tree | 23e9d091c88e76bfe8ab842efa87cdda89e39974 /tools/test/perform/zip_perf.c | |
parent | 1c10010a316c0885cd71fad6c8d0067a0eb8f7f1 (diff) | |
download | hdf5-e8b030363999befa548b94ac5c505d170540aebc.zip hdf5-e8b030363999befa548b94ac5c505d170540aebc.tar.gz hdf5-e8b030363999befa548b94ac5c505d170540aebc.tar.bz2 |
1.10 Fix tools incompatibility (#1449)
* fix tools incompatibility with get_option #1443
* Fix get_option function
* Committing clang-format changes
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'tools/test/perform/zip_perf.c')
-rw-r--r-- | tools/test/perform/zip_perf.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/tools/test/perform/zip_perf.c b/tools/test/perform/zip_perf.c index 5db97d1..4c7da15 100644 --- a/tools/test/perform/zip_perf.c +++ b/tools/test/perform/zip_perf.c @@ -64,15 +64,15 @@ static void error(const char *fmt, ...); static void compress_buffer(Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen); /* commandline options : long and short form */ -static const char * s_opts = "hB:b:c:p:rs:0123456789"; -static struct h5_long_options l_opts[] = {{"help", no_arg, 'h'}, - {"compressability", require_arg, 'c'}, - {"file-size", require_arg, 's'}, - {"max-buffer-size", require_arg, 'B'}, - {"min-buffer-size", require_arg, 'b'}, - {"prefix", require_arg, 'p'}, - {"random-test", no_arg, 'r'}, - {NULL, 0, '\0'}}; +static const char * s_opts = "hB:b:c:p:rs:0123456789"; +static struct long_options l_opts[] = {{"help", no_arg, 'h'}, + {"compressability", require_arg, 'c'}, + {"file-size", require_arg, 's'}, + {"max-buffer-size", require_arg, 'B'}, + {"min-buffer-size", require_arg, 'b'}, + {"prefix", require_arg, 'p'}, + {"random-test", no_arg, 'r'}, + {NULL, 0, '\0'}}; /* * Function: error @@ -500,7 +500,7 @@ main(int argc, char *argv[]) /* Initialize h5tools lib */ h5tools_init(); - while ((opt = H5_get_option(argc, (const char *const *)argv, s_opts, l_opts)) > 0) { + while ((opt = get_option(argc, (const char *const *)argv, s_opts, l_opts)) > 0) { switch ((char)opt) { case '0': case '1': @@ -515,13 +515,13 @@ main(int argc, char *argv[]) compress_level = opt - '0'; break; case 'B': - max_buf_size = parse_size_directive(H5_optarg); + max_buf_size = parse_size_directive(opt_arg); break; case 'b': - min_buf_size = parse_size_directive(H5_optarg); + min_buf_size = parse_size_directive(opt_arg); break; case 'c': - compress_percent = (int)HDstrtol(H5_optarg, NULL, 10); + compress_percent = (int)HDstrtol(opt_arg, NULL, 10); if (compress_percent < 0) compress_percent = 0; @@ -530,13 +530,13 @@ main(int argc, char *argv[]) break; case 'p': - option_prefix = H5_optarg; + option_prefix = opt_arg; break; case 'r': random_test = TRUE; break; case 's': - file_size = parse_size_directive(H5_optarg); + file_size = parse_size_directive(opt_arg); break; case '?': usage(); |