diff: w3 updates.

Tyson Dowd trd at cs.mu.OZ.AU
Fri Sep 4 16:50:09 AEST 1998


Hi,

Peter, please check over this for me.
It is committed.

===================================================================

Estimated hours taken: 2

Improve the w3 module in various ways.

Makefile:
Makefile.common:
include/download.inc:
	Small update about Debian package.

include/functions.inc:
include/index.inc:
include/latest_news.inc:
include/news.inc:
include/old_news.inc:
include/template.inc:
news/newsdb.inc:
	New news handling facility.

information/Makefile:
information/notes/Mmakefile:
	Fix a few problems with having nested cvs directories.



Index: Makefile
===================================================================
RCS file: /home/mercury1/repository/w3/Makefile,v
retrieving revision 1.2
diff -u -r1.2 Makefile
--- Makefile	1998/09/03 06:35:46	1.2
+++ Makefile	1998/09/04 05:48:49
@@ -16,8 +16,8 @@
 #-----------------------------------------------------------------------------#
 
 target: all
-index.html: latest_news.inc
-news.html: latest_news.inc old_news.inc
+index.html: latest_news.inc newsdb.inc
+news.html: latest_news.inc newsdb.inc
 
 install: local_install
 
Index: Makefile.common
===================================================================
RCS file: /home/mercury1/repository/w3/Makefile.common,v
retrieving revision 1.2
diff -u -r1.2 Makefile.common
--- Makefile.common	1998/09/04 05:01:37	1.2
+++ Makefile.common	1998/09/04 06:45:55
@@ -10,8 +10,9 @@
 
 vpath %.inc ./include
 vpath %.inc $(ROOT)/include
+vpath %.inc $(ROOT)/news
 
-$(HTML): %.html: %.php3 %.inc menubar.inc template.inc
+$(HTML): %.html: %.php3 %.inc menubar.inc template.inc functions.inc
 
 #-----------------------------------------------------------------------------#
 
Index: include/download.inc
===================================================================
RCS file: /home/mercury1/repository/w3/include/download.inc,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 download.inc
--- download.inc	1998/09/01 02:41:06	1.1.1.1
+++ download.inc	1998/09/04 05:02:27
@@ -21,14 +21,8 @@
         Old releases of the Mercury system</a>
 </ul>
 
-If you are using Debian GNU/Linux on an x86 processor, the previous
-release of Mercury, namely Mercury 0.6.2, is available
-as a Debian package as part of Debian 1.3.  Thanks to Milan Zamazal
-(pdm at fi.muni.cz) for preparing this package.  You can download it from
-any of the Debian mirrors - see the <a
-href="http://www.debian.org">Debian
-Web Site</a> for more information on Debian.  Some technical information
-on this package is available with the <a href="download/old-release.html">
-old releases</a> information. 
-If you have a libc6 based system, Mercury 0.7.3 is now available as a
-Debian package.
+Mercury 0.7.3 shipped with Debian GNU/Linux 2.0 for the x86
+architecture.  You can download it from any of the Debian mirrors -
+see the <a href="http://www.debian.org">Debian Web Site</a> for more
+information on Debian.
+
Index: include/functions.inc
===================================================================
RCS file: functions.inc
diff -N functions.inc
--- /dev/null	Wed May 28 10:49:58 1997
+++ functions.inc	Fri Sep  4 16:07:21 1998
@@ -0,0 +1,14 @@
+<?
+function newsitem($date, $item) {
+	echo "<tr>";
+	list($day, $month, $year) = split(" ",$date);
+
+	echo "<td valign=top><tt>[";
+	printf("%02d $month $year", $day);
+	echo "]</tt></td>";
+
+	echo "<td><strong>";
+	echo $item;
+	echo "</strong></td></tr>";
+}
+?>
Index: include/index.inc
===================================================================
RCS file: /home/mercury1/repository/w3/include/index.inc,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 index.inc
--- index.inc	1998/09/01 02:41:06	1.1.1.1
+++ index.inc	1998/09/04 05:02:27
@@ -2,6 +2,9 @@
     include "$root/include/whatis.inc";
 ?>
 <h3>Latest News</h3>
+
+<table>
 <?
     include "$root/include/latest_news.inc";
 ?>
