<!--
@LIBRARY=SILC Client Library
@FILENAME=silcclientlib.html
+@LINK=silcapi.html:SILC Client API
-->
<OL>
</FONT>
</PRE>
-<LI><A HREF="silcapi.html">SILC Client API</A>
+@LINKS@
+
</OL>
<!--
@LIBRARY=SILC Core Library
@FILENAME=silccorelib.html
+@LINK=silcauth.html:SILC Auth API
+@LINK=silcchannel.html:SILC Channel API
+@LINK=silccommand.html:SILC Command API
+@LINK=silcid.html:SILC ID API
+@LINK=silcidcache.html:SILC ID Cache API
+@LINK=silcmode.html:SILC Modes
+@LINK=silcnotify.html:SILC Notify API
+@LINK=silcpacket.html:SILC Packet API
+@LINK=silcpayload.html:SILC Payload API
+@LINK=silcprivate.html:SILC Private API
+@LINK=silcprotocol.html:SILC Protocol API
-->
<OL>
</FONT>
</PRE>
-<LI><A HREF="silcauth.html">SILC Auth API</A>
-<LI><A HREF="silcchannel.html">SILC Channel API</A>
-<LI><A HREF="silccommand.html">SILC Command API</A>
-<LI><A HREF="silcid.html">SILC ID API</A>
-<LI><A HREF="silcidcache.html">SILC ID Cache API</A>
-<LI><A HREF="silcmode.html">SILC Modes</A>
-<LI><A HREF="silcnotify.html">SILC Notify API</A>
-<LI><A HREF="silcpacket.html">SILC Packet API</A>
-<LI><A HREF="silcpayload.html">SILC Payload API</A>
-<LI><A HREF="silcprivate.html">SILC Private API</A>
-<LI><A HREF="silcprotocol.html">SILC Protocol API</A>
+@LINKS@
+
</OL>
<!--
@LIBRARY=SILC Crypto Library
@FILENAME=silccryptlib.html
+@LINK=silccipher.html:SILC Cipher API
+@LINK=silchash.html:SILC Hash API
+@LINK=silchmac.html:SILC HMAC API
+@LINK=silcpkcs.html:SILC PKCS API
+@LINK=silcrng.html:SILC RNG API
-->
<OL>
</FONT>
</PRE>
-<LI><A HREF="silccipher.html">SILC Cipher API</A>
-<LI><A HREF="silchash.html">SILC Hash API</A>
-<LI><A HREF="silchmac.html">SILC HMAC API</A>
-<LI><A HREF="silcpkcs.html">SILC PKCS API</A>
-<LI><A HREF="silcrng.html">SILC RNG API</A>
+@LINKS@
+
</OL>
<!--
@LIBRARY=SILC Math Library
@FILENAME=silcmathlib.html
+@LINK=silcmath.html:SILC Math API
+@LINK=silcmp.html:SILC MP API
-->
<OL>
</FONT>
</PRE>
-<LI><A HREF="silcmath.html">SILC Math API</A>
-<LI><A HREF="silcmp.html">SILC MP API</A>
+@LINKS@
+
</OL>
+/*
+
+ silcmath.h
+
+ COPYRIGHT
+
+ Author: Pekka Riikonen <priikone@poseidon.pspt.fi>
+
+ Copyright (C) 1997 - 2000 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.
+
+*/
+
/****h* silcmath/silcmath.h
- *
- * NAME
- *
- * silcmath.h
- *
- * COPYRIGHT
- *
- * Author: Pekka Riikonen <priikone@poseidon.pspt.fi>
- *
- * Copyright (C) 1997 - 2000 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.
*
* DESCRIPTION
*
* prime generation, and conversion routines. See the silcmp.h for the
* SILC MP interface.
*
- */
+ ***/
#ifndef SILCMATH_H
#define SILCMATH_H
*
* SYNOPSIS
*
- * int silc_math_gen_prime(SilcMPInt *prime, uint32 bits, int verbose);
+ * int silc_math_gen_prime(SilcMPInt *prime, uint32 bits, bool verbose);
*
* DESCRIPTION
*
* about the progress of generation.
*
***/
-int silc_math_gen_prime(SilcMPInt *prime, uint32 bits, int verbose);
+bool silc_math_gen_prime(SilcMPInt *prime, uint32 bits, bool verbose);
/****f* silcmath/SilcMathAPI/silc_math_prime_test
*
* number is probably a prime.
*
***/
-int silc_math_prime_test(SilcMPInt *p);
+bool silc_math_prime_test(SilcMPInt *p);
#endif
If argument verbose is TRUE this will display some status information
about the progress of generation. */
-int silc_math_gen_prime(SilcMPInt *prime, uint32 bits, int verbose)
+bool silc_math_gen_prime(SilcMPInt *prime, uint32 bits, bool verbose)
{
unsigned char *numbuf;
uint32 i, b, k;
/* Performs primality testings for given number. Returns TRUE if the
number is probably a prime. */
-int silc_math_prime_test(SilcMPInt *p)
+bool silc_math_prime_test(SilcMPInt *p)
{
SilcMPInt r, base, tmp;
int i, ret = 0;
<!--
@LIBRARY=SILC Key Exchange Library
@FILENAME=silcskelib.html
+@LINK=silcske.html:SILC SKE API
+@LINK=silcske_status.html:SILC SKE Status
-->
<OL>
</FONT>
</PRE>
-<LI><A HREF="silcske.html">SILC SKE API</A>
-<LI><A HREF="silcske_status.html">SILC SKE Status</A>
+@LINKS@
+
</OL>
<!--
@LIBRARY=SILC Utility Library
@FILENAME=silcutillib.html
+@LINK=silcbuffer.html:SILC Buffer API
+@LINK=silcbuffmt.html:SILC Buffer Format API
+@LINK=silcbufutil.html:SILC Buffer Utility API
+@LINK=silchashtable.html:SILC Hash Table API
+@LINK=silclog.html:SILC Log and Debug API
+@LINK=silcmemory.html:SILC Memory API
+@LINK=silcmutex.html:SILC Mutex API
+@LINK=silcthread.html:SILC Thread API
+@LINK=silcnet.html:SILC Net API
+@LINK=silcschedule.html:SILC Schedule API
+@LINK=silcsockconn.html:SILC Socket Connection API
+@LINK=silcutil.html:SILC Util API
+@LINK=silczip.html:SILC Zip API
+@LINK=silclist.html:SILC List API
+@LINK=silcdlist.html:SILC Dynamic List API
-->
<OL>
</FONT>
</PRE>
-<LI><A HREF="silcbuffer.html">SILC Buffer API</A>
-<LI><A HREF="silcbuffmt.html">SILC Buffer Format API</A>
-<LI><A HREF="silcbufutil.html">SILC Buffer Utility API</A>
-<LI><A HREF="silchashtable.html">SILC Hash Table API</A>
-<LI><A HREF="silclog.html">SILC Log and Debug API</A>
-<LI><A HREF="silcmemory.html">SILC Memory API</A>
-<LI><A HREF="silcmutex.html">SILC Mutex API</A>
-<LI><A HREF="silcthread.html">SILC Thread API</A>
-<LI><A HREF="silcnet.html">SILC Net API</A>
-<LI><A HREF="silcschedule.html">SILC Schedule API</A>
-<LI><A HREF="silcsockconn.html">SILC Socket Connection API</A>
-<LI><A HREF="silcutil.html">SILC Util API</A>
-<LI><A HREF="silczip.html">SILC Zip API</A>
-<LI><A HREF="silclist.html">SILC List API</A>
-<LI><A HREF="silcdlist.html">SILC Dynamic List API</A>
+@LINKS@
+
</OL>
<br />
<div align="center">
-<table width="800" bgcolor="#000000" cellpadding="1" cellspacing="0" border="0">
+<table width="900" bgcolor="#000000" cellpadding="1" cellspacing="0" border="0">
<tr>
<td>
<table width="100%" bgcolor="#ffffff" cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
<table width="100%" bgcolor="#e2e2e2" cellpadding="10" cellspacing="0" border="0">
- <tr><td><font face="Helvetica,Arial,Sans-serif">
+ <tr>
+ <td valign="top"><font face="Helvetica,Arial,Sans-serif">
+ <table width="100%" bgcolor="#e2e2e2" cellpadding="1" cellspacing="0" border="0" align="left">
+ <tr><td valign="top"><font face="Helvetica,Arial,Sans-serif">
+<?php
+require index.tmpl
+?>
+ </td></tr>
+ </table>
+ </td>
+ <td valign="top"><font face="Helvetica,Arial,Sans-serif">
<?php
require "$page";
?>
mkdir /tmp/silcdoc.html
cp $headers /tmp/silcdoc.html
+ # Generate indes template from the DIRECTORY files
+ files=`find $SRC -name "DIRECTORY"`
+ for i in $files
+ do
+ # Get library name
+ name=`grep "@LIBRARY=" $i |cut -d= -f2`
+ fname=`grep "@FILENAME=" $i |cut -d= -f2`
+ links=`grep "@LINK=" $i |cut -d= -f2 |cut -d: -f1`
+
+ # Generate links to template file that can be included into various
+ # places on the webpage.
+ echo "<A HREF="$fname">$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 " <A HREF="$k">$n</A><BR>" >>$DST/index.tmpl
+ done
+ done
+
# Generate the actual detailed documentation
path=`pwd`
cd /tmp/silcdoc.html
$ROBO /tmp/silcdoc.html/$i.h $DST/$i.html $TYPE
# Generate the TOC file
- sh gen.sh gen_toc.php $DST/$i.html $DST/$i.html
- sh gen.sh index.php $DST/$i.html $DST/$i.html
+ sh gen.sh $DST gen_toc.php $DST/$i.html $DST/$i.html
+ sh gen.sh $DST index.php $DST/$i.html $DST/$i.html
# Generate the details and the layour
files=`find $DST -name ""$i"_*.html"`
for k in $files
do
- sh gen.sh gen_detail.php $k $k
- sh gen.sh index.php $k $k
+ sh gen.sh $DST gen_detail.php $k $k
+ sh gen.sh $DST index.php $k $k
done
rm -f $DST/$i_index.tmpl
# Generate the index and TOC files from the DIRECTORY files
files=`find $SRC -name "DIRECTORY"`
- touch $DST/index.html.tmp
for i in $files
do
# Get library name
name=`grep "@LIBRARY=" $i |cut -d= -f2`
- fname=`grep "@FILENAME" $i |cut -d= -f2`
+ fname=`grep "@FILENAME=" $i |cut -d= -f2`
+
+ # Generate links for this library
+ sed -e "/@LINKS@/ r $DST/$fname.links" -e s/@LINKS@//g $i >$DST/$fname
# Generate the TOC file for the library
- sh gen.sh gen_toc.php $i $DST/$fname
- sh gen.sh index.php $DST/$fname $DST/$fname
+ sh gen.sh $DST gen_toc.php $DST/$fname $DST/$fname
+ sh gen.sh $DST index.php $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
+ rm -f $DST/$fname.links
done
# Generate the top index.html file
index=`find $SRC -name "LIBINDEX"`
curdate=`date`
sed -e "/@DATE@/s//$curdate/" -e "/@BODY@/ r $DST/index.html.tmp" -e s/@BODY@//g $index >$DST/index.html
- sh gen.sh gen_toc.php $DST/index.html $DST/index.html
- sh gen.sh index.php $DST/index.html $DST/index.html
+ sh gen.sh $DST gen_toc.php $DST/index.html $DST/index.html
+ sh gen.sh $DST index.php $DST/index.html $DST/index.html
rm -rf $DST/index.html.tmp
rm -rf /tmp/silcdoc.html