1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00

docs: fix line length bug in gen.pl

The script warns if the length of $opt and $desc is > 78. However, these
two variables are on totally separate lines so the check makes no sense.
Also the $bitmask field is totally forgotten. Currently this leads to
two warnings within `--resolve` and `--aws-sigv4`.

Closes #6438
This commit is contained in:
Emil Engler 2021-01-11 20:27:58 +01:00 committed by Daniel Stenberg
parent efa5b16d38
commit 324cf1d2ee
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -369,8 +369,11 @@ sub listhelp {
my $line = sprintf " {\"%s\",\n \"%s\",\n %s},\n", $opt, $desc, $bitmask;
if(length($opt) + length($desc) > 78) {
print STDERR "WARN: the --$long line is too long\n";
if(length($opt) > 78) {
print STDERR "WARN: the --$long name is too long\n";
}
else if(length($desc) > 78) {
print STDERR "WARN: the --$long description is too long\n";
}
print $line;
}