updates.
authorPekka Riikonen <priikone@silcnet.org>
Tue, 12 Feb 2002 17:44:06 +0000 (17:44 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Tue, 12 Feb 2002 17:44:06 +0000 (17:44 +0000)
lib/doc/INDEX.tmpl [new file with mode: 0644]
lib/doc/LIBINDEX [moved from lib/LIBINDEX with 90% similarity]
lib/doc/intro_reference.html
lib/doc/silcexample.h [moved from lib/doc/silc_example.h with 100% similarity]
scripts/silcdoc/gen.sh
scripts/silcdoc/gen_html_index.php [deleted file]
scripts/silcdoc/gen_index.php
scripts/silcdoc/silcdoc

diff --git a/lib/doc/INDEX.tmpl b/lib/doc/INDEX.tmpl
new file mode 100644 (file)
index 0000000..77a7f9e
--- /dev/null
@@ -0,0 +1,16 @@
+<!-- Template file for the big index that appears in the Toolkit reference
+manual on the left side.  With this file it is possible to add other than
+automatically generated links to that list. -->
+
+<a href="index.html"><img src="box.gif" border="0" alt="">SILC Toolkit Reference Manual</a><br />
+
+@BODY@
+
+<br />
+<b>Resource Links</b>
+<br />
+<a href="http://silcnet.org"><img src="box.gif" border="0" alt="">SILC Project Website</a><br />
+<a href="http://silcnet.org/?page=docs"><img src="box.gif" border="0" alt="">SILC Protocol Documentation</a><br />
+<a href="http://silcnet.org/?page=whitepaper"><img src="box.gif" border="0" alt="">SILC White Paper</a><br />
+<a href="http://silcnet.org/?page=faq"><img src="box.gif" border="0" alt="">SILC FAQ</a><br />
+
similarity index 90%
rename from lib/LIBINDEX
rename to lib/doc/LIBINDEX
index 9a6aa86b158bba4359e1327b4db80bffb3c8d084..cf12bfa0492a91778d5dbc578ed0f08efc177262 100644 (file)
@@ -10,7 +10,7 @@ Version: @VERSION@<br />
 Copyright &copy; 2001 - 2002 The SILC Project<br />
 Updated: @DATE@
 </small>
-<br /><br /><br /><br />
+<br /><br /><br />
 Welcome to the SILC Toolkit Reference Manual.  The manual is a complete
 developer guide and reference for the SILC application programmer.  The manual
 is intended for application programmers who would like to integrate the SILC
@@ -23,16 +23,18 @@ create new SILC client applications.
 The application programming interfaces are automatically generated from the
 Toolkit sources, and the documentation is constantly evolving.  New versions
 of the Toolkit always delivers the latest version of this reference manual.
-<br /><br />
 
+<br /><br /><br />
+<li><a href="intro_reference.html">Introduction to the Manual</a><br />
 @BODY@
 
-<br /><br />
+<br /><br /><br />
 <b>Resource Links</b>
 <br /><br />
 Please refer to these outside links for more information about the SILC 
 project and SILC Protocol.
-<br /><br />
+
+<br /><br /><br />
 <li><a href="http://silcnet.org">SILC Project Website</a><br />
 <li><a href="http://silcnet.org/?page=docs">SILC Protocol Documentation</a><br />
 <li><a href="http://silcnet.org/?page=whitepaper">SILC White Paper</a><br />
index bb78cd4727a737af26254acaeb3953d988c04fda..c5f9681e83bf674618da90a2d45d0dc5566f4e11 100644 (file)
@@ -1,11 +1,9 @@
 <big><b>Introduction to the Manual</b></big>
 <br />&nbsp;<br />
 
-The SILC Toolkit reference manual is a fairly large set of documents.  The
-manual includes hundreds of individual document files totalling more than
-7 MB of content space.  This document is designed to help you understand
-how the reference manual is organized, how it can be used efficiently, and
-how to find the information you need.
+This document is designed to help you understand how the reference manual is
+organized, how it can be used efficiently, and how to find the information
+you need.
 
 <br />&nbsp;<br />&nbsp;<br />
 <b>Target Audience</b>
@@ -127,5 +125,5 @@ include all of these informations.
 
 <br />&nbsp;<br />
 Please refer to this link for short example of the API item reference 
-layout: <a href="silc_example.html">SILC Example API</a>.
+layout: <a href="silcexample.html">SILC Example API</a>.
 
similarity index 100%
rename from lib/doc/silc_example.h
rename to lib/doc/silcexample.h
index 7b5b0158f94ffa92fdeecd61d65b36bb373459cc..c09c9af2859360d42ddb402dac3883e9566d73de 100755 (executable)
@@ -1,8 +1,8 @@
 #!/bin/sh
 
 cat << EOF > tmp.php
-<?php \$page="$3"; \$dest="$1"; require "$2"; ?>
+<?php \$page="$4"; \$dest="$1"; \$type="$3"; require "$2"; ?>
 EOF
-php -f tmp.php >$4.tmp
-mv $4.tmp $4
+php -f tmp.php >$5.tmp
+mv $5.tmp $5
 rm -f tmp.php
diff --git a/scripts/silcdoc/gen_html_index.php b/scripts/silcdoc/gen_html_index.php
deleted file mode 100644 (file)
index 869936e..0000000
+++ /dev/null
@@ -1,112 +0,0 @@
-<?php
-/*
-
-  Author: Pekka Riikonen <priikone@silcnet.org>
-
-  Copyright (C) 2002 Pekka Riikonen
-
-  This program is free software; you can redistribute it and/or modify
-  it under the terms of the GNU General Public License as published by
-  the Free Software Foundation; either version 2 of the License, or
-  (at your option) any later version.
-
-  This program is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
-
-*/
-?>
-
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-a" />
- <meta http-equiv="Content-Language" content="en" />
- <meta name="description" content="SILC Secure Internet Live Conferencing" />
- <meta name="keywords" content="SILC, secure, chat, protocol, cipher, encrypt, SKE" />
- <meta content="INDEX, FOLLOW" name="ROBOTS" />
- <style type="text/css">
-  <!--
-  body { color: #000000; background: #ffffff; font-family: Helvetica, Arial, Sans-serif; }
-  a:link { text-decoration: none; color: #2f488f; }
-  a:visited { text-decoration: none;color: #2f488f; }
-  a:active { text-decoration: none; color: #2f488f; }
-  -->
- </style>
-</head>
-
-<body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0">
-
-<table border="0" cellspacing="0" cellpadding="6" width="100%">
- <tr valign="top" bgcolor="#dddddd">
-  <td><small>Copyright &copy; 2001 - 2002 SILC Project<br />
-    <a href="http://silcnet.org">SILC Project Website</a></small></td>
-  <td align="right"><small>
-   <a href="index.html">SILC Toolkit Reference Manual</a><br />
-   </small></td>
- </tr>
-</table>
-<table border="0" cellspacing="0" cellpadding="0" width="100%">
-<tr bgcolor="#444444"><td><img src="space.gif" width="1" height="1"border="0" alt="" ></td></tr>
-</table>
-
-<table cellpadding="0" cellspacing="0" border="0">
- <tr valign="top">
-
-  <td width="230" bgcolor="#f0f0f0">
-   <table width="100%" cellpadding="2" cellspacing="2" border="0">
-    <tr valign="top"><td>
-<br />
-<small>
-<?php
-require "$dest/index.tmpl";
-?>
-</small>
-<br /><br /><br /><br />
-    </td></tr>
-   </table>
-  </td>
-
-  <td bgcolor="#cccccc" background="dot.gif">
-    <img src="space.gif" width="1" height="1" border="0" alt=""></td>
-
-  <td width="800">
-   <table cellpadding="2" cellspacing="6" width="100%">
-    <tr><td valign="top">
-<br />
-<?php
-require "$page";
-?>
-<br /><br /><br /><br />
-    </td></tr>
-   </table>
-  </td>
-
-  <td bgcolor="#cccccc" background="dot.gif">
-    <img src="space.gif" width="1" height="1" border="0" alt=""></td>
-
-  <td width="200" bgcolor="#f0f0f0">
-    <table width="100%" cellpadding="4" cellspacing="0">
-    <tr valign="top"><td>
-<br /><br /><br /><br /><br />
-    </td></tr>
-    </table>
-  </td>
-</tr>
-</table>
-
-<table border="0" cellspacing="0" cellpadding="0" width="100%">
-<tr bgcolor="#444444"><td><img src="space.gif" width="1" height="1"border="0" alt="" ></td></tr>
-</table>
-<table border="0" cellspacing="0" cellpadding="6" width="100%">
- <tr valign="top" bgcolor="#dddddd">
-  <td><small>Copyright &copy; 2001 - 2002 SILC Project<br />
-    <a href="http://silcnet.org">SILC Project Website</a></small></td>
-  <td align="right"><small>
-   <a href="index.html">SILC Toolkit Reference Manual</a><br />
-   </small></td>
- </tr>
-</table>
-
-</body>
-</html>
index 7c147d1ea9af47f90e65cc72300077f31deb5242..4ee117cc21548014b3a7e83e21d7b7df76530c2b 100644 (file)
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.
 
+  type values:
+
+       0 = add left index, details and right index
+       1 = add left index, details, no right index
+       2 = no left index, add details, no right index
 */
 ?>
 
@@ -27,7 +32,7 @@
  <meta content="INDEX, FOLLOW" name="ROBOTS" />
  <style type="text/css">
   <!--
-  body { color: #000000; background: #ffffff; font-family: Helvetica, Arial, Sans-serif; }
+  body { color: #000000; background: #f0f0f0; font-family: Helvetica, Arial, Sans-serif; }
   a:link { text-decoration: none; color: #2f488f; }
   a:visited { text-decoration: none;color: #2f488f; }
   a:active { text-decoration: none; color: #2f488f; }
 <table cellpadding="0" cellspacing="0" border="0">
  <tr valign="top">
 
-  <td width="230" bgcolor="#f0f0f0">
+  <td width="200" bgcolor="#f0f0f0">
+   <img src="space.gif" width="1" height="1" border="0" alt="">
    <table width="100%" cellpadding="2" cellspacing="2" border="0">
     <tr valign="top"><td>
 <br />
 <small>
 <?php
-require "$dest/index.tmpl";
+if ($type != 2)
+  require "$dest/index.tmpl";
 ?>
 </small>
 <br /><br /><br /><br />
@@ -68,9 +75,10 @@ require "$dest/index.tmpl";
   </td>
 
   <td bgcolor="#cccccc" background="dot.gif">
-    <img src="space.gif" width="1" height="1" border="0" alt=""></td>
+   <img src="space.gif" width="1" height="1" border="0" alt=""></td>
 
-  <td width="800">
+  <td width="720" bgcolor="#ffffff">
+   <img src="space.gif" width="1" height="1" border="0" alt="">
    <table cellpadding="2" cellspacing="6" width="100%">
     <tr><td valign="top">
 <br />
@@ -83,18 +91,21 @@ require "$page";
   </td>
 
   <td bgcolor="#cccccc" background="dot.gif">
-    <img src="space.gif" width="1" height="1" border="0" alt=""></td>
+   <img src="space.gif" width="1" height="1" border="0" alt=""></td>
 
-  <td width="200" bgcolor="#f0f0f0">
+  <td width="180" bgcolor="#f0f0f0">
+    <img src="space.gif" width="1" height="1" border="0" alt="">
     <table width="100%" cellpadding="4" cellspacing="0">
     <tr valign="top"><td>
 <br />
 <font face="Helvetica,Arial,Sans-serif" size="1">
 <?php
-/* Get the index for this page */
-$len = strcspn($page, "__");
-$fname = substr($page, 0, $len);
-require "$fname"."__index.tmpl";
+if ($type == 0) {
+  /* Get the index for this page */
+  $len = strcspn($page, "__");
+  $fname = substr($page, 0, $len);
+  require "$fname"."__index.tmpl";
+}
 ?>
 </font>
 
index c9b5cbd48e3fdadef30d964655e2c0fb4c649a17..41c56643bd7ff04324338f30d3232ec1f6d3e02f 100755 (executable)
@@ -52,7 +52,8 @@ if [ "$TYPE" = "HTML" ]; then
   mkdir /tmp/silcdoc_html.html
   cp $headers /tmp/silcdoc.html
 
-  # Generate index template from the DIRECTORY files
+  # Generate index template from the DIRECTORY files. The template for
+  # the generated index template is INDEX.tmpl.
   files=`find $SRC -name "DIRECTORY"`
   for i in $files
   do
@@ -63,30 +64,35 @@ if [ "$TYPE" = "HTML" ]; then
 
     # Generate links to template file that can be included into various
     # places on the webpage.
-    echo "<A HREF="$fname"><IMG SRC="box.gif" border="0" alt="">$name</A><BR>" >>$DST/index.tmpl
+    echo "<a href="$fname"><img src="box.gif" border="0" alt="">$name</a><br />" >>$DST/index.tmpl
     for k in $links
     do
       n=`grep $k $i |cut -d=  -f2 |cut -d:  -f2`
-      echo "<LI><A HREF="$k">$n</A>" >>$DST/$fname.links
-      echo "&nbsp;&nbsp;&nbsp; <A HREF="$k"><IMG SRC="box2.gif" border="0" alt="">$n</A><BR>" >>$DST/index.tmpl
+      echo "<li><a href="$k">$n</a>" >>$DST/$fname.links
+      echo "&nbsp;&nbsp;&nbsp; <a href="$k"><img src="box2.gif" border="0" alt="">$n</a><br />" >>$DST/index.tmpl
     done
   done
+  # Now get the template for the link template, and generate the final index
+  # template file
+  temp=`find $SRC -name "INDEX.tmpl"`
+  sed -e "/@BODY@/ r $DST/index.tmpl" -e s/@BODY@//g $temp >$DST/index.tmpl.tmp
+  mv $DST/index.tmpl.tmp $DST/index.tmpl
 
   # Copy all HTML files to destination
-  htmlfiles=`find $SRC -name "silc*.html"`
+  htmlfiles=`find $SRC -name "*.html"`
   for i in $htmlfiles
   do
     cp $i /tmp/silcdoc_html.html
   done
   path=`pwd`
   cd /tmp/silcdoc_html.html
-  htmlfiles=`find . -name "silc*.html" | cut -d/  -f2`
+  htmlfiles=`find . -name "*.html" | cut -d/  -f2`
   cd $path
   for i in $htmlfiles
   do
     # Generate the details and the layout
     f="/tmp/silcdoc_html.html/$i"
-    sh gen.sh $DST gen_html_index.php $f $f
+    sh gen.sh $DST gen_index.php 1 $f $f
     cp /tmp/silcdoc_html.html/$i $DST
 echo $f
   done
@@ -101,14 +107,13 @@ echo $f
     $ROBO /tmp/silcdoc.html/$i.h $DST/$i.html $TYPE
 
     # Generate the TOC file
-    sh gen.sh $DST gen_toc.php $DST/$i.html $DST/$i.html
-    sh gen.sh $DST gen_html_index.php $DST/$i.html $DST/$i.html
+    sh gen.sh $DST gen_index.php 1 $DST/$i.html $DST/$i.html
 
     # Generate the details and the layout
     files=`find $DST -name ""$i"__*.html"`
     for k in $files
     do
-      sh gen.sh $DST gen_index.php $k $k
+      sh gen.sh $DST gen_index.php $k $k
     done
 
     rm -f $DST/$i__index.tmpl
@@ -126,11 +131,10 @@ echo $f
     sed -e "/@LINKS@/ r $DST/$fname.links" -e s/@LINKS@//g $i >$DST/$fname
 
     # Generate the TOC file for the library
-    sh gen.sh $DST gen_toc.php $DST/$fname $DST/$fname
-    sh gen.sh $DST gen_html_index.php $DST/$fname $DST/$fname
+    sh gen.sh $DST gen_index.php 1 $DST/$fname $DST/$fname
 
     # Generate the link for the top index.html for this library
-    echo "<LI><A HREF="$fname">$name</A>" >>$DST/index.html.tmp
+    echo "<li><a href="$fname">$name</a>" >>$DST/index.html.tmp
     rm -f $DST/$fname.links
   done
 
@@ -139,8 +143,7 @@ echo $f
   version=`grep SILC_VERSION_STRING $SRC/../includes/version_internal.h |cut -d\"  -f2`
   curdate=`date`
   sed -e "/@VERSION@/s//$version/" -e "/@DATE@/s//$curdate/" -e "/@BODY@/ r $DST/index.html.tmp" -e s/@BODY@//g $index >$DST/index.html
-  sh gen.sh $DST gen_toc.php $DST/index.html $DST/index.html
-  sh gen.sh $DST gen_html_index.php $DST/index.html $DST/index.html
+  sh gen.sh $DST gen_index.php 2 $DST/index.html $DST/index.html
 
   rm -rf $DST/index.html.tmp
   rm -rf /tmp/silcdoc.html