Mercurial > hgrepos > Python2 > PyMuPDF
comparison mupdf-source/thirdparty/curl/docs/examples/adddocsref.pl @ 2:b50eed0cc0ef upstream
ADD: MuPDF v1.26.7: the MuPDF source as downloaded by a default build of PyMuPDF 1.26.4.
The directory name has changed: no version number in the expanded directory now.
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Mon, 15 Sep 2025 11:43:07 +0200 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 1:1d09e1dec1d9 | 2:b50eed0cc0ef |
|---|---|
| 1 #!/usr/bin/env perl | |
| 2 | |
| 3 # pass files as argument(s) | |
| 4 | |
| 5 my $docroot="https://curl.haxx.se/libcurl/c"; | |
| 6 | |
| 7 for $f (@ARGV) { | |
| 8 open(NEW, ">$f.new"); | |
| 9 open(F, "<$f"); | |
| 10 while(<F>) { | |
| 11 my $l = $_; | |
| 12 if($l =~ /\/* $docroot/) { | |
| 13 # just ignore preciously added refs | |
| 14 } | |
| 15 elsif($l =~ /^( *).*curl_easy_setopt\([^,]*, *([^ ,]*) *,/) { | |
| 16 my ($prefix, $anc) = ($1, $2); | |
| 17 $anc =~ s/_//g; | |
| 18 print NEW "$prefix/* $docroot/curl_easy_setopt.html#$anc */\n"; | |
| 19 print NEW $l; | |
| 20 } | |
| 21 elsif($l =~ /^( *).*(curl_([^\(]*))\(/) { | |
| 22 my ($prefix, $func) = ($1, $2); | |
| 23 print NEW "$prefix/* $docroot/$func.html */\n"; | |
| 24 print NEW $l; | |
| 25 } | |
| 26 else { | |
| 27 print NEW $l; | |
| 28 } | |
| 29 } | |
| 30 close(F); | |
| 31 close(NEW); | |
| 32 | |
| 33 system("mv $f $f.org"); | |
| 34 system("mv $f.new $f"); | |
| 35 } |
