Skip to content

Commit

Permalink
libcurl/c: generate changelog links on curl version numbers
Browse files Browse the repository at this point in the history
In manpage renders
  • Loading branch information
bagder committed Sep 10, 2024
1 parent 8728983 commit 07b1f11
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion libcurl/c/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ MANPARTS = $(MAINPARTS)

MAN2HTMLBASIC = roffit --bare --mandir=$(MANROOT) --mandir=$(OPTMAN) --mandir=$(DOCROOT)
# postprocess the roffit HTML to add links to curl error codes
MAN2HTML= ( $(MAN2HTMLBASIC) | perl -0x20 -pe '/(CURL(E|M|SHE|UE)_\w*)/; $$err=$$erra=$$1; $$erra =~ s/_//g; s@CURL(E|M|SHE|UE)_\w*@<a href="libcurl-errors.html\#$$erra">$$err</a>@;' -e 's/\*/\&\#x2a;/g;' -e 's/(([78])\.(\d+)\.(\d+))/<a href="\/changes.html\#$$2_$$3_$$4">$$1<\/a>/g' | perl curlopt2href.pl)
MAN2HTML= ( $(MAN2HTMLBASIC) | perl -0x20 -pe '/(CURL(E|M|SHE|UE)_\w*)/; $$err=$$erra=$$1; $$erra =~ s/_//g; s@CURL(E|M|SHE|UE)_\w*@<a href="libcurl-errors.html\#$$erra">$$err</a>@;' -e 's/\*/\&\#x2a;/g;' | perl curlopt2href.pl)

# generated by mkexam.pl, assigns the EXAMPLES variable
include Makefile.exhtml
Expand Down
1 change: 1 addition & 0 deletions libcurl/c/curlopt2href.pl
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
$_ =~ s/([^\">\/]|^)(curl_(url|ws|pushheader|global|version|slist|share|mime|easy|curl|multi)_[a-z_]*)(\()/$1<a href="$2.html">$2<\/a>$4/g;
$_ =~ s/([^\">\/]|^)(curl_(url|getenv|strequal|strnequal|getdate|formfree|formadd|formget|free|escape|unescape|version|mprintf))(\()/$1<a href="$2.html">$2<\/a>$4/g;
$_ =~ s/([^\">\/]|^)(curl_(mfprintf|msprintf|msnprintf|mvprintf|mvfprintf|mvsprintf|mvsnprintf|maprintf|mvaprintf))(\()/$1<a href="curl_mprintf.html">$2<\/a>$4/g;
$_ =~ s/([78]\.\d+[.0-9]*)/<a href="\/ch\/$1.html">$1<\/a>$2/g;
print $_;
}

Expand Down

0 comments on commit 07b1f11

Please sign in to comment.