From c1f7f726db6325e15ee0812af11a04d8a2eefacf Mon Sep 17 00:00:00 2001 From: midipix Date: Sun, 6 Mar 2016 07:07:33 -0500 Subject: argv.h: usage screen generator: fix notation of purely hybrid options. --- src/internal/argv/argv.h | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'src/internal') diff --git a/src/internal/argv/argv.h b/src/internal/argv/argv.h index e425ebd..6037666 100644 --- a/src/internal/argv/argv.h +++ b/src/internal/argv/argv.h @@ -858,17 +858,27 @@ static void argv_usage( if (fshort) fprintf(file,"%s-%-*c",indent,(int)(optlen-solen),option->short_name); else if (flong) - fprintf(file,"%s--%-*s",indent,(int)(optlen-lolen),option->long_name); + fprintf(file, + (option->flags & ARGV_OPTION_HYBRID_ONLY) + ? "%s -%-*s" + : "%s--%-*s", + indent,(int)(optlen-lolen),option->long_name); else { if (option->short_name && option->long_name) - fprintf(file,"%s-%c,--%-*s", + fprintf(file, + (option->flags & ARGV_OPTION_HYBRID_ONLY) + ? "%s-%c, -%-*s" + : "%s-%c,--%-*s", indent,option->short_name, (int)(optlen-slolen),option->long_name); else if (option->short_name) fprintf(file,"%s-%-*c", indent,(int)(optlen-solen),option->short_name); else - fprintf(file,"%s%3s--%-*s", + fprintf(file, + (option->flags & ARGV_OPTION_HYBRID_ONLY) + ? "%s%3s -%-*s" + : "%s%3s--%-*s", indent,"", (int)(optlen-slolen),option->long_name); } -- cgit v1.2.3