From: Pekka Riikonen Date: Sun, 12 Aug 2001 12:58:33 +0000 (+0000) Subject: updates. X-Git-Tag: silcertest~158 X-Git-Url: http://git.silcnet.org/gitweb/?p=silc.git;a=commitdiff_plain;h=4b4ddbb063b81dce8ed9a95f75922308f910d662 updates. --- diff --git a/lib/silcclient/DIRECTORY b/lib/silcclient/DIRECTORY index f59700b9..67fdac4f 100644 --- a/lib/silcclient/DIRECTORY +++ b/lib/silcclient/DIRECTORY @@ -1,6 +1,7 @@
    @@ -26,5 +27,6 @@ the library. -
  1. SILC Client API +@LINKS@ +
diff --git a/lib/silccore/DIRECTORY b/lib/silccore/DIRECTORY index 4ff09dec..b9c23d6d 100644 --- a/lib/silccore/DIRECTORY +++ b/lib/silccore/DIRECTORY @@ -1,6 +1,17 @@
    @@ -14,15 +25,6 @@ routines, and routines for sending private message and channel messages. -
  1. SILC Auth API -
  2. SILC Channel API -
  3. SILC Command API -
  4. SILC ID API -
  5. SILC ID Cache API -
  6. SILC Modes -
  7. SILC Notify API -
  8. SILC Packet API -
  9. SILC Payload API -
  10. SILC Private API -
  11. SILC Protocol API +@LINKS@ +
diff --git a/lib/silccrypt/DIRECTORY b/lib/silccrypt/DIRECTORY index be242967..b3ce891d 100644 --- a/lib/silccrypt/DIRECTORY +++ b/lib/silccrypt/DIRECTORY @@ -1,6 +1,11 @@
    @@ -14,9 +19,6 @@ strong random number generator. -
  1. SILC Cipher API -
  2. SILC Hash API -
  3. SILC HMAC API -
  4. SILC PKCS API -
  5. SILC RNG API +@LINKS@ +
diff --git a/lib/silcmath/DIRECTORY b/lib/silcmath/DIRECTORY index 87dba538..a4419f82 100644 --- a/lib/silcmath/DIRECTORY +++ b/lib/silcmath/DIRECTORY @@ -1,6 +1,8 @@
    @@ -13,6 +15,6 @@ math utility functions for applications. -
  1. SILC Math API -
  2. SILC MP API +@LINKS@ +
diff --git a/lib/silcmath/silcmath.h b/lib/silcmath/silcmath.h index ef2241bf..6970b652 100644 --- a/lib/silcmath/silcmath.h +++ b/lib/silcmath/silcmath.h @@ -1,24 +1,26 @@ +/* + + silcmath.h + + COPYRIGHT + + Author: Pekka Riikonen + + 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 - * - * 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 * @@ -26,7 +28,7 @@ * prime generation, and conversion routines. See the silcmp.h for the * SILC MP interface. * - */ + ***/ #ifndef SILCMATH_H #define SILCMATH_H @@ -35,7 +37,7 @@ * * SYNOPSIS * - * int silc_math_gen_prime(SilcMPInt *prime, uint32 bits, int verbose); + * int silc_math_gen_prime(SilcMPInt *prime, uint32 bits, bool verbose); * * DESCRIPTION * @@ -48,7 +50,7 @@ * 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 * @@ -62,6 +64,6 @@ int silc_math_gen_prime(SilcMPInt *prime, uint32 bits, int verbose); * number is probably a prime. * ***/ -int silc_math_prime_test(SilcMPInt *p); +bool silc_math_prime_test(SilcMPInt *p); #endif diff --git a/lib/silcmath/silcprimegen.c b/lib/silcmath/silcprimegen.c index e868637c..bc5edf29 100644 --- a/lib/silcmath/silcprimegen.c +++ b/lib/silcmath/silcprimegen.c @@ -195,7 +195,7 @@ static uint32 primetable[] = 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; @@ -303,7 +303,7 @@ int silc_math_gen_prime(SilcMPInt *prime, uint32 bits, int verbose) /* 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; diff --git a/lib/silcske/DIRECTORY b/lib/silcske/DIRECTORY index ac21924a..b84ba327 100644 --- a/lib/silcske/DIRECTORY +++ b/lib/silcske/DIRECTORY @@ -1,6 +1,8 @@
    @@ -12,6 +14,6 @@ It provides the key exchange protocol for all SILC applications. -
  1. SILC SKE API -
  2. SILC SKE Status +@LINKS@ +
diff --git a/lib/silcutil/DIRECTORY b/lib/silcutil/DIRECTORY index f77eee6a..f95ddcc7 100644 --- a/lib/silcutil/DIRECTORY +++ b/lib/silcutil/DIRECTORY @@ -1,6 +1,21 @@
    @@ -16,19 +31,6 @@ such as Unix and WIN32. -
  1. SILC Buffer API -
  2. SILC Buffer Format API -
  3. SILC Buffer Utility API -
  4. SILC Hash Table API -
  5. SILC Log and Debug API -
  6. SILC Memory API -
  7. SILC Mutex API -
  8. SILC Thread API -
  9. SILC Net API -
  10. SILC Schedule API -
  11. SILC Socket Connection API -
  12. SILC Util API -
  13. SILC Zip API -
  14. SILC List API -
  15. SILC Dynamic List API +@LINKS@ +
diff --git a/scripts/silcdoc/index.php b/scripts/silcdoc/index.php index b05487ac..6626c463 100644 --- a/scripts/silcdoc/index.php +++ b/scripts/silcdoc/index.php @@ -21,14 +21,24 @@
- +
- + +
+
+ + +
+ +
+
diff --git a/scripts/silcdoc/silcdoc b/scripts/silcdoc/silcdoc index 75136813..dd0fe385 100755 --- a/scripts/silcdoc/silcdoc +++ b/scripts/silcdoc/silcdoc @@ -42,6 +42,26 @@ if [ "$TYPE" = "HTML" ]; then 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 "$name
" >>$DST/index.tmpl + for k in $links + do + n=`grep $k $i |cut -d= -f2 |cut -d: -f2` + echo "
  • $n" >>$DST/$fname.links + echo "    $n
    " >>$DST/index.tmpl + done + done + # Generate the actual detailed documentation path=`pwd` cd /tmp/silcdoc.html @@ -52,15 +72,15 @@ if [ "$TYPE" = "HTML" ]; then $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 @@ -68,27 +88,30 @@ if [ "$TYPE" = "HTML" ]; then # 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 "
  • $name" >>$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