From 4ea54004260b20e64be10f7e4b1388ba69fba710 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Wed, 21 Mar 2018 18:46:11 +0000 Subject: [PATCH] ECC-657: -p will not print the keys (no need to add -v) --- tools/bufr_copy.c | 6 ++++++ tools/grib_copy.c | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/tools/bufr_copy.c b/tools/bufr_copy.c index 45f639f50..80a633d53 100644 --- a/tools/bufr_copy.c +++ b/tools/bufr_copy.c @@ -71,6 +71,12 @@ int grib_tool_init(grib_runtime_options* options) } } #endif + /* ECC-657: If user supplied -p to print some keys, turn on verbose */ + if (grib_options_on("p:")) { + if (grib_options_get_option("p:")) { + options->verbose = 1; + } + } return 0; } diff --git a/tools/grib_copy.c b/tools/grib_copy.c index 61d217653..85465857a 100644 --- a/tools/grib_copy.c +++ b/tools/grib_copy.c @@ -75,6 +75,12 @@ int grib_tool_init(grib_runtime_options* options) } } #endif + /* ECC-657: If user supplied -p to print some keys, turn on verbose */ + if (grib_options_on("p:")) { + if (grib_options_get_option("p:")) { + options->verbose = 1; + } + } return 0; }