From ccd0499c10b1ebf075bc251c4827ab79a6975165 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 23 Nov 2015 11:58:19 +0200 Subject: Change print_short_usage() to print_usage() --- cli/header.cxx | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) (limited to 'cli/header.cxx') diff --git a/cli/header.cxx b/cli/header.cxx index 76e2626..35097af 100644 --- a/cli/header.cxx +++ b/cli/header.cxx @@ -192,15 +192,12 @@ namespace os << "// Print usage information." << endl << "//" << endl; - if (usage != ut_both) - os << "static void" << endl - << "print_usage (" << options.ostream_type () << "&);" - << endl; - else + os << "static void" << endl + << "print_usage (" << options.ostream_type () << "&);" + << endl; + + if (usage == ut_both) os << "static void" << endl - << "print_short_usage (" << options.ostream_type () << "&);" - << endl - << "static void" << endl << "print_long_usage (" << options.ostream_type () << "&);" << endl; } @@ -341,15 +338,12 @@ generate_header (context& ctx) string const& ost (ctx.options.ostream_type ()); - if (ctx.usage != ut_both) - os << "void" << endl - << n << "usage (" << ost << "&);" - << endl; - else + os << "void" << endl + << n << "usage (" << ost << "&);" + << endl; + + if (ctx.usage == ut_both) os << "void" << endl - << n << "short_usage (" << ost << "&);" - << endl - << "void" << endl << n << "long_usage (" << ost << "&);" << endl; -- cgit v1.1