bagder: curl-www/libcurl/c Makefile, 1.47, 1.48 _example.html, 1.14, 1.15 mkexam.pl, 1.1, 1.2
[email protected] Thu, 10 Sep 2009 08:03:36 +0000
| Newsgroups | gmane.comp.web.curl.www.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/curl/curl-www/libcurl/c
In directory labb:/tmp/cvs-serv2489
Modified Files:
Makefile _example.html mkexam.pl
Log Message:
autmatic link to all existing examples from the example front page
Index: Makefile
===================================================================
RCS file: /cvsroot/curl/curl-www/libcurl/c/Makefile,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- Makefile 8 Sep 2009 22:39:20 -0000 1.47
+++ Makefile 10 Sep 2009 08:03:34 -0000 1.48
@@ -51,9 +51,12 @@
index.html: _index.html $(MAINPARTS)
$(ACTION)
-example.html: _example.html $(MAINPARTS)
+example.html: _example.html $(MAINPARTS) allex.t
$(ACTION)
+allex.t:
+ perl mkexam.pl
+
allfuncs.html: _allfuncs.html $(MAINPARTS)
$(ACTION)
Index: mkexam.pl
===================================================================
RCS file: /cvsroot/curl/curl-www/libcurl/c/mkexam.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- mkexam.pl 8 Sep 2009 22:39:20 -0000 1.1
+++ mkexam.pl 10 Sep 2009 08:03:34 -0000 1.2
@@ -10,6 +10,7 @@
my @mak;
my @htmlfiles;
+my @basefiles;
for my $f (@samps) {
my $base = $f;
@@ -61,6 +62,7 @@
close(CMD);
push @htmlfiles, $htmlfile;
+ push @basefiles, $base;
push @mak, "$htmlfile: $rawfile \$(MAINPARTS)\n\t\$(ACTION)\n\n";
@@ -78,3 +80,11 @@
open(MAK, ">Makefile.examples");
print MAK @mak;
close(MAK);
+
+open(EX, ">allex.t");
+for my $b (sort @basefiles) {
+ printf EX "<a href=\"%s.html\">%s.c</a><br>", $b, $b;
+}
+print EX "\n";
+close(EX);
+
Index: _example.html
===================================================================
RCS file: /cvsroot/curl/curl-www/libcurl/c/_example.html,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- _example.html 8 Sep 2009 22:39:20 -0000 1.14
+++ _example.html 10 Sep 2009 08:03:34 -0000 1.15
@@ -14,6 +14,7 @@
WHERE3(libcurl, "/libcurl/", C API index, "/libcurl/c/", Example Source Codes)
TITLE(libcurl - small example snippets)
+<table><tr valign="top"><td>
<p>
We're trying to gather example source codes here, that show how to write
programs using the libcurl interface. Feel encouraged to submit yours!
@@ -125,6 +126,12 @@
You'll also find these examples in the distribution archive, in the
<b>docs/examples directory</b>.
+</td><td>
+SUBTITLE(All Examples)
+
+#include "allex.t"
+</td></tr></table>
+
#include "_footer.html"
</BODY>