Mercurial > hg > index.cgi
changeset 198:d2bed389e94a
Fix --help and --usage to display = correctly for long option args
--usage and --help were missing the = between the long option and its
argument in certain circumstances. Correct lwlib to handle these cases.
author | William Astle <lost@l-w.ca> |
---|---|
date | Thu, 15 Mar 2012 09:33:26 -0600 |
parents | 82957c407577 |
children | 3132b1742eca |
files | lwlib/lw_cmdline.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lwlib/lw_cmdline.c Thu Mar 15 09:27:48 2012 -0600 +++ b/lwlib/lw_cmdline.c Thu Mar 15 09:33:26 2012 -0600 @@ -177,7 +177,7 @@ } if (llist[i] -> flags & lw_cmdline_opt_doc) { - printf(" [%s%s]", llist[i] -> name, llist[i] -> arg); + printf(" [%s=%s]", llist[i] -> name, llist[i] -> arg); t = strlen(llist[i] -> name) + strlen(llist[i] -> arg) + 3; } else @@ -307,7 +307,7 @@ col++; fputc('[', stdout); } - if (noequ) + if (!noequ) { fputc('=', stdout); col++;