+</table>
Index: include/latest_news.inc
===================================================================
RCS file: /home/mercury1/repository/w3/include/latest_news.inc,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 latest_news.inc
--- latest_news.inc	1998/09/01 02:41:05	1.1.1.1
+++ latest_news.inc	1998/09/04 05:43:38
@@ -1,4 +1,15 @@
-[Aug 26 1998] Mercury 0.8 due for release in September.<BR>
-[Jul 9 1998]  Preliminary support for existential types added.<BR>
-[Jul 1 1998]  Mercury has been ported to the Linux/PPC.<BR>
-[Jul 1 1998]  Beta version of a native trace based debugger implemented.
+<? 
+
+include "$root/news/newsdb.inc";
+
+$i = 0;
+
+while ( (list($date, $newsitem) = each($newsdb)) && $i < 5 ) {
+	$i++;
+	newsitem($date, $newsitem);
+}
+
+?>
+
+
+
Index: include/news.inc
===================================================================
RCS file: /home/mercury1/repository/w3/include/news.inc,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 news.inc
--- news.inc	1998/09/01 02:41:05	1.1.1.1
+++ news.inc	1998/09/04 06:04:16
@@ -5,10 +5,14 @@
 
 <P>
 
-<?
-    include "$root/include/latest_news.inc";
+<table>
+<? 
+
+include "$root/news/newsdb.inc";
+
+while ( (list($date, $newsitem) = each($newsdb))) {
+	newsitem($date, $newsitem);
+}
+
 ?>
-<BR>
-<?
-    include "$root/include/old_news.inc";
-?>
+</table>
Index: include/old_news.inc
===================================================================
RCS file: old_news.inc
diff -N old_news.inc
--- /tmp/cvs11654gaa	Fri Sep  4 16:48:18 1998
+++ /dev/null	Wed May 28 10:49:58 1997
@@ -1,13 +0,0 @@
-[Feb 1 1998] Mercury 0.7.3 has been ported to glibc for debian.<BR>
-[Nov 1 1997] <A HREF="download/release-0.7.html">Mercury 0.7.3 released.</A><BR>
-[Oct 13 1997] <A HREF="download/release-0.7.html">Mercury 0.7.2 released.</A>
-    <BR>
-[Aug 15 1997] <A HREF="download/release-0.7.html">Mercury 0.7 released.</A><BR>
-[Jan 14 1997] <A HREF="download/release-0.6.html">Mercury 0.6.2 released.</A>
-    <BR>
-[Aug 26 1996] <A HREF="download/release-0.6.html">Mercury 0.6.1 released.</A>
-    <BR>
-[Aug 2 1996] <A HREF="download/release-0.6.html">Mercury 0.6 released.</A><BR>
-[Feb 15 1996] <A HREF="download/release-0.5.html">Mercury 0.5 released.</A><BR>
-[Sep 15 1995] <A HREF="download/release-0.4.html">Mercury 0.4 released.</A><BR>
-[Jul 18 1995] <A HREF="download/release-0.3.html">Mercury 0.3 released.</A><BR>
Index: include/template.inc
===================================================================
RCS file: /home/mercury1/repository/w3/include/template.inc,v
retrieving revision 1.3
diff -u -r1.3 template.inc
--- template.inc	1998/09/04 05:43:12	1.3
+++ template.inc	1998/09/04 06:12:08
@@ -1,3 +1,5 @@
+<?  include "$root/include/functions.inc" ?>
+
 <TITLE>The Mercury Project: <?echo $title?></TITLE>
 <BODY bgcolor="#ABCDEF" text="#000000">
 
Index: information/Makefile
===================================================================
RCS file: /home/mercury1/repository/w3/information/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- Makefile	1998/09/04 05:01:47	1.3
+++ Makefile	1998/09/04 06:31:57
@@ -14,18 +14,17 @@
 
 local:
 	[ -d doc ] || mkdir doc
