Hi,
Sometime ago I reported that autogen assigns random values to the short options in the --help view. The origin report is at: http://sourceforge.net/p/autogen/mailman/message/32189653/
A copy is below:
I've noticed in 5.18.2 that if I do not specify values in two options I
have different behavior depending on the value of "doc". That is if I
have:
flag = {
name = p12-info;
descrip = "Print information on a PKCS #12 structure";
doc = "";
};
The generated text in help is the expected:
' --to-p12 Generate a PKCS #12 structure'
However the following:
flag = {
name = rsa;
descrip = "Generate RSA key";
doc = "When combined with --generate-privkey generates an RSA
private key.";
};
results to:
' -", --rsa Generate RSA key'
Note the funny '-"' that was assigned. The funny assignments (using
values from "!@#$%^&*") seem to occur for all options that have no value
and set doc to something else than empty.
I'm opening this bug as a reminder and to allow tracking of the issue (since it is being reported by users https://gitlab.com/gnutls/gnutls/issues/57 )
"Works for me." :( I am certain there is an issue, but I'm not seeing it.
Could you please expand the following until you see the error? Thank you.
ck-opts.def:
chk.c:
generate and compile as in:
and finally:
Once that help output reproduces the problem, then send the ck-opts.def file.
It's quite long:
"quite long" is required. That is the source of the problem. The macro:
yields "true" for the value of 4130 for "c". The option that triggers this is the 38-th (number 37) and it happens when there is at least one short option and at least 33 options without short variants. I never tested that :) Thank you. If you add about 10 short options, the problem will go away. OK, I'll fix the issue.
Patch has been applied:
Thank you!
fixed