From d1ed626845ff1a17bc1667f32789ea0670408904 Mon Sep 17 00:00:00 2001 From: Jacob Smith Date: Tue, 14 May 2019 13:53:28 -0500 Subject: Fit help message to 80 character width and clarify some details. --- tools/src/h5repack/h5repack_main.c | 71 +++++++++++++++---------- tools/test/h5repack/testfiles/h5repack-help.txt | 71 +++++++++++++++---------- 2 files changed, 88 insertions(+), 54 deletions(-) diff --git a/tools/src/h5repack/h5repack_main.c b/tools/src/h5repack/h5repack_main.c index dec25f9..1852e30 100644 --- a/tools/src/h5repack/h5repack_main.c +++ b/tools/src/h5repack/h5repack_main.c @@ -83,13 +83,17 @@ static void usage(const char *prog) { PRINTVALSTREAM(rawoutstream, " -v, --verbose Verbose mode, print object information\n"); PRINTVALSTREAM(rawoutstream, " -V, --version Print version number and exit\n"); PRINTVALSTREAM(rawoutstream, " -n, --native Use a native HDF5 type when repacking\n"); - PRINTVALSTREAM(rawoutstream, " --enable-error-stack Prints messages from the HDF5 error stack as they occur\n"); + PRINTVALSTREAM(rawoutstream, " --enable-error-stack Prints messages from the HDF5 error stack as they\n"); + PRINTVALSTREAM(rawoutstream, " occur\n"); PRINTVALSTREAM(rawoutstream, " -L, --latest Use latest version of file format\n"); - PRINTVALSTREAM(rawoutstream, " This option will take precedence over the -j and -k options\n"); - PRINTVALSTREAM(rawoutstream, " --low=BOUND The low bound for library release versions to use when creating\n"); - PRINTVALSTREAM(rawoutstream, " objects in the file (default is H5F_LIBVER_EARLIEST)\n"); - PRINTVALSTREAM(rawoutstream, " --high=BOUND The high bound for library release versions to use when creating\n"); - PRINTVALSTREAM(rawoutstream, " objects in the file (default is H5F_LIBVER_LATEST)\n"); + PRINTVALSTREAM(rawoutstream, " This option will take precedence over the options\n"); + PRINTVALSTREAM(rawoutstream, " --low and --high\n"); + PRINTVALSTREAM(rawoutstream, " --low=BOUND The low bound for library release versions to use\n"); + PRINTVALSTREAM(rawoutstream, " when creating objects in the file (default is 0\n"); + PRINTVALSTREAM(rawoutstream, " [H5F_LIBVER_EARLIEST])\n"); + PRINTVALSTREAM(rawoutstream, " --high=BOUND The high bound for library release versions to use\n"); + PRINTVALSTREAM(rawoutstream, " when creating objects in the file (default is 2\n"); + PRINTVALSTREAM(rawoutstream, " [H5F_LIBVER_V110 this release; H5F_LIBVER_LATEST])\n"); PRINTVALSTREAM(rawoutstream, " -c L1, --compact=L1 Maximum number of links in header messages\n"); PRINTVALSTREAM(rawoutstream, " -d L2, --indexed=L2 Minimum number of links in the indexed format\n"); PRINTVALSTREAM(rawoutstream, " -s S[:F], --ssize=S[:F] Shared object header message minimum size\n"); @@ -104,10 +108,14 @@ static void usage(const char *prog) { PRINTVALSTREAM(rawoutstream, " -z Z, --sort_order=Z Sort groups and attributes by order Z\n"); PRINTVALSTREAM(rawoutstream, " -f FILT, --filter=FILT Filter type\n"); PRINTVALSTREAM(rawoutstream, " -l LAYT, --layout=LAYT Layout type\n"); - PRINTVALSTREAM(rawoutstream, " -S FS_STRATEGY, --fs_strategy=FS_STRATEGY File space management strategy for H5Pset_file_space_strategy\n"); - PRINTVALSTREAM(rawoutstream, " -P FS_PERSIST, --fs_persist=FS_PERSIST Persisting or not persisting free-space for H5Pset_file_space_strategy\n"); - PRINTVALSTREAM(rawoutstream, " -T FS_THRESHOLD, --fs_threshold=FS_THRESHOLD Free-space section threshold for H5Pset_file_space_strategy\n"); - PRINTVALSTREAM(rawoutstream, " -G FS_PAGESIZE, --fs_pagesize=FS_PAGESIZE File space page size for H5Pset_file_space_page_size\n"); + PRINTVALSTREAM(rawoutstream, " -S FS_STRATEGY, --fs_strategy=FS_STRATEGY File space management strategy for\n"); + PRINTVALSTREAM(rawoutstream, " H5Pset_file_space_strategy\n"); + PRINTVALSTREAM(rawoutstream, " -P FS_PERSIST, --fs_persist=FS_PERSIST Persisting or not persisting free-\n"); + PRINTVALSTREAM(rawoutstream, " space for H5Pset_file_space_strategy\n"); + PRINTVALSTREAM(rawoutstream, " -T FS_THRESHOLD, --fs_threshold=FS_THRESHOLD Free-space section threshold\n"); + PRINTVALSTREAM(rawoutstream, " for H5Pset_file_space_strategy\n"); + PRINTVALSTREAM(rawoutstream, " -G FS_PAGESIZE, --fs_pagesize=FS_PAGESIZE File space page size for\n"); + PRINTVALSTREAM(rawoutstream, " H5Pset_file_space_page_size\n"); PRINTVALSTREAM(rawoutstream, "\n"); PRINTVALSTREAM(rawoutstream, " M - is an integer greater than 1, size of dataset in bytes (default is 0)\n"); PRINTVALSTREAM(rawoutstream, " E - is a filename.\n"); @@ -115,15 +123,17 @@ static void usage(const char *prog) { PRINTVALSTREAM(rawoutstream, " U - is a filename.\n"); PRINTVALSTREAM(rawoutstream, " T - is an integer\n"); PRINTVALSTREAM(rawoutstream, " A - is an integer greater than zero\n"); - PRINTVALSTREAM(rawoutstream, " Q - is the sort index type for the input file. It can be \"name\" or \"creation_order\" (default)\n"); - PRINTVALSTREAM(rawoutstream, " Z - is the sort order type for the input file. It can be \"descending\" or \"ascending\" (default)\n"); + PRINTVALSTREAM(rawoutstream, " Q - is the sort index type for the input file. It can be \"name\" or\n"); + PRINTVALSTREAM(rawoutstream, " \"creation_order\" (default)\n"); + PRINTVALSTREAM(rawoutstream, " Z - is the sort order type for the input file. It can be \"descending\" or\n"); + PRINTVALSTREAM(rawoutstream, " \"ascending\" (default)\n"); PRINTVALSTREAM(rawoutstream, " B - is the user block size, any value that is 512 or greater and is\n"); PRINTVALSTREAM(rawoutstream, " a power of 2 (1024 default)\n"); PRINTVALSTREAM(rawoutstream, " F - is the shared object header message type, any of . If F is not specified, S applies to all messages\n"); PRINTVALSTREAM(rawoutstream, "\n"); - PRINTVALSTREAM(rawoutstream, " BOUND is an integer indicating the library release versions to use when creating\n"); - PRINTVALSTREAM(rawoutstream, " objects in the file (see H5Pset_libver_bounds()):\n"); + PRINTVALSTREAM(rawoutstream, " BOUND is an integer indicating the library release versions to use when\n"); + PRINTVALSTREAM(rawoutstream, " creating objects in the file (see H5Pset_libver_bounds()):\n"); PRINTVALSTREAM(rawoutstream, " 0: This is H5F_LIBVER_EARLIEST in H5F_libver_t struct\n"); PRINTVALSTREAM(rawoutstream, " 1: This is H5F_LIBVER_V18 in H5F_libver_t struct\n"); PRINTVALSTREAM(rawoutstream, " 2: This is H5F_LIBVER_V110 in H5F_libver_t struct\n"); @@ -131,24 +141,31 @@ static void usage(const char *prog) { PRINTVALSTREAM(rawoutstream, "\n"); PRINTVALSTREAM(rawoutstream, " FS_STRATEGY is a string indicating the file space strategy used:\n"); PRINTVALSTREAM(rawoutstream, " FSM_AGGR:\n"); - PRINTVALSTREAM(rawoutstream, " The mechanisms used in managing file space are free-space managers, aggregators and virtual file driver.\n"); + PRINTVALSTREAM(rawoutstream, " The mechanisms used in managing file space are free-space\n"); + PRINTVALSTREAM(rawoutstream, " managers, aggregators and virtual file driver.\n"); PRINTVALSTREAM(rawoutstream, " PAGE:\n"); - PRINTVALSTREAM(rawoutstream, " The mechanisms used in managing file space are free-space managers with embedded paged aggregation and virtual file driver.\n"); + PRINTVALSTREAM(rawoutstream, " The mechanisms used in managing file space are free-space\n"); + PRINTVALSTREAM(rawoutstream, " managers with embedded paged aggregation and virtual file driver.\n"); PRINTVALSTREAM(rawoutstream, " AGGR:\n"); - PRINTVALSTREAM(rawoutstream, " The mechanisms used in managing file space are aggregators and virtual file driver.\n"); + PRINTVALSTREAM(rawoutstream, " The mechanisms used in managing file space are aggregators and\n"); + PRINTVALSTREAM(rawoutstream, " virtual file driver.\n"); PRINTVALSTREAM(rawoutstream, " NONE:\n"); - PRINTVALSTREAM(rawoutstream, " The mechanisms used in managing file space are virtual file driver.\n"); - PRINTVALSTREAM(rawoutstream, " The default strategy when not set is FSM_AGGR without persisting free-space.\n"); + PRINTVALSTREAM(rawoutstream, " The mechanisms used in managing file space are virtual file\n"); + PRINTVALSTREAM(rawoutstream, " driver.\n"); + PRINTVALSTREAM(rawoutstream, " The default strategy when not set is FSM_AGGR without persisting free-\n"); + PRINTVALSTREAM(rawoutstream, " space.\n"); PRINTVALSTREAM(rawoutstream, "\n"); PRINTVALSTREAM(rawoutstream, " FS_PERSIST is 1 to persisting free-space or 0 to not persisting free-space.\n"); PRINTVALSTREAM(rawoutstream, " The default when not set is not persisting free-space.\n"); PRINTVALSTREAM(rawoutstream, " The value is ignored for AGGR and NONE strategies.\n"); PRINTVALSTREAM(rawoutstream, "\n"); - PRINTVALSTREAM(rawoutstream, " FS_THRESHOLD is the minimum size (in bytes) of free-space sections to be tracked by the library.\n"); + PRINTVALSTREAM(rawoutstream, " FS_THRESHOLD is the minimum size (in bytes) of free-space sections to be\n"); + PRINTVALSTREAM(rawoutstream, " tracked by the library.\n"); PRINTVALSTREAM(rawoutstream, " The default when not set is 1.\n"); PRINTVALSTREAM(rawoutstream, " The value is ignored for AGGR and NONE strategies.\n"); PRINTVALSTREAM(rawoutstream, "\n"); - PRINTVALSTREAM(rawoutstream, " FS_PAGESIZE is the size (in bytes) >=512 that is used by the library when the file space strategy PAGE is used.\n"); + PRINTVALSTREAM(rawoutstream, " FS_PAGESIZE is the size (in bytes) >=512 that is used by the library when\n"); + PRINTVALSTREAM(rawoutstream, " the file space strategy PAGE is used.\n"); PRINTVALSTREAM(rawoutstream, " The default when not set is 4096.\n"); PRINTVALSTREAM(rawoutstream, "\n"); PRINTVALSTREAM(rawoutstream, " FILT - is a string with the format:\n"); @@ -176,9 +193,9 @@ static void usage(const char *prog) { PRINTVALSTREAM(rawoutstream, " NBIT (no parameter)\n"); PRINTVALSTREAM(rawoutstream, " SOFF= scale_factor is an integer and scale_type\n"); PRINTVALSTREAM(rawoutstream, " is either IN or DS\n"); - PRINTVALSTREAM(rawoutstream, " UD=\n"); - PRINTVALSTREAM(rawoutstream, " required values for filter_number,filter_flag,cd_value_count,value_1\n"); - PRINTVALSTREAM(rawoutstream, " optional values for value_2 to value_N\n"); + PRINTVALSTREAM(rawoutstream, " UD=\n"); + PRINTVALSTREAM(rawoutstream, " Required values: filter_number, filter_flag, cd_value_count, value1\n"); + PRINTVALSTREAM(rawoutstream, " Optional values: value2 to valueN\n"); PRINTVALSTREAM(rawoutstream, " NONE (no parameter)\n"); PRINTVALSTREAM(rawoutstream, "\n"); PRINTVALSTREAM(rawoutstream, " LAYT - is a string with the format:\n"); @@ -215,12 +232,12 @@ static void usage(const char *prog) { PRINTVALSTREAM(rawoutstream, "4) h5repack -L -c 10 -s 20:dtype file1 file2\n"); PRINTVALSTREAM(rawoutstream, "\n"); PRINTVALSTREAM(rawoutstream, " Using latest file format with maximum compact group size of 10 and\n"); - PRINTVALSTREAM(rawoutstream, " and minimum shared datatype size of 20\n"); + PRINTVALSTREAM(rawoutstream, " minimum shared datatype size of 20\n"); PRINTVALSTREAM(rawoutstream, "\n"); PRINTVALSTREAM(rawoutstream, "5) h5repack --low=0 --high=1 file1 file2\n"); PRINTVALSTREAM(rawoutstream, "\n"); - PRINTVALSTREAM(rawoutstream, " Set low=H5F_LIBVER_EARLIEST and high=H5F_LIBVER_V18 via H5Pset_libver_bounds() when\n"); - PRINTVALSTREAM(rawoutstream, " creating the repacked file: file2\n"); + PRINTVALSTREAM(rawoutstream, " Set low=H5F_LIBVER_EARLIEST and high=H5F_LIBVER_V18 via\n"); + PRINTVALSTREAM(rawoutstream, " H5Pset_libver_bounds() when creating the repacked file, file2\n"); PRINTVALSTREAM(rawoutstream, "\n"); PRINTVALSTREAM(rawoutstream, "5) h5repack -f SHUF -f GZIP=1 file1 file2\n"); PRINTVALSTREAM(rawoutstream, "\n"); diff --git a/tools/test/h5repack/testfiles/h5repack-help.txt b/tools/test/h5repack/testfiles/h5repack-help.txt index 0eef0f5..ad07784 100644 --- a/tools/test/h5repack/testfiles/h5repack-help.txt +++ b/tools/test/h5repack/testfiles/h5repack-help.txt @@ -6,13 +6,17 @@ usage: h5repack [OPTIONS] file1 file2 -v, --verbose Verbose mode, print object information -V, --version Print version number and exit -n, --native Use a native HDF5 type when repacking - --enable-error-stack Prints messages from the HDF5 error stack as they occur + --enable-error-stack Prints messages from the HDF5 error stack as they + occur -L, --latest Use latest version of file format - This option will take precedence over the -j and -k options - --low=BOUND The low bound for library release versions to use when creating - objects in the file (default is H5F_LIBVER_EARLIEST) - --high=BOUND The high bound for library release versions to use when creating - objects in the file (default is H5F_LIBVER_LATEST) + This option will take precedence over the options + --low and --high + --low=BOUND The low bound for library release versions to use + when creating objects in the file (default is 0 + [H5F_LIBVER_EARLIEST]) + --high=BOUND The high bound for library release versions to use + when creating objects in the file (default is 2 + [H5F_LIBVER_V110 this release; H5F_LIBVER_LATEST]) -c L1, --compact=L1 Maximum number of links in header messages -d L2, --indexed=L2 Minimum number of links in the indexed format -s S[:F], --ssize=S[:F] Shared object header message minimum size @@ -27,10 +31,14 @@ usage: h5repack [OPTIONS] file1 file2 -z Z, --sort_order=Z Sort groups and attributes by order Z -f FILT, --filter=FILT Filter type -l LAYT, --layout=LAYT Layout type - -S FS_STRATEGY, --fs_strategy=FS_STRATEGY File space management strategy for H5Pset_file_space_strategy - -P FS_PERSIST, --fs_persist=FS_PERSIST Persisting or not persisting free-space for H5Pset_file_space_strategy - -T FS_THRESHOLD, --fs_threshold=FS_THRESHOLD Free-space section threshold for H5Pset_file_space_strategy - -G FS_PAGESIZE, --fs_pagesize=FS_PAGESIZE File space page size for H5Pset_file_space_page_size + -S FS_STRATEGY, --fs_strategy=FS_STRATEGY File space management strategy for + H5Pset_file_space_strategy + -P FS_PERSIST, --fs_persist=FS_PERSIST Persisting or not persisting free- + space for H5Pset_file_space_strategy + -T FS_THRESHOLD, --fs_threshold=FS_THRESHOLD Free-space section threshold + for H5Pset_file_space_strategy + -G FS_PAGESIZE, --fs_pagesize=FS_PAGESIZE File space page size for + H5Pset_file_space_page_size M - is an integer greater than 1, size of dataset in bytes (default is 0) E - is a filename. @@ -38,15 +46,17 @@ usage: h5repack [OPTIONS] file1 file2 U - is a filename. T - is an integer A - is an integer greater than zero - Q - is the sort index type for the input file. It can be "name" or "creation_order" (default) - Z - is the sort order type for the input file. It can be "descending" or "ascending" (default) + Q - is the sort index type for the input file. It can be "name" or + "creation_order" (default) + Z - is the sort order type for the input file. It can be "descending" or + "ascending" (default) B - is the user block size, any value that is 512 or greater and is a power of 2 (1024 default) F - is the shared object header message type, any of . If F is not specified, S applies to all messages - BOUND is an integer indicating the library release versions to use when creating - objects in the file (see H5Pset_libver_bounds()): + BOUND is an integer indicating the library release versions to use when + creating objects in the file (see H5Pset_libver_bounds()): 0: This is H5F_LIBVER_EARLIEST in H5F_libver_t struct 1: This is H5F_LIBVER_V18 in H5F_libver_t struct 2: This is H5F_LIBVER_V110 in H5F_libver_t struct @@ -54,24 +64,31 @@ usage: h5repack [OPTIONS] file1 file2 FS_STRATEGY is a string indicating the file space strategy used: FSM_AGGR: - The mechanisms used in managing file space are free-space managers, aggregators and virtual file driver. + The mechanisms used in managing file space are free-space + managers, aggregators and virtual file driver. PAGE: - The mechanisms used in managing file space are free-space managers with embedded paged aggregation and virtual file driver. + The mechanisms used in managing file space are free-space + managers with embedded paged aggregation and virtual file driver. AGGR: - The mechanisms used in managing file space are aggregators and virtual file driver. + The mechanisms used in managing file space are aggregators and + virtual file driver. NONE: - The mechanisms used in managing file space are virtual file driver. - The default strategy when not set is FSM_AGGR without persisting free-space. + The mechanisms used in managing file space are virtual file + driver. + The default strategy when not set is FSM_AGGR without persisting free- + space. FS_PERSIST is 1 to persisting free-space or 0 to not persisting free-space. The default when not set is not persisting free-space. The value is ignored for AGGR and NONE strategies. - FS_THRESHOLD is the minimum size (in bytes) of free-space sections to be tracked by the library. + FS_THRESHOLD is the minimum size (in bytes) of free-space sections to be + tracked by the library. The default when not set is 1. The value is ignored for AGGR and NONE strategies. - FS_PAGESIZE is the size (in bytes) >=512 that is used by the library when the file space strategy PAGE is used. + FS_PAGESIZE is the size (in bytes) >=512 that is used by the library when + the file space strategy PAGE is used. The default when not set is 4096. FILT - is a string with the format: @@ -99,9 +116,9 @@ usage: h5repack [OPTIONS] file1 file2 NBIT (no parameter) SOFF= scale_factor is an integer and scale_type is either IN or DS - UD= - required values for filter_number,filter_flag,cd_value_count,value_1 - optional values for value_2 to value_N + UD= + Required values: filter_number, filter_flag, cd_value_count, value1 + Optional values: value2 to valueN NONE (no parameter) LAYT - is a string with the format: @@ -138,12 +155,12 @@ Examples of use: 4) h5repack -L -c 10 -s 20:dtype file1 file2 Using latest file format with maximum compact group size of 10 and - and minimum shared datatype size of 20 + minimum shared datatype size of 20 5) h5repack --low=0 --high=1 file1 file2 - Set low=H5F_LIBVER_EARLIEST and high=H5F_LIBVER_V18 via H5Pset_libver_bounds() when - creating the repacked file: file2 + Set low=H5F_LIBVER_EARLIEST and high=H5F_LIBVER_V18 via + H5Pset_libver_bounds() when creating the repacked file, file2 5) h5repack -f SHUF -f GZIP=1 file1 file2 -- cgit v0.12