mirror of
https://github.com/curl/curl.git
synced 2026-07-22 19:07:18 +03:00
curldown: fixups
- make DEFAULT sections less repetitive - make historic mentions use HISTORY - generate the protocols section on `# %PROTOCOLS%` instead of guessing where to put it - generate the availability section on `# %AVAILABILITY%` instead of guessing where to put it - make the protocols section more verbose Closes #14227
This commit is contained in:
parent
126cf7eccb
commit
5a488251f7
488 changed files with 2095 additions and 119 deletions
|
|
@ -103,15 +103,25 @@ sub outprotocols {
|
|||
push @o, ".SH PROTOCOLS\n";
|
||||
|
||||
if($p[0] eq "TLS") {
|
||||
push @o, "All TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc.";
|
||||
push @o, "This functionality affects all TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc.";
|
||||
}
|
||||
else {
|
||||
my @s = sort @p;
|
||||
push @o, "This functionality affects ";
|
||||
for my $e (sort @s) {
|
||||
push @o, sprintf "%s$e",
|
||||
$comma ? (($e eq $s[-1]) ? " and " : ", "): "";
|
||||
push @o, sprintf "%s%s",
|
||||
$comma ? (($e eq $s[-1]) ? " and " : ", "): "",
|
||||
lc($e);
|
||||
$comma = 1;
|
||||
}
|
||||
if($#s == 0) {
|
||||
if($s[0] eq "All") {
|
||||
push @o, " supported protocols";
|
||||
}
|
||||
else {
|
||||
push @o, " only";
|
||||
}
|
||||
}
|
||||
}
|
||||
push @o, "\n";
|
||||
return @o;
|
||||
|
|
@ -447,20 +457,24 @@ sub single {
|
|||
elsif($word eq "AVAILABILITY") {
|
||||
print STDERR "$f:$line:1:WARN: AVAILABILITY section in source file\n";
|
||||
}
|
||||
elsif($word eq "EXAMPLE") {
|
||||
# insert the generated PROTOCOLS section before EXAMPLE
|
||||
elsif($word eq "%PROTOCOLS%") {
|
||||
# insert the generated PROTOCOLS section
|
||||
push @desc, outprotocols(@proto);
|
||||
|
||||
if($proto[0] eq "TLS") {
|
||||
push @desc, outtls(@tls);
|
||||
}
|
||||
$header = 1;
|
||||
next;
|
||||
}
|
||||
elsif($word eq "RETURN VALUE") {
|
||||
elsif($word eq "%AVAILABILITY%") {
|
||||
if($addedin ne "n/a") {
|
||||
# insert the generated AVAILABILITY section before RETURN VALUE
|
||||
# insert the generated AVAILABILITY section
|
||||
push @desc, ".SH AVAILABILITY\n";
|
||||
push @desc, "Added in curl $addedin\n";
|
||||
}
|
||||
$header = 1;
|
||||
next;
|
||||
}
|
||||
push @desc, ".SH $word\n";
|
||||
$header = 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue