summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjbj <jbj>2003-12-26 17:56:05 +0000
committerjbj <jbj>2003-12-26 17:56:05 +0000
commitbada83828c8b4bc5af82c9179eea3d206582cd76 (patch)
tree177eb6453d69e8c28d3853fb48e15cc6d1a774e9
parentfac9a8033d9a8667c25306b1cf8525a0a732b4fd (diff)
downloadlibpopt-bada83828c8b4bc5af82c9179eea3d206582cd76.tar.gz
use '=' iff long option (#108924).
-rw-r--r--popthelp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/popthelp.c b/popthelp.c
index c8b98ab..240692f 100644
--- a/popthelp.c
+++ b/popthelp.c
@@ -305,7 +305,7 @@ static void singleOptionHelp(FILE * fp, int maxLeftCol,
default:
/*@innerbreak@*/ break;
}
- *le++ = '=';
+ *le++ = (opt->longName != NULL ? '=' : ' ');
if (negate) *le++ = '~';
/*@-formatconst@*/
le += sprintf(le, (ops ? "0x%lx" : "%ld"), aLong);
@@ -319,7 +319,7 @@ static void singleOptionHelp(FILE * fp, int maxLeftCol,
case POPT_ARG_FLOAT:
case POPT_ARG_DOUBLE:
case POPT_ARG_STRING:
- *le++ = '=';
+ *le++ = (opt->longName != NULL ? '=' : ' ');
strcpy(le, argDescrip); le += strlen(le);
break;
default: