From 6932c1df26a8ea59bdc760d14b31dbde1cc1bf05 Mon Sep 17 00:00:00 2001 From: Dominik Loidolt <dominik.loidolt@univie.ac.at> Date: Tue, 25 Apr 2023 16:35:37 +0200 Subject: [PATCH] Update welcome message --- cmp_tool.c | 18 ++++++++++++------ lib/cmp_io.c | 2 +- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/cmp_tool.c b/cmp_tool.c index 3a2474d..f382021 100644 --- a/cmp_tool.c +++ b/cmp_tool.c @@ -295,12 +295,18 @@ int main(int argc, char **argv) exit(EXIT_SUCCESS); } - printf("#########################################################\n"); - printf("### PLATO Compression/Decompression Tool Version %s ###\n", - CMP_TOOL_VERSION); - printf("#########################################################\n"); - if (!strcmp(CMP_TOOL_VERSION, "0.07") || !strcmp(CMP_TOOL_VERSION, "0.08")) - printf("Info: Note that the behaviour of the cmp_tool has changed. From now on, the compressed data will be preceded by a header by default. The old behaviour can be achieved with the --no_header option.\n\n"); + { + char str[] = "### PLATO Compression/Decompression Tool Version " CMP_TOOL_VERSION " ###\n"; + size_t str_len = strlen(str) - 1; /* -1 for \n */ + size_t i; + for (i = 0; i < str_len; ++i) + printf("#"); + printf("\n"); + printf("%s", str); + for (i = 0; i < str_len; ++i) + printf("#"); + printf("\n"); + } if (!data_file_name) { fprintf(stderr, "%s: No data file (-d option) specified.\n", diff --git a/lib/cmp_io.c b/lib/cmp_io.c index b1ab76b..874f224 100644 --- a/lib/cmp_io.c +++ b/lib/cmp_io.c @@ -82,7 +82,6 @@ void print_help(const char *program_name) 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(" -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"); printf(" -v, --verbose Print various debugging information\n"); @@ -90,6 +89,7 @@ void print_help(const char *program_name) printf(" -c <file> File containing the compressing configuration\n"); printf(" -d <file> File containing the data to be compressed\n"); printf(" -m <file> File containing the model of the data to be compressed\n"); + printf(" --no_header Do not add a compression entity header in front of the compressed data\n"); printf(" --rdcu_pkt Generate RMAP packets for an RDCU compression\n"); printf(" --last_info <.info file> Generate RMAP packets for an RDCU compression with parallel read of the last results\n"); printf("Decompression Options:\n"); -- GitLab