Skip to content
Snippets Groups Projects
Commit 3d5610f9 authored by Dominik Loidolt's avatar Dominik Loidolt
Browse files

-b can now also be used for binary mode as --binary

parent ac2dc81e
No related branches found
No related tags found
1 merge request!20-b can now also be used for binary mode as --binary
......@@ -3,7 +3,7 @@ All notable changes to this project will be documented in this file.
## [Unreleased]
### Added
- add --binary option for read and write files in binary format
- add -b or --binary option for read and write files in binary format
- add cross compile file for sparc
- add tests for the compression entity
- add test for cmp_rdcu_cfg.c
......
......@@ -73,7 +73,6 @@ enum {
NO_HEADER,
MODEL_ID,
MODEL_COUTER,
BINARY_IO,
};
static const struct option long_options[] = {
......@@ -90,7 +89,7 @@ static const struct option long_options[] = {
{"no_header", no_argument, NULL, NO_HEADER},
{"model_id", required_argument, NULL, MODEL_ID},
{"model_counter", required_argument, NULL, MODEL_COUTER},
{"binary", no_argument, NULL, BINARY_IO},
{"binary", no_argument, NULL, 'b'},
{NULL, 0, NULL, 0}
};
......@@ -165,12 +164,15 @@ int main(int argc, char **argv)
exit(EXIT_FAILURE);
}
while ((opt = getopt_long(argc, argv, "ac:d:hi:m:no:vV", long_options,
while ((opt = getopt_long(argc, argv, "abc:d:hi:m:no:vV", long_options,
NULL)) != -1) {
switch (opt) {
case 'a': /* --rdcu_par */
add_rdcu_pars = 1;
break;
case 'b':
io_flags |= CMP_IO_BINARY;
break;
case 'c':
cmp_operation = 1;
cfg_file_name = optarg;
......@@ -233,9 +235,6 @@ int main(int argc, char **argv)
case MODEL_COUTER:
model_counter_str = optarg;
break;
case BINARY_IO:
io_flags |= CMP_IO_BINARY;
break;
default:
print_help(program_name);
exit(EXIT_FAILURE);
......
......@@ -81,7 +81,7 @@ void print_help(const char *program_name)
printf(" -o <prefix> Use the <prefix> for output files\n");
printf(" -n, --model_cfg Print a default model configuration and exit\n");
printf(" --diff_cfg Print a default 1d-differencing configuration and exit\n");
printf(" --binary Read and write files in binary format\n");
printf(" -b, --binary Read and write files in binary format\n");
printf(" --no_header Do not add a compression entity header in front of the compressed data\n");
printf(" -a, --rdcu_par Add additional RDCU control parameters\n");
printf(" -V, --version Print program version and exit\n");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment