From 22a3d1c393473fbea542787de609bb335f8d195f Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Wed, 1 Mar 2017 16:17:05 +0100 Subject: [PATCH] remove options -! and -" from genltl Fixes #237. * bin/genltl.cc: Fix the numbering of options. * NEWS: Mention the bugs. --- NEWS | 3 +++ bin/genltl.cc | 9 +++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index fc96eab93..bf7dd0482 100644 --- a/NEWS +++ b/NEWS @@ -16,6 +16,9 @@ New in spot 2.3.1.dev (not yet released) - Because of a typo, the output of --stats='...%P...' was correct only if %p was used as well. + - genltl was never meant to have (randomly attributed) short + options for --postive and --negative. + Deprecation notices: - Using --format=%a to print the number of atomic propositions in diff --git a/bin/genltl.cc b/bin/genltl.cc index 8fc105046..4c1fc995c 100644 --- a/bin/genltl.cc +++ b/bin/genltl.cc @@ -167,7 +167,8 @@ const char argp_program_doc[] ="\ Generate temporal logic formulas from predefined patterns."; enum { - OPT_AND_F = 1, + FIRST_CLASS = 256, + OPT_AND_F = FIRST_CLASS, OPT_AND_FG, OPT_AND_GF, OPT_CCJ_ALPHA, @@ -203,7 +204,7 @@ enum { OPT_NEGATIVE, }; -const char* const class_name[LAST_CLASS] = +const char* const class_name[LAST_CLASS - FIRST_CLASS] = { "and-f", "and-fg", @@ -1445,12 +1446,12 @@ output_pattern(int pattern, int n) if (opt_positive || !opt_negative) { - output_formula_checked(f, class_name[pattern - 1], n); + output_formula_checked(f, class_name[pattern - FIRST_CLASS], n); } if (opt_negative) { std::string tmp = "!"; - tmp += class_name[pattern - 1]; + tmp += class_name[pattern - FIRST_CLASS]; output_formula_checked(spot::formula::Not(f), tmp.c_str(), n); } }