-	[ ! -d mercury ] || (cvs update mercury/doc;	\
-		cvs update mercury/library;		\
-		cvs update mercury/compiler/notes)
-	[ -d mercury ] || (cvs checkout mercury/doc;	\
-		cvs checkout mercury/library;		\
-		cvs checkout mercury/compiler/notes)
-	echo "LIBRARY_DIR=`pwd`/mercury/library"  > mercury/Mmake.common
-	(cd mercury/compiler/notes; mmake)
-	(cd mercury/doc; mmake library-chapters.texi split_html ps)
-	cp -a mercury/compiler/notes/*.text doc
-	cp -a mercury/doc/*.html mercury/compiler/notes/*.html doc
-	cp -a mercury/doc/*.ps doc
+	[ ! -d mercury ] || (cvs update mercury-doc)
+	[ -d mercury-doc ] || (cvs checkout -d mercury-doc mercury/doc)
+	[ -d library ] || (cvs checkout -d library mercury/library)
+	[ -d notes ] || \
+		(cvs checkout -d notes mercury/compiler/notes)
+	echo "LIBRARY_DIR=`pwd`/library"  > Mmake.common
+	(cd notes; mmake MERCURY_DIR=.. )
+	(cd mercury-doc; mmake library-chapters.texi split_html ps)
+	cp -a notes/*.text doc
+	cp -a mercury-doc/*.html notes/*.html doc
+	cp -a mercury-doc/*.ps doc
 	(cd doc; gzip -f -9 *.ps)
 
 local_install: target
@@ -37,6 +36,5 @@
 
 local_clean:
 	-rm -rf doc
-	-rm -rf mercury
 
 include ../Makefile.common
Index: information/notes/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/notes/Mmakefile,v
retrieving revision 1.6
diff -u -r1.6 Mmakefile
--- Mmakefile	1997/07/27 15:05:30	1.6
+++ Mmakefile	1998/09/04 06:33:48
@@ -34,6 +34,9 @@
 
 #-----------------------------------------------------------------------------#
 
+.PHONY: all
+all: $(DOCS_ALL)
+
 # This install is for installing the Mercury webpage, which goes to
 # a different directory (supplied by the environment variable
 # INSTALL_WEBDIR).
Index: news/newsdb.inc
===================================================================
RCS file: newsdb.inc
diff -N newsdb.inc
--- /dev/null	Wed May 28 10:49:58 1997
+++ newsdb.inc	Fri Sep  4 16:01:12 1998
@@ -0,0 +1,57 @@
+<?
+
+/* 
+** This is the news database.
+**
+** Add new items at the top in chronological order.
+** Make sure you put a comma between each item, and an arrow
+** between the date and the news.
+*/
+
+$newsdb = array(
+
+	"1 Sep 1998" => 
+"Mercury 0.8 due for release during September.",
+
+	"4 Aug 1998" => 
+"Mmake has been extended to support setting flags on a per-file basis,
+and will now warn about variables which are defined but not used.",
+
+	"9 Jul 1998" =>
+"Preliminary support for existential types has been added to Mercury.",
+
+	"1 Feb 1998" =>
+"Mercury 0.7.3 has been ported to glibc for Debian GNU/Linux.",
+
+	"1 Nov 1997" =>
+"<A HREF=\"download/release-0.7.html\">Mercury 0.7.3 released.</A>",
+
+	"13 Oct 1997" =>
+"<A HREF=\"download/release-0.7.html\">Mercury 0.7.2 released.</A>",
+
+	"15 Aug 1997" =>
+"<A HREF=\"download/release-0.7.html\">Mercury 0.7 released.</A>",
+
+	"14 Jan 1997" =>
+"<A HREF=\"download/release-0.6.html\">Mercury 0.6.2 released.</A>",
+
+	"26 Aug 1996" =>
+"<A HREF=\"download/release-0.6.html\">Mercury 0.6.1 released.</A>",
+
+	"2 Aug 1996" =>
+"<A HREF=\"download/release-0.6.html\">Mercury 0.6 released.</A>",
+
+	"15 Feb 1996" =>
+"<A HREF=\"download/release-0.5.html\">Mercury 0.5 released.</A>",
+
+	"15 Sep 1995" =>
+"<A HREF=\"download/release-0.4.html\">Mercury 0.4 released.</A>",
+
+	"18 Jul 1995" =>
+"<A HREF=\"download/release-0.3.html\">Mercury 0.3 released.</A>"
+
+);
+
+?>
+
+


-- 
       Tyson Dowd           # There isn't any reason why Linux can't be
                            # implemented as an enterprise computing solution.
     trd at cs.mu.oz.au        # Find out what you've been missing while you've
http://www.cs.mu.oz.au/~trd # been rebooting Windows NT. -- InfoWorld, 1998.



More information about the developers mailing list