diff --git a/libcurl/c/Makefile b/libcurl/c/Makefile index 48127a458..59cc75e04 100644 --- a/libcurl/c/Makefile +++ b/libcurl/c/Makefile @@ -203,9 +203,12 @@ allex.gen: $(DOCROOT)/examples/Makefile.inc _example-templ.html allex-desc.gen: perl mkexam.pl -allfuncs.html: _allfuncs.html $(MAINPARTS) +allfuncs.html: _allfuncs.html allfunc.gen $(MAINPARTS) $(ACTION) +allfunc.gen: mkallfunc.pl $(MANROOT)/Makefile + ./mkallfunc.pl $(MANROOT) > allfunc.gen + curl_easy_init.html: _curl_easy_init.html $(MAINPARTS_CAPI) curl_easy_init.gen $(REN)$(MANACTION) curl_easy_init.gen: $(MANROOT)/curl_easy_init.3 curlopt2href.pl diff --git a/libcurl/c/_allfuncs.html b/libcurl/c/_allfuncs.html index 124e2a04c..44f4404f1 100644 --- a/libcurl/c/_allfuncs.html +++ b/libcurl/c/_allfuncs.html @@ -13,100 +13,10 @@ WHERE3(libcurl, "/libcurl/", API, "/libcurl/c/", All Functions) -TITLE(All functions listed in alphabetical order) +TITLE(All libcurl functions in alphabetical order)

-curl_easy_cleanup -
curl_easy_duphandle -
curl_easy_escape -
curl_easy_getinfo -
curl_easy_header -
curl_easy_init -
curl_easy_nextheader -
curl_easy_option_by_id -
curl_easy_option_by_name -
curl_easy_option_next -
curl_easy_pause -
curl_easy_perform -
curl_easy_recv -
curl_easy_reset -
curl_easy_send -
curl_easy_setopt -
curl_easy_strerror -
curl_easy_unescape -
curl_easy_upkeep -
curl_formadd -
curl_formfree -
curl_formget -
curl_free -
curl_getdate -
curl_global_cleanup -
curl_global_init -
curl_global_init_mem -
curl_global_sslset -
curl_global_trace -
curl_mime_addpart -
curl_mime_data -
curl_mime_data_cb -
curl_mime_encoder -
curl_mime_filedata -
curl_mime_filename -
curl_mime_free -
curl_mime_headers -
curl_mime_init -
curl_mime_name -
curl_mime_subparts -
curl_mime_type -
curl_multi_add_handle -
curl_multi_assign -
curl_multi_cleanup -
curl_multi_fdset -
curl_multi_get_handles -
curl_multi_info_read -
curl_multi_init -
curl_multi_perform -
curl_multi_remove_handle -
curl_multi_setopt -
curl_multi_socket_action -
curl_multi_strerror -
curl_multi_timeout -
curl_multi_poll -
curl_multi_wait -
curl_multi_waitfds -
curl_multi_wakeup -
curl_pushheader_byname -
curl_pushheader_bynum -
curl_share_cleanup -
curl_share_init -
curl_share_setopt -
curl_share_strerror -
curl_slist_append -
curl_slist_free_all -
curl_url -
curl_url_cleanup -
curl_url_dup -
curl_url_get -
curl_url_set -
curl_url_strerror -
curl_version -
curl_version_info -
curl_ws_recv -
curl_ws_send -
curl_ws_meta - -SUBTITLE(Deprecated ones) -

- Do not use these functions in new programs. They are subject for removal in - a future libcurl release. -

-curl_escape -
curl_getenv -
curl_mprintf -
curl_multi_socket -
curl_multi_socket_all -
curl_strequal -
curl_strnequal -
curl_unescape - +#include "allfunc.gen" + #include "_footer.html" diff --git a/libcurl/c/mkallfunc.pl b/libcurl/c/mkallfunc.pl new file mode 100755 index 000000000..4f1f8ceda --- /dev/null +++ b/libcurl/c/mkallfunc.pl @@ -0,0 +1,65 @@ +#!/usr/bin/perl + +my $docsdir = $ARGV[0]; + +opendir(my $dh, $docsdir) || die "Can't opendir $some_dir: $!"; +my @manp = grep { /^curl_.*\.md/ } readdir($dh); +closedir $dh; + +my %func; +my %file; + +sub htmlver { + my ($f)=@_; + $f =~ s/\.md/.html/; + $f =~ s/^.*\///; + return $f; +} + +sub manpage { + my ($file)=@_; + open(P, "<$file"); + my $name = 0; + my @f; + while(

) { + my $l = $_; + chomp $l; + if(/^# NAME/) { + $name = 1; + } + elsif(/^#/ && $name) { + last; + } + elsif($name) { + my $desc; + if($l =~ /(.*) - (.*)/) { + $desc = $2; + $l = $1; + } + for(split(/, */, $l)) { + push @f, $_; + } + if($desc) { + for(@f) { + $func{$_} = $desc; + $file{$_} = htmlver($file); + } + } + } + } +} + + +for my $d (@manp) { + manpage("$docsdir/$d"); +} + +print "\n"; +my $even = 0; +for my $f (sort keys %func) { + printf "\n", + $even ? "even" : "odd", + $file{$f}, $f, $func{$f}; + $even ^= 1; +} +print "
%s%s
\n";