diff options
-rw-r--r-- | src/getopt.m4 | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/src/getopt.m4 b/src/getopt.m4 index 5dd7494..ac540af 100644 --- a/src/getopt.m4 +++ b/src/getopt.m4 @@ -258,20 +258,7 @@ print_help(void) n = printf (" %s", opthelp[i].opt); if (opthelp[i].arg) { - char *cb, *ce; - if (strlen (opthelp[i].opt) == 2) - { - if (!opthelp[i].is_optional) - { - putchar (' '); - n++; - } - } - else - { - putchar ('='); - n++; - } + char *cb, *ce, *sep = ""; if (opthelp[i].is_optional) { cb = "["; @@ -279,7 +266,15 @@ print_help(void) } else cb = ce = ""; - n += printf ("%s%s%s", cb, gettext (opthelp[i].arg), ce); + + if (strlen (opthelp[i].opt) == 2) + { + if (!opthelp[i].is_optional) + sep = " "; + } + else + sep = "="; + n += printf ("%s%s%s%s", cb, sep, gettext (opthelp[i].arg), ce); } if (n >= DESCRCOLUMN) { |