# V=--verbose for verbose tests.
# This can be overridden on cmdline to generate pages elsewhere.
-WEBDIR=webpages/
+WEBDIR=~/www/html/ccan/
CFLAGS=-g -Wall -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Werror -Iccan -I.
rm -f $(ALL_DEPENDS)
rm -rf $(WEBDIR)
-webpages: $(WEB_SUBDIRS) $(WEBDIR)/junkcode $(ALL_PAGES) $(WEBDIR)/list.html $(WEBDIR)/index.html $(WEBDIR)/upload.html $(WEBDIR)/example-config.h $(WEBDIR)/ccan.jpg $(DIRECT_TARBALLS) $(DEPEND_TARBALLS) $(WEBDIR)/ccan.tar.bz2 $(WEBDIR)/Makefile-ccan
+webpages: $(WEB_SUBDIRS) $(WEBDIR)/junkcode $(ALL_PAGES) $(WEBDIR)/list.html $(WEBDIR)/index.html $(WEBDIR)/upload.html $(WEBDIR)/uploader.php $(WEBDIR)/example-config.h $(WEBDIR)/ccan.jpg $(DIRECT_TARBALLS) $(DEPEND_TARBALLS) $(WEBDIR)/ccan.tar.bz2 $(WEBDIR)/Makefile-ccan
$(WEB_SUBDIRS):
mkdir -p $@
$(WEBDIR)/upload.html: web/staticupload.php
php5 web/staticupload.php > $@
+# cpp inserts gratuitous linebreaks at start of file, makes for php problems.
+$(WEBDIR)/uploader.php: web/uploader.php.cpp
+ cpp -w -C -P $< | grep . > $@
+
$(WEBDIR)/index.html: web/staticindex.php
php5 web/staticindex.php > $@
<?php
-session_start();
// Pages created in subdirs need ../ appended.
$url_prefix = getenv("URLPREFIX");
?>
<img src="<?=$url_prefix?>ccan.jpg" width="250" height="80">
</th>
<th>
- <h1>Comprehensive C Archieve Network <h1>
+ <h1>Comprehensive C Archive Network <h1>
</th>
</tr>
</table>
<?php
-session_start();
// Pages created in subdirs need ../ appended.
$url_prefix = getenv("URLPREFIX");
?>
return htmlspecialchars(shell_exec('tools/doc_extract '.$field.' '.$module.'/_info.c'));
}
-# Convert double line breaks into paragraphs, and blank spaces into preformat.
+// Convert double line breaks into paragraphs, and blank spaces into preformat.
function htmlize_field($field,$module)
{
$state="inpara";
+++ /dev/null
-<?php
-session_start();
-include('logo.html');
-include('menulist.html');
-include('static-configuration');
-
-// We just email notification for now. Auto-analysis RSN.
-if ($_FILES["uploadedfile"]["error"] > 0) {
- echo "Error: " . $_FILES["uploadedfile"]["error"] . "<br />";
- exit();
-}
-
-$dest = tempnam($tempfolder, "upload-");
-move_uploaded_file($_FILES["uploadedfile"]["tmp_name"], $dest);
-
-$subject = "CCAN: code upload by '" . $_POST['email'] . "' with name " . $_FILES["uploadedfile"]["name"];
-$message = "File type: ".$_FILES["uploadedfile"]["type"]."\n".
- "Size: ".$_FILES["uploadedfile"]["size"]."\n".
- "Claimed email: ".$_POST['email']."\n".
- "File destination: ".$dest."\n";
-
-mail($ccanadmin, $subject, $message, "From: $frommail");
-echo "<div align=\"center\"> Thanks!<br>Stored to temporary location.
- Mail will be send to admin to get verification of the code.<//div>";
-?>
--- /dev/null
+<?php
+session_start();
+?>
+#include "logo.html"
+#include "menulist.html"
+#include "static-configuration"
+<?php
+
+// We just email notification for now. Auto-analysis RSN.
+if ($_FILES["uploadedfile"]["error"] > 0) {
+ echo "Error: " . $_FILES["uploadedfile"]["error"] . "<br />";
+ exit();
+}
+
+$dest = tempnam($tempfolder, "upload-");
+move_uploaded_file($_FILES["uploadedfile"]["tmp_name"], $dest);
+
+$subject = "CCAN: code upload by '" . $_POST['email'] . "' with name " . $_FILES["uploadedfile"]["name"];
+$message = "File type: ".$_FILES["uploadedfile"]["type"]."\n".
+ "Size: ".$_FILES["uploadedfile"]["size"]."\n".
+ "Claimed email: ".$_POST['email']."\n".
+ "File destination: ".$dest."\n";
+
+mail($ccanadmin, $subject, $message, "From: $frommail");
+echo "<div align=\"center\"> Thanks!<br>
+ Mail will be send to admin to publish the code.<//div>";
+?>