SILC Runtime Toolkit 1.2 Beta 1 1.2.beta1
authorPekka Riikonen <priikone@silcnet.org>
Sun, 3 Feb 2008 16:43:05 +0000 (18:43 +0200)
committerPekka Riikonen <priikone@silcnet.org>
Sun, 3 Feb 2008 16:43:05 +0000 (18:43 +0200)
The tree contains various changes to make the beta 1 release possible.
Changed all of the Robodoc header documentation to comply with the
latest version of the Robodoc.

90 files changed:
.gitignore
INSTALL
Makefile.ad
Makefile.defines.in
Makefile.defines_int.in
configure.ad
distdir/RUNTIME
distdir/pre-dist-runtime
doc/.cvsignore [deleted file]
doc/Makefile.ad
doc/runtime.in/arrow.png [new file with mode: 0644]
doc/runtime.in/building.html [new file with mode: 0644]
doc/runtime.in/footer [new file with mode: 0644]
doc/runtime.in/header [new file with mode: 0644]
doc/runtime.in/index.html.in [new file with mode: 0644]
doc/runtime.in/platforms.html [new file with mode: 0644]
doc/runtime.in/runtime.css [new file with mode: 0644]
doc/runtime.in/runtime.rc [new file with mode: 0644]
includes/.cvsignore [deleted file]
includes/Makefile.ad
includes/silc.h.in [deleted file]
includes/silcversion.h.in [deleted file]
lib/.gitignore [deleted file]
lib/Makefile.ad
lib/Makefile.runtime.ad [deleted file]
lib/contrib/.gitignore [deleted file]
lib/doc/LIBINDEX
lib/doc/building.html
lib/doc/platforms.html
lib/doc/porting.html [deleted file]
lib/silcutil/.gitignore [deleted file]
lib/silcutil/Makefile.ad
lib/silcutil/silcasync.h
lib/silcutil/silcatomic.h
lib/silcutil/silcbase64.h
lib/silcutil/silcbitops.h
lib/silcutil/silcbuffer.h
lib/silcutil/silcbuffmt.h
lib/silcutil/silccond.h
lib/silcutil/silcconfig.h
lib/silcutil/silcdir.h
lib/silcutil/silcdlist.h
lib/silcutil/silcdll.h
lib/silcutil/silcenv.h
lib/silcutil/silcerrno.h
lib/silcutil/silcfdstream.h
lib/silcutil/silcfsm.h
lib/silcutil/silcgetopt.h
lib/silcutil/silcglobal.h
lib/silcutil/silchashtable.h
lib/silcutil/silclist.h
lib/silcutil/silclog.h
lib/silcutil/silcmemory.h
lib/silcutil/silcmime.c
lib/silcutil/silcmime.h
lib/silcutil/silcmutex.h
lib/silcutil/silcnet.h
lib/silcutil/silcregex.h
lib/silcutil/silcruntime.h.in
lib/silcutil/silcschedule.h
lib/silcutil/silcsnprintf.h
lib/silcutil/silcsocketstream.h
lib/silcutil/silcstack.h
lib/silcutil/silcstream.h
lib/silcutil/silcstringprep.h
lib/silcutil/silcstrutil.h
lib/silcutil/silcthread.h
lib/silcutil/silcthreadqueue.h
lib/silcutil/silctime.h
lib/silcutil/silctimer.h
lib/silcutil/silctypes.h
lib/silcutil/silcutf8.h
lib/silcutil/silcutil.h
lib/silcutil/symbian/.gitignore [deleted file]
lib/silcutil/symbian/silcsymbiannet.cpp
lib/silcutil/symbian/silcsymbianscheduler.cpp
lib/silcutil/symbian/silcsymbiansocketstream.cpp
lib/silcutil/symbian/silcsymbianutil.cpp
lib/silcutil/tests/test_silcglobal.c
lib/silcutil/unix/.gitignore [deleted file]
lib/silcutil/win32/.gitignore [deleted file]
lib/silcutil/win32/silcwin32net.c
lib/silcutil/win32/silcwin32schedule.c
lib/silcutil/win32/silcwin32socketstream.c
lib/silcutil/win32/silcwin32util.c
lib/srt.pc.in [new file with mode: 0644]
srt.spec.in
win32/Makefile.am
win32/README
win32/srt.dsw [moved from win32/silc.dsw with 100% similarity]

index 67ff1f2f829a740aa9d4aa1bcdd309847b829066..44a62172dde3c48234af54fdfcc080b7cd33cc6a 100644 (file)
@@ -3,6 +3,7 @@ autodist.dist
 autodist.log
 makedist.log
 Makefile
+Makefile.in
 Makefile.defines
 Makefile.defines_int
 acconfig.h
@@ -27,5 +28,4 @@ stamp-h*
 stamp-h*.in
 *.o
 *.lo
-*.am
-*.in
+TAGS
diff --git a/INSTALL b/INSTALL
index a6c12c0799ed300ab3ffda11b0aa68bcd350d49a..370c15318b400ceb3ce8d34d85d3d145231b57a0 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -1,19 +1,12 @@
 Quick Installation
 ==================
 
-   To configure and compile SILC package give the commands:
+   To configure and compile SILC Runtime Toolkit give the commands:
 
        ./configure
-       make (or gmake)
+       make
        make install
 
-   This will install the SILC binaries and configuration files into the
-/usr/local/silc/ directory.  System wide configuration files are installed
-into the /etc/silc/ directory.
-
-You may need to add the /usr/local/silc path to your PATH environment
-variable after the installation.
-
 Configuration Options
 =====================
 
@@ -22,16 +15,6 @@ give --help command to the `configure' to see all of them.  Here is listed
 few options that you might want to use.  Please refer to the rest of this
 file for more generic installation instructions.
 
-`--with-gmp[=DIR]'
-
-   If you wish to use GMP library for arbitrary precision arithmetic
-library instead of using the MPI library included in the package, you can
-give the --with-gmp[=DIR] option to the `configure'.  The DIR is the upper
-path in your system which contains lib/ and include/ for GMP library.
-   Note that MPI is the prefered arbitrary precision arithmetic library and
-GMP can be used as a fall-back if you have problems with the MPI library
-included within this package.
-
 `--with-iconv[=DIR]'
 
    If your system doesn't provide iconv() function in its native libraries
@@ -52,11 +35,6 @@ package or does not want to use them, you can give the --disable-asm
 option to the `configure' script.  This will assure that assembler
 optimized code is not compiled in.
 
-`--enabled-shared'
-
-   If you wish to compile and install shared libraries then enable this
-option.  By default all libraries are compiled as static libraries.
-
 `--enable-debug'
 
    If you would like to enable the debugging for the compiled programs
@@ -68,6 +46,16 @@ you can give this option to the `configure'.
 However, if it fails, but you still want to compile in the IPv6 support
 you can give --enable-ipv6 option to force the IPv6 support.
 
+`--disable-cpu-optimizations'
+   By default the configure script will attempt to detect the type of your 
+CPU and enable any features specific to your CPU that could optimize the 
+performance of the Toolkit. If you are creating binary package that should 
+work on any CPU (and not only your CPU) you should diable these 
+optimizations. If you compile it for yourself only, keeping the 
+optimizations enabled is recommended.
+
 Basic Installation
 ==================
 
index 611d85aec05797366925d7cddaa08a866d56ee50..b64a707c1f97976a4fc17bb2416be6225d508937 100644 (file)
@@ -25,6 +25,8 @@ SUBDIRS =             \
        doc
 
 EXTRA_DIST =           \
+       srt.m4          \
+       srt.spec        \
        silcdefs.h.in   \
        symbian         \
        CHANGES CREDITS
index c13aab23b8ccb584e27b76816a438612121e1d1c..2e9c9023d142a2caa4d4696ed88637e093a0c688 100644 (file)
@@ -3,7 +3,7 @@
 #
 #  Author: Pekka Riikonen <priikone@silcnet.org>
 #
-#  Copyright (C) 2001 - 2005 Pekka Riikonen
+#  Copyright (C) 2001 - 2005, 2008 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
@@ -28,7 +28,7 @@
 # All packages in the SILC source tree that include the Makefile.defines.in
 # must also include the following two lines in their configure.in file.
 #
-# INCLUDE_DEFINES_INT="include \$(top_srcdir)/Makefile.defines_int"   
+# INCLUDE_DEFINES_INT="include \$(top_srcdir)/Makefile.defines_int"
 # AC_SUBST(INCLUDE_DEFINES_INT)
 #
 # (See the Makefile.defines_int.pre for all different definitions but DO NOT
@@ -45,12 +45,3 @@ INCLUDES = $(ADD_INCLUDES) $(SILC_CFLAGS) -DHAVE_SILCDEFS_H \
        -I$(silc_top_srcdir) $(SILC_LIB_INCLUDES) \
        -I$(silc_top_srcdir)/includes \
        -I$(silc_top_srcdir)/doc
-
-#
-#includes-install: Makefile
-#      for i in $(include_HEADERS); do s=$(srcdir)/$$i;
-#d=$(silc_top_srcdir)/includes/$$i; \
-#         ln $$s $$d 2>/dev/null || (rm -f $$d; cp -p $$s $$d;); \
-#      done;
-#
-#all-local: includes-install
index 92fd95cd1041f39b136560d571b8ce1aa53e5a53..3cb3d1e32cb41f3fb4c1ea5dd6bfa7632206ed3c 100644 (file)
@@ -3,7 +3,7 @@
 #
 #  Author: Pekka Riikonen <priikone@silcnet.org>
 #
-#  Copyright (C) 2000 - 2007 Pekka Riikonen
+#  Copyright (C) 2000 - 2008 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
@@ -54,7 +54,3 @@ modulesdir = $(DESTDIR)$(silc_modulesdir)
 helpdir = $(DESTDIR)$(silc_helpdir)
 docdir = $(DESTDIR)$(silc_docdir)
 mandir = $(DESTDIR)@mandir@
-#ifdef SILC_DIST_SERVER
-silc_logsdir=@LOGSDIR@
-logsdir = $(DESTDIR)$(silc_logsdir)
-#endif SILC_DIST_SERVER
index 3fad742985fb10bc4978605984b66e60ca0c8a97..dce30889cc521a5df06dd6f498196f8e83188eb0 100644 (file)
@@ -1186,6 +1186,26 @@ if test x$has_threads = xtrue; then
 fi
 
 
+##
+## Native WIN32 compilation under cygwin
+##
+AC_MSG_CHECKING(whether to compile native WIN32 code)
+AC_ARG_WITH(win32,
+  [  --with-win32            compile native WIN32 (MinGW) code (-mno-cygwin)],
+  [
+    AC_MSG_RESULT(yes)
+    AC_DEFINE([SILC_WIN32], [], [SILC_WIN32])
+    win32_support=true
+    CFLAGS="-mno-cygwin $CFLAGS"
+    LIBS="$LIBS -lwsock32"
+  ],
+  [
+    AC_MSG_RESULT(no)
+    win32_support=false
+  ])
+AM_CONDITIONAL(SILC_WIN32, test x$win32_support = xtrue)
+
+
 ##
 ## Outputs and substitutions
 ##
@@ -1199,9 +1219,6 @@ AC_SUBST(__SILC_ENABLE_DEBUG)
 AC_SUBST(__SILC_HAVE_PTHREAD)
 AC_SUBST(__RUNTIME_PACKAGE_VERSION)
 
-# Native Windows support (disabled by default)
-AM_CONDITIONAL(SILC_WIN32, test xfalse = xtrue)
-
 # Native Symbian OS support (disabled by default)
 AM_CONDITIONAL(SILC_SYMBIAN, test xfalse = xtrue)
 
@@ -1219,6 +1236,9 @@ AC_DEFINE_UNQUOTED([SILC_DOCDIR], "$DOCDIR", [SILC_DOCDIR])
 INCLUDE_DEFINES_INT="include \$(top_srcdir)/Makefile.defines_int"
 AC_SUBST(INCLUDE_DEFINES_INT)
 
+DATE=`date`
+AC_SUBST(DATE)
+
 
 #
 # Makefile outputs
@@ -1226,11 +1246,10 @@ AC_SUBST(INCLUDE_DEFINES_INT)
 AC_CONFIG_FILES(
 Makefile
 doc/Makefile
+doc/runtime.in/index.html
 Makefile.defines
 Makefile.defines_int
 includes/Makefile
-includes/silcversion.h
-includes/silc.h
 apps/Makefile
 win32/Makefile
 )
index 1f5cdba5081d0c8721771320e68edddf9c79cbb7..331293e5704073fcb44716fff997e91cbb19da21 100644 (file)
@@ -1,4 +1,4 @@
-The SILC Toolkit distribution is dual-licensed distribution.  The 
+The SILC Runtime Toolkit distribution is dual-licensed distribution.  The 
 following licenses govern this distribution, and you are free to choose 
 either one of the licenses:
 
@@ -13,8 +13,8 @@ commercial application.
 
 NOTE: The files under the subdirectory apps/ are only GNU GPL licensed 
 example application code.  They are not compiled by default in SILC 
-Toolkit, and not delivered into the any compiled binary or library.  They 
-are not dual-licensed code.
+Runtime Toolkit, and not delivered into the any compiled binary or 
+library.  They are not dual-licensed code.
 
 Always verify the license from the file you are using.
 
index 12d05fd464a1ae6a23ced79c25e1b936f0caae78..7955838dd24f0dfb2d742600398ec68b35086bf6 100644 (file)
@@ -7,17 +7,14 @@ distdir=$4
 release=$5
 
 if test -z $release; then
-  release="0.fc7"
+  release="0.fc8"
 fi
 
 sed -e "s/SILC_VERSION/$dist_version/" -e "s/SILC_RELEASE/$release/" \
-  silc-toolkit.spec.in > silc-toolkit.spec
+  srt.spec.in > srt.spec
 
 ./configure
 
 cd doc
-make dist-hook
-rm -rf toolkit
 make toolkit-ref-html
-cp ../lib/doc/*.gif toolkit
 cd ..
diff --git a/doc/.cvsignore b/doc/.cvsignore
deleted file mode 100644 (file)
index 3a6da56..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-Makefile
-Makefile.in
-Makefile.am
-example_silcd.conf
-*.txt
index 1818fc1c479d62f96360dfd5f83e7d60a0680c53..cbf42139c339024740a3996581a4dabdc36c758a 100644 (file)
@@ -3,7 +3,7 @@
 #
 #  Author: Pekka Riikonen <priikone@silcnet.org>
 #
-#  Copyright (C) 2000 - 2007 Pekka Riikonen
+#  Copyright (C) 2000 - 2008 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
 
 AUTOMAKE_OPTIONS = 1.0 no-dependencies foreign
 
-#ifdef SILC_DIST_TOOLKIT
-all:
-       touch draft-riikonen-silc-spec-09.txt
-       touch draft-riikonen-silc-pp-09.txt
-       touch draft-riikonen-silc-ke-auth-09.txt
-       touch draft-riikonen-silc-commands-07.txt
-       touch draft-riikonen-silc-flags-payloads-04.txt
-       touch draft-riikonen-silc-multimedia-session-00.txt
-       touch draft-riikonen-presence-attrs-04.txt
-
-makerfc = $(SILC_TOP_SRCDIR)/scripts/makerfc
-
 toolkit-ref-html:
-       -@if test -f $(SILC_TOP_SRCDIR)/util/robodoc/Source/robodoc ; then \
-         echo Generating Toolkit Reference Manual ; \
-         rm -rf toolkit ; mkdir toolkit ; cd ../scripts/silcdoc ; \
-         ./silcdoc HTML ../../lib/ $(SILC_TOP_SRCDIR)/doc/toolkit \
-         $(SILC_TOP_SRCDIR)/util/robodoc/Source/robodoc ; \
-       else  \
-         echo ROBODoc is not compiled! Cannot generate documentation! ; \
-        fi
+       rm -rf runtime
+       mkdir runtime
+       cp runtime.in/* runtime/
+       cd runtime && robodoc --rc runtime.rc
 
 toolkit-ref-pdf:
-       -@if test -f $(SILC_TOP_SRCDIR)/util/robodoc/Source/robodoc ; then \
-         echo Generating Toolkit Reference Manual ; \
-         cd ../scripts/silcdoc ; \
-         ./silcdoc PS ../../lib/ $(SILC_TOP_SRCDIR)/doc/toolkit.ps \
-         $(SILC_TOP_SRCDIR)/util/robodoc/Source/robodoc ; \
-         ps2pdf $(SILC_TOP_SRCDIR)/doc/toolkit.ps $(SILC_TOP_SRCDIR)/doc/toolkit.pdf; \
-          rm -rf $(SILC_TOP_SRCDIR)/doc/toolkit.ps; \
-       else  \
-         echo ROBODoc is not compiled! Cannot generate documentation! ; \
-        fi
-
-dist-hook:
-       touch draft-riikonen-silc-spec-09.txt
-       touch draft-riikonen-silc-pp-09.txt
-       touch draft-riikonen-silc-ke-auth-09.txt
-       touch draft-riikonen-silc-commands-07.txt
-       touch draft-riikonen-silc-flags-payloads-04.txt
-       touch draft-riikonen-silc-multimedia-session-00.txt
-       touch draft-riikonen-presence-attrs-04.txt
-       $(makerfc) draft-riikonen-silc-spec-09.nroff \
-               draft-riikonen-silc-spec-09.txt
-       $(makerfc) draft-riikonen-silc-pp-09.nroff \
-               draft-riikonen-silc-pp-09.txt
-       $(makerfc) draft-riikonen-silc-ke-auth-09.nroff \
-               draft-riikonen-silc-ke-auth-09.txt
-       $(makerfc) draft-riikonen-silc-commands-07.nroff \
-               draft-riikonen-silc-commands-07.txt
-       $(makerfc) draft-riikonen-silc-flags-payloads-04.nroff \
-               draft-riikonen-silc-flags-payloads-04.txt
-       $(makerfc) draft-riikonen-silc-multimedia-session-00.nroff \
-               draft-riikonen-silc-multimedia-session-00.txt
-       $(makerfc) draft-riikonen-presence-attrs-04.nroff \
-               draft-riikonen-presence-attrs-04.txt
-
-#else !SILC_DIST_TOOLKIT
-dist-hook:
-       $(SILC_TOP_SRCDIR)/scripts/manpages.pl
-#endif SILC_DIST_TOOLKIT
 
 doc-install:
        -mkdir -p $(docdir)
-#ifdef SILC_DIST_TOOLKIT
+       -mkdir -p $(docdir)/runtime
        -$(INSTALL_DATA) $(top_srcdir)/doc/CodingStyle $(docdir)/
-       -$(INSTALL_DATA) $(top_srcdir)/GPL $(docdir)/
-       -$(INSTALL_DATA) $(top_srcdir)/BSD $(docdir)/
-       -$(INSTALL_DATA) $(top_srcdir)/doc/*.txt $(docdir)/
-#endif SILC_DIST_TOOLKIT
-       -$(INSTALL_DATA) $(top_srcdir)/doc/FAQ $(docdir)/
-       -$(INSTALL_DATA) $(top_srcdir)/COPYING $(docdir)/
-       -$(INSTALL_DATA) $(top_srcdir)/CHANGES $(docdir)/
-       -$(INSTALL_DATA) $(top_srcdir)/CREDITS $(docdir)/
-       -$(INSTALL_DATA) $(top_srcdir)/README* $(docdir)/
-       -$(INSTALL_DATA) $(top_srcdir)/INSTALL $(docdir)/
-       -$(INSTALL_DATA) $(top_srcdir)/TODO $(docdir)/
+       -$(INSTALL_DATA) $(top_srcdir)/doc/runtime/* $(docdir)/runtime
 
-install-data-hook:     \
+install-data-hook:      \
        doc-install
 
-EXTRA_DIST =                   \
-#ifdef SILC_DIST_CLIENT
-       silc.1                  \
-#endif SILC_DIST_CLIENT
-#ifdef SILC_DIST_SERVER
-       examples silcd.8 silcd.conf.5   \
-       example_silcd.conf      \
-       silcalgs.conf           \
-#endif SILC_DIST_SERVER
-#ifdef SILC_DIST_TOOLKIT
-       toolkit                 \
-       CodingStyle             \
-       draft-riikonen*.txt     \
-       silcalgs.conf           \
-#endif SILC_DIST_TOOLKIT
-       FAQ
+clean:
+       rm -rf runtime
+
+EXTRA_DIST = runtime CodingStyle
 
 include $(top_srcdir)/Makefile.defines.in
diff --git a/doc/runtime.in/arrow.png b/doc/runtime.in/arrow.png
new file mode 100644 (file)
index 0000000..bba0330
Binary files /dev/null and b/doc/runtime.in/arrow.png differ
diff --git a/doc/runtime.in/building.html b/doc/runtime.in/building.html
new file mode 100644 (file)
index 0000000..c3f5f5f
--- /dev/null
@@ -0,0 +1,249 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html  xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="Content-Style-Type" content="text/css" />
+<meta http-equiv="Content-type" content="text/html; charset=ISO-8859-1" />
+<link rel="stylesheet" href="./runtime.css" type="text/css" />
+<title>SILC Runtime Toolkit</title>
+</head>
+<body>
+
+<div id="logo">
+<table border="0" cellspacing="0" cellpadding="6" width="100%">
+ <tr valign="top">
+  <td>Copyright &copy; 2001 - 2008 SILC Project<br />
+    <a href="http://silcnet.org">SILC Project Website</a></td>
+  <td align="right">
+   <a href="index.html">SILC Runtime Toolkit Manual</a><br />
+   <a href="masterindex.html">Index</a></small></td>
+  </td>
+ </tr>
+</table>
+</div>
+
+<div id="contentwrapper">
+<div id="navigation">
+</div> <!-- navigation -->
+<div id="content">
+
+<big><b>Building the Toolkit</b></big>
+
+<br />&nbsp;<br />
+SILC Runtime Toolkit works on various platforms, such as on several Unix 
+systems and on Windows.  Building of the Toolkit on some platform may 
+differ from the other.  This document describes how to build the Toolkit 
+from the sources, to create linkable libraries and binaries, on all 
+platforms the Toolkit support.
+
+<br />&nbsp;<br />
+The building instructions for all platforms are also included in the Toolkit
+package.  Please refer to the INSTALL file for general building instructions
+for Unix systems, README.WIN32 for building on Windows systems, and
+README.MACOSX for building on Mac OS X.
+
+<br />&nbsp;<br />
+<li><a href="#unix">Building on Unix & Linux</a><br />
+<li><a href="#windows">Building on Windows</a><br />
+<li><a href="#macosx">Building on Mac OS X</a>
+<li><a href="#symbian">Building on Symbian OS</a>
+
+<br />&nbsp;<br />&nbsp;<br />
+<b><a name="unix"></a>Building on Unix & Linux</b>
+
+<br />&nbsp;<br />
+On Unix systems both statically and dynamically linkable libraries are 
+built by default.
+
+<br />&nbsp;<br />
+To build Toolkit on Unix systems, give commands:
+
+<br />&nbsp;<br />
+<tt>
+./configure<br />
+make
+</tt>
+
+<br />&nbsp;<br />
+On some systems you may need to give "gmake" command instead of "make".  The
+./configure can take several options as arguments.  To see them all give
+command:
+
+<br />&nbsp;<br />
+<tt>./configure --help</tt>
+
+<br />&nbsp;<br />
+The most important configuration options you may consider to use are:
+
+<br />&nbsp;<br />
+<tt>--enable-debug</tt>
+
+<br />&nbsp;<br />
+If you would like to enable the debugging for the compiled binaries
+you can give this option to the `configure'.  It is recommended to use
+this option when you are doing development with Toolkit.  It is helpful
+to enable run-time debugging.
+
+<br />&nbsp;<br />
+<tt>--with-iconv[=DIR]</tt>
+
+<br />&nbsp;<br />
+If your system doesn't provide iconv() function in its native libraries
+(usually libc) or if this function is broken (e.g. older Solaris systems),
+you may want to use libiconv instead.  The DIR is the upper path in your
+system which contains lib/ and include/ for libiconv (e.g. /usr/local).
+
+<br />&nbsp;<br />
+<tt>--without-pthreads</tt>
+
+<br />&nbsp;<br />
+If you do not want to compile the programs with POSIX multi-threads support
+you can give --without-pthreads option.  This will disable the SILC Thread
+API and SILC Mutex API.  Furthermore if SILC Thread API is used when this
+option is used, the routines work, but do not work in threads (are run
+in the calling process and can block the process).
+
+<br />&nbsp;<br />
+<tt>--disable-asm</tt>
+
+<br />&nbsp;<br />
+If you have trouble compiling the assembler optimized code in the
+package or does not want to use them, you can give the --disable-asm
+option to the `configure' script.  This will assure that assembler
+optimized code is not compiled in.
+
+<br />&nbsp;<br />
+<tt>--enable-ipv6</tt>
+
+<br />&nbsp;<br />
+The `configure' will attempt to check for IPv6 support in your system.
+However, if it fails, but you still want to compile in the IPv6 support
+you can give --enable-ipv6 option to force the IPv6 support.
+
+<br />&nbsp;<br />
+<tt>--disable-cpu-optimizations</tt>
+
+<br />&nbsp;<br />
+By default the configure script will attempt to detect the type of your 
+CPU and enable any features specific to your CPU that could optimize the 
+performance of the Toolkit.  If you are creating binary package that 
+should work on any CPU (and not only your CPU) you should diable these 
+optimizations.  If you compile it for yourself only, keeping the 
+optimizations enabled is recommended.
+
+<br />&nbsp;<br />
+After compilation you can install the Toolkit into your system by giving
+the command:
+
+<br />&nbsp;<br />
+<tt>make install</tt>
+
+
+<br />&nbsp;<br />&nbsp;<br />
+<b><a name="windows"></a>Building on Windows</b>
+
+<br />&nbsp;<br />
+The Toolkit can be compiled several different ways on Windows.  However,
+this document describes the method to build the Toolkit to produce native
+Win32 binaries.  The Toolkit package can also be compiled on Cygwin and
+MinGW.  For these systems please refer to the README.WIN32 file in the
+Toolkit package.
+
+<br />&nbsp;<br />
+The Toolkit package includes ready MSVC++ Workspace files, that will
+automatically compile the Toolkit.  The MSVC++ workspace and project files
+resides in the win32/ subdirectory of the Toolkit package.  The `srt.dsw'
+file is the workspace file that automatically supports compiling the Toolkit
+and to generate the SILC Runtime DLL (libsrt.dll).  You may also compile 
+debug version by selecteing the Debug compilation method.
+
+<br />&nbsp;<br />&nbsp;<br />
+<b><a name="macosx"></a>Building on Mac OS X</b>
+
+<br />&nbsp;<br />
+Building the Toolkit on Mac OS X is almost identical on compiling on Unix
+system.  The reason for this is that the Mac OS X is Unix based operating
+system.  To build the Toolkit on Mac OS X, give the following commands:
+
+<br />&nbsp;<br />
+<tt>
+setenv CFLAGS -no-cpp-precomp<br />
+./configure powerpc<br />
+make
+</tt>
+
+<br />&nbsp;<br />
+The ./configure can take several options as arguments.  To see them all give
+command:
+
+<br />&nbsp;<br />
+<tt>./configure --help</tt>
+
+<br />&nbsp;<br />
+To compile, give:
+
+<br />&nbsp;<br />
+<tt>
+make
+</tt>
+
+<br />&nbsp;<br />
+After compilation you can install the Toolkit into your system by giving
+the command:
+
+<br />&nbsp;<br />
+<tt>make install</tt>
+
+<br />&nbsp;<br />&nbsp;<br />
+<b><a name="symbian"></a>Building on Symbian OS</b>
+
+<br />&nbsp;<br />
+The build environment for Symbian OS requires Carbide.c++ and MS Windows.
+
+<br />&nbsp;<br />
+Download the freely available Carbide.c++ from Nokia at
+<a href="http://forum.nokia.com">http://forum.nokia.com</a>.  The exact
+hyperlink location changes often, so it is not referenced here.  It is
+usually under "Tools and SDKs" link.
+
+<br />&nbsp;<br />
+After installation a web browser is opened automatically by the
+Carbide.c++ installer.  Follow its instructions by installing the Perl,
+CTags and the SDK.  Perl and the SDK are required, but CTags is
+optional and if necessary can be omitted.
+
+<br />&nbsp;<br />
+The Toolkit is generic C and C++ code and should work with any
+SDK.  If you don't have SDK already installed, install the latest
+version you can find.  The links to SDKs are found in the Carbide.c++
+instructions after installation.  If you already have SDK in your
+system, you should use that.
+
+<br />&nbsp;<br />
+After installation import the Toolkit project to Carbide.c++ from the
+symbian/ subdirectory in the Toolkit package.
+
+<br />&nbsp;<br />
+Please read the README.SYMBIAN from the SILC Runtime Toolkit package for 
+complete building instructions.
+
+</div> <!-- content -->
+
+</div> <!-- contentwrapper -->
+<div id="footer">
+<table border="0" cellspacing="0" cellpadding="6" width="100%">
+ <tr valign="top">
+  <td>Copyright &copy; 2001 - 2008 SILC Project<br />
+    <a href="http://silcnet.org">SILC Project Website</a></td>
+  <td align="right">
+   <a href="index.html">SILC Runtime Toolkit Manual</a><br />
+   <a href="masterindex.html">Index</a></small></td>
+  </td>
+ </tr>
+</table>
+</div>
+
+</body>
+</html>
+
diff --git a/doc/runtime.in/footer b/doc/runtime.in/footer
new file mode 100644 (file)
index 0000000..f83c74a
--- /dev/null
@@ -0,0 +1,13 @@
+</div> <!-- contentwrapper -->
+<div id="footer">
+<table border="0" cellspacing="0" cellpadding="6" width="100%">
+ <tr valign="top">
+  <td>Copyright &copy; 2001 - 2008 SILC Project<br />
+    <a href="http://silcnet.org">SILC Project Website</a></td>
+  <td align="right">
+   <a href="index.html">SILC Runtime Toolkit Manual</a><br />
+   <a href="masterindex.html">Index</a></small></td>
+  </td>
+ </tr>
+</table>
+</div>
diff --git a/doc/runtime.in/header b/doc/runtime.in/header
new file mode 100644 (file)
index 0000000..cf36041
--- /dev/null
@@ -0,0 +1,14 @@
+<div id="logo">
+<table border="0" cellspacing="0" cellpadding="6" width="100%">
+ <tr valign="top">
+  <td>Copyright &copy; 2001 - 2008 SILC Project<br />
+    <a href="http://silcnet.org">SILC Project Website</a></td>
+  <td align="right">
+   <a href="index.html">SILC Runtime Toolkit Manual</a><br />
+   <a href="masterindex.html">Index</a></small></td>
+  </td>
+ </tr>
+</table>
+</div>
+
+<div id="contentwrapper">
diff --git a/doc/runtime.in/index.html.in b/doc/runtime.in/index.html.in
new file mode 100644 (file)
index 0000000..5d7d4dd
--- /dev/null
@@ -0,0 +1,121 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html  xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="Content-Style-Type" content="text/css" />
+<meta http-equiv="Content-type" content="text/html; charset=ISO-8859-1" />
+<link rel="stylesheet" href="./runtime.css" type="text/css" />
+<title>SILC Runtime Toolkit</title>
+</head>
+<body>
+
+<div id="logo">
+<table border="0" cellspacing="0" cellpadding="6" width="100%">
+ <tr valign="top">
+  <td>Copyright &copy; 2001 - 2008 SILC Project<br />
+    <a href="http://silcnet.org">SILC Project Website</a></td>
+  <td align="right">
+   <a href="index.html">SILC Runtime Toolkit Manual</a><br />
+   <a href="masterindex.html">Index</a></small></td>
+  </td>
+ </tr>
+</table>
+</div>
+
+<div id="contentwrapper">
+<div id="navigation">
+</div> <!-- navigation -->
+<div id="content">
+<h2>SILC Runtime Toolkit Reference Manual</h2>
+<p>
+Version: @VERSION@<br />
+Copyright &copy; 1997 - 2008 The SILC Project<br />
+Updated: @DATE@
+</p>
+<p>
+Welcome to the SILC Runtime Toolkit Reference Manual.  The manual is a 
+complete developer guide and reference for the application programmer.  
+The manual is intended for programmers who would like to use the SILC 
+Runtime Toolkit as their primary runtime in their application.</p>
+<p>
+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.
+</p>
+
+<p class="item_name">GUIDES</p>
+<ul class="toc_entries">
+
+<li class="toc_entries"><a href="intro_reference.html">Introduction to the Manual</a><br />
+<li class="toc_entries"><a href="platforms.html">Supported Platforms</a>
+<li class="toc_entries"><a href="building.html">Building the Toolkit</a>
+</ul>
+
+<p class="item_name">TOOLKIT REFERENCE</p>
+<ul class="toc_entries">
+
+<li class="toc_entries"><a href="./silcruntime_hsilcutil2FRuntime20Toolkit20Interface.html" >Runtime Toolkit Interface</a>
+<li class="toc_entries"><a href="./silcasync_hsilcutil2FAsync20Operation20Interface.html" >Async Operation Interface</a>
+<li class="toc_entries"><a href="./silcatomic_hsilcutil2FAtomic20Operations20Interface.html" >Atomic Operations Interface</a>
+<li class="toc_entries"><a href="./silcbase64_hsilcutil2FBase6420Interface.html" >Base64 Interface</a>
+<li class="toc_entries"><a href="./silcbitops_hsilcutil2FBit20Operations20Interface.html" >Bit Operations Interface</a>
+<li class="toc_entries"><a href="./silcbuffmt_hsilcutil2FBuffer20Format20Interface.html" >Buffer Format Interface</a>
+<li class="toc_entries"><a href="./silcbuffer_hsilcutil2FBuffer20Interface.html" >Buffer Interface</a>
+<li class="toc_entries"><a href="./silccond_hsilcutil2FCondition20Variable20Interface.html" >Condition Variable Interface</a>
+<li class="toc_entries"><a href="./silcconfig_hsilcutil2FConfig20File20Interface.html" >Config File Interface</a>
+<li class="toc_entries"><a href="./silcdir_hsilcutil2FDirectory20Interface.html" >Directory Interface</a>
+<li class="toc_entries"><a href="./silcdlist_hsilcutil2FDynamic20List20Interface.html" >Dynamic List Interface</a>
+<li class="toc_entries"><a href="./silcenv_hsilcutil2FEnvironment20Interface.html" >Environment Interface</a>
+<li class="toc_entries"><a href="./silcerrno_hsilcutil2FErrno20Interface.html" >Errno Interface</a>
+<li class="toc_entries"><a href="./silcfdstream_hsilcutil2FFd20Stream20Interface.html" >Fd Stream Interface</a>
+<li class="toc_entries"><a href="./silcfileutil_hsilcutil2FFile20Util20Interface.html" >File Util Interface</a>
+<li class="toc_entries"><a href="./silcfsm_hsilcutil2FFinite20State20Machine.html" >Finite State Machine</a>
+<li class="toc_entries"><a href="./silcgetopt_hsilcutil2FGetOpt20Interface.html" >GetOpt Interface</a>
+<li class="toc_entries"><a href="./silcglobal_hsilcutil2FGlobal20Variable20Interface.html" >Global Variable Interface</a>
+<li class="toc_entries"><a href="./silchashtable_hsilcutil2FHash20Table20Interface.html" >Hash Table Interface</a>
+<li class="toc_entries"><a href="./silclist_hsilcutil2FList20Interface.html" >List Interface</a>
+<li class="toc_entries"><a href="./silclog_hsilcutil2FLogging20Interface.html" >Logging Interface</a>
+<li class="toc_entries"><a href="./silcmemory_hsilcutil2FMemory20Interface.html" >Memory Interface</a>
+<li class="toc_entries"><a href="./silcstack_hsilcutil2FMemory20Pool20Interface.html" >Memory Pool Interface</a>
+<li class="toc_entries"><a href="./silcmime_hsilcutil2FMIME20Interface.html" >MIME Interface</a>
+<li class="toc_entries"><a href="./silcutil_hsilcutil2FMisc20Utilities.html" >Misc Utilities</a>
+<li class="toc_entries"><a href="./silcmutex_hsilcutil2FMutex20Interface.html" >Mutex Interface</a>
+<li class="toc_entries"><a href="./silcnet_hsilcutil2FNetwork20Interface.html" >Network Interface</a>
+<li class="toc_entries"><a href="./silcrand_hsilcutil2FRandom20Number20Interface.html" >Random Number Interface</a>
+<li class="toc_entries"><a href="./silcregex_hsilcutil2FRegex20Interface.html" >Regex Interface</a>
+<li class="toc_entries"><a href="./silcschedule_hsilcutil2FScheduler20Interface.html" >Scheduler Interface</a>
+<li class="toc_entries"><a href="./silcdll_hsilcutil2FShared20Object20Interface.html" >Shared Object Interface</a>
+<li class="toc_entries"><a href="./silcsnprintf_hsilcutil2FSnprintf20Interface.html" >Snprintf Interface</a>
+<li class="toc_entries"><a href="./silcsocketstream_hsilcutil2FSocket20Stream20Interface.html" >Socket Stream Interface</a>
+<li class="toc_entries"><a href="./silcstream_hsilcutil2FStream20Interface.html" >Stream Interface</a>
+<li class="toc_entries"><a href="./silcstrutil_hsilcutil2FString20Utilities.html" >String Utilities</a>
+<li class="toc_entries"><a href="./silcstringprep_hsilcutil2FStringprep20Interface.html" >Stringprep Interface</a>
+<li class="toc_entries"><a href="./silcthread_hsilcutil2FThread20Interface.html" >Thread Interface</a>
+<li class="toc_entries"><a href="./silcthreadqueue_hsilcutil2FThread20Queue20Interface.html" >Thread Queue Interface</a>
+<li class="toc_entries"><a href="./silctime_hsilcutil2FTime20Interface.html" >Time Interface</a>
+<li class="toc_entries"><a href="./silctimer_hsilcutil2FTimer20Interface.html" >Timer Interface</a>
+<li class="toc_entries"><a href="./silctypes_hsilcutil2FTypes20and20Definitions.html" >Types and Definitions</a>
+<li class="toc_entries"><a href="./silcutf8_hsilcutil2FUTF2D820Interface.html" >UTF-8 Interface</a>
+
+<li class="toc_entries"><a href="masterindex.html">Toolkit Index</a><br />
+</ul>
+
+</div> <!-- content -->
+
+</div> <!-- contentwrapper -->
+<div id="footer">
+<table border="0" cellspacing="0" cellpadding="6" width="100%">
+ <tr valign="top">
+  <td>Copyright &copy; 2001 - 2008 SILC Project<br />
+    <a href="http://silcnet.org">SILC Project Website</a></td>
+  <td align="right">
+   <a href="index.html">SILC Runtime Toolkit Manual</a><br />
+   <a href="masterindex.html">Index</a></small></td>
+  </td>
+ </tr>
+</table>
+</div>
+
+</body>
+</html>
diff --git a/doc/runtime.in/platforms.html b/doc/runtime.in/platforms.html
new file mode 100644 (file)
index 0000000..a23a955
--- /dev/null
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html  xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="Content-Style-Type" content="text/css" />
+<meta http-equiv="Content-type" content="text/html; charset=ISO-8859-1" />
+<link rel="stylesheet" href="./runtime.css" type="text/css" />
+<title>SILC Runtime Toolkit</title>
+</head>
+<body>
+
+<div id="logo">
+<table border="0" cellspacing="0" cellpadding="6" width="100%">
+ <tr valign="top">
+  <td>Copyright &copy; 2001 - 2008 SILC Project<br />
+    <a href="http://silcnet.org">SILC Project Website</a></td>
+  <td align="right">
+   <a href="index.html">SILC Runtime Toolkit Manual</a><br />
+   <a href="masterindex.html">Index</a></small></td>
+  </td>
+ </tr>
+</table>
+</div>
+
+<div id="contentwrapper">
+<div id="navigation">
+</div> <!-- navigation -->
+<div id="content">
+
+<big><b>Platform Implementations</b></big>
+
+<br />&nbsp;<br />
+This document describes the implementation issues with different platforms 
+that the SILC Runtime Toolkit support.  Some of the supported platforms 
+does not support all the features delivered with the Toolkit or they may 
+behave differently from other platforms.
+
+<br />&nbsp;<br />
+<li><a href="#unix">Unix & Linux Implementation</a><br />
+<li><a href="#windows">Windows Implementation</a><br />
+<li><a href="#macosx">Mac OS X Implementation</a>
+<li><a href="#symbian">Symbian OS Implementation</a>
+
+<br />&nbsp;<br />&nbsp;<br />
+<b>Supported Platforms</b>
+
+<br />&nbsp;<br />
+The Toolkit supports by default all Unix and Linux platforms, Windows
+platforms from Windows 2000 and newer, Mac OS X and Symbian OS.
+
+<br />&nbsp;<br />&nbsp;<br />
+<b><a name="unix"></a>Unix Implementation</b>
+
+<br />&nbsp;<br />
+All features and components delivered with the Toolkit work on all
+Unix and Linux platforms.  There are no special Unix platform related
+implementation issues with current version of Toolkit.
+
+
+<br />&nbsp;<br />&nbsp;<br />
+<b><a name="windows"></a>Windows Implementation</b>
+
+<br />&nbsp;<br />
+By default all features and components delivered with Toolkit are 
+supported on Windows.  However, there are some certain issues with the 
+Windows version of the Toolkit.
+
+<br />&nbsp;<br />
+<li>Some of the network routines do not support IPv6.
+
+
+<br />&nbsp;<br />&nbsp;<br />
+<b><a name="macosx"></a>Mac OS X Implementation</b>
+
+<br />&nbsp;<br />
+All features and components delivered with the Toolkit work on Mac
+OS X platform.  There are no special Mac OS X platform related
+implementation issues with current version of Toolkit.
+
+
+<br />&nbsp;<br />&nbsp;<br />
+<b><a name="symbian"></a>Symbian OS Implementation</b>
+
+<br />&nbsp;<br />
+Symbian OS support in Toolkit is still experimental.  By default all 
+features and components delivered with the Toolkit are supported and 
+should work on Symbian.  However, there are some issues with the Symbian 
+version of the Toolkit of what Symbian developers need to be aware.
+
+<br />&nbsp;<br />
+<li>The function <tt>silc_schedule</tt> on Symbian will allocate new Active 
+Scheduler Waiter and will block the calling thread.  The caller should 
+allocate Active Scheduler before calling <tt>silc_schedule</tt>.
+
+<li>When adding timeout tasks to SILC Scheduler the SILC Scheduler is woken 
+up after the timeout task has been added.  This allows adding of the 
+timeout tasks from Symbian active objects outside the SILC Scheduler loop.  
+On other platforms this wakeup operation is not performed.
+
+<li>Adding fd task to SILC Scheduler will not schedule the fd for any 
+operation.  Instead, programmer should use SILC Socket Stream API and SILC 
+Fd Stream API on Symbian when dealing with file descriptors and sockets.  
+These APIs provide asynchronous notification when data is available and can 
+be written.
+
+<li>The function <tt>silc_thread_create</tt> on Symbian will install Active 
+Scheduler and allocate Cleanup Stack for the new thread.  The created 
+thread always shares heap with the parent thread.
+
+</div> <!-- content -->
+
+</div> <!-- contentwrapper -->
+<div id="footer">
+<table border="0" cellspacing="0" cellpadding="6" width="100%">
+ <tr valign="top">
+  <td>Copyright &copy; 2001 - 2008 SILC Project<br />
+    <a href="http://silcnet.org">SILC Project Website</a></td>
+  <td align="right">
+   <a href="index.html">SILC Runtime Toolkit Manual</a><br />
+   <a href="masterindex.html">Index</a></small></td>
+  </td>
+ </tr>
+</table>
+</div>
+
+</body>
+</html>
+
diff --git a/doc/runtime.in/runtime.css b/doc/runtime.in/runtime.css
new file mode 100644 (file)
index 0000000..ecb2b70
--- /dev/null
@@ -0,0 +1,218 @@
+body {
+       width: 100%;
+       background-color: #fff;
+       font: normal 90% Arial, Helvetica, Verdana;
+       color: #454545;
+       margin-top: 0;
+       margin-left: 0;
+       margin-right: 0;
+}
+
+#logo {
+       font-size: 100%;
+       background-color: #eeeeee;
+       height: 46px;
+       margin-top: 0;
+       border-bottom: 1px solid #cacaca;
+}
+
+#logo a {
+       color: #9f7e40;
+       text-decoration: none;
+}
+
+#logo a:hover, #logo a:active {
+       color: #afaf77;
+}
+
+#contentwrapper {
+       float: left;
+       width: 100%;
+}
+
+#content {
+       font-size: 100%;
+       padding: 5px 5px 2px 10px;
+       margin-right: 245px;
+       border-right: 1px dotted #cacaca;
+}
+
+/* The content margin-right is 245 px.  To get navigation's dotted border
+   to same position as contents dotted border we have width 231 + right
+   border padding 4 + left border padding 10 == 245 px. */
+#navigation {
+       border-left: 1px dotted #cacaca;
+       width: 231px;
+       min-height: 590px;
+       position: relative;
+       float: right;
+       padding: 5px 4px 2px 10px;
+}
+
+#footer {
+       background-color: #eeeeee;
+       clear: left;
+       width: 100%;
+       font-size: 100%;
+       border-top: 1px solid #cacaca;
+}
+
+#footer a {
+       color: #9f7e40;
+       text-decoration: none;
+}
+
+#footer a:hover, #footer a:active {
+       color: #afaf77;
+}
+
+pre {
+       font-family: monospace;
+       margin: 12px;
+       padding: 5px;
+       white-space: pre;
+       color: #000;
+}
+
+pre.source {
+       background-color: #ffe;
+       border: dashed #aa9 1px;
+}
+
+p {
+       margin: 15px;
+}
+
+p.item_name  {
+       font-weight: bolder;
+       margin: 5px;
+       font-size: 110%;
+}
+
+ul.toc_entries {
+       list-style-image: url(./arrow.png);
+}
+
+a.menuitem {
+       font-size: 90%;
+       color: #9f7e40;
+       padding: 4px 1px 1px 5px;
+       background: url(./arrow.png) no-repeat center left;
+       text-align: left;
+       padding-left: 20px;
+}
+
+
+#extra, #extra a
+{
+}
+
+#content a {
+       color: #9f7e40;
+       text-decoration: none;
+}
+
+#content a:hover, #content a:active {
+       color: #afaf77;
+}
+
+a.indexitem {
+       display: block;
+}
+
+h1
+{
+       font-size: 220%;
+       margin-top: 0px;
+}
+
+h2
+{
+       font-size: 180%;
+       margin-top: 0px;
+}
+
+h3
+{
+       font-size: 133%;
+       margin-top: 0px;
+}
+
+h4
+{
+       font-size: 124%;
+       margin-top: 0px;
+}
+
+h5
+{
+       font-size: 115%;
+       margin-top: 0px;
+}
+
+h6
+{
+       font-size: 106%;
+       margin-top: 0px;
+}
+
+#navigation a {
+       text-decoration: none;
+}
+
+.menuitem:hover {
+       color: #afaf77;
+       text-decoration: none;
+}
+
+#extra a
+{
+    text-decoration: none;
+}
+
+#logo a
+{
+    text-decoration: none;
+}
+
+#extra a:hover
+{
+}
+
+
+.menuitem       {width: auto;}
+#content        {width: auto;}
+.menuitem       {display: block;}
+
+span.keyword
+{
+    color: #00F;
+}
+
+span.comment
+{
+    color: #080;
+}
+
+span.quote
+{
+    color: #F00;
+}
+
+span.squote
+{
+    color: #F0F;
+}
+
+span.sign
+{
+    color: #008B8B;
+}
+
+
+@media print
+{
+    #navigation {display: none;}
+    #content    {padding: 0px;}
+    #content a  {text-decoration: underline;}
+}
diff --git a/doc/runtime.in/runtime.rc b/doc/runtime.in/runtime.rc
new file mode 100644 (file)
index 0000000..535fe48
--- /dev/null
@@ -0,0 +1,32 @@
+options:
+       --src ../../lib/silcutil
+       --doc .
+       --html
+       --sectionnameonly
+       --syntaxcolors
+       --nopre
+       --nodesc
+       --no_subdirectories
+       --index
+       --documenttitle "SILC Runtime Toolkit"
+       --nosort
+       --multidoc
+       --one_file_per_header
+       --header_toc
+       --module_index_menu
+       --document_header header
+       --document_footer footer
+       --css runtime.css
+
+preformatted items:
+       EXAMPLE
+       SYNOPSIS
+       NAME
+
+ignore files:
+       Makefile*
+       tests
+       win32
+       symbian
+       *.c
+       *.in
diff --git a/includes/.cvsignore b/includes/.cvsignore
deleted file mode 100644 (file)
index 282522d..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
index b682a39c9b8d0a1e55656858a930228537162f77..17a55291c7121f0dc2404c776eacb4e838da3191 100644 (file)
 
 AUTOMAKE_OPTIONS = 1.0 no-dependencies foreign
 
-#ifdef SILC_DIST_TOOLKIT
 include_HEADERS = \
-       silc.h \
        silcwin32.h \
-       silcsymbian.h \
-       silcversion.h
-#endif SILC_DIST_TOOLKIT
+       silcsymbian.h
 
 EXTRA_DIST = \
-       silc.h \
        silcwin32.h \
        silcsymbian.h \
-       silcversion.h.in \
+       silccompile.h \
        silcdistdefs.h
diff --git a/includes/silc.h.in b/includes/silc.h.in
deleted file mode 100644 (file)
index f573e3d..0000000
+++ /dev/null
@@ -1,327 +0,0 @@
-/*
-
-  silc.h
-
-  Author: Pekka Riikonen <priikone@silcnet.org>
-
-  Copyright (C) 1997 - 2008 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; version 2 of the License.
-
-  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.
-
-*/
-/*
-  This file includes common definitions for SILC. This file MUST be included
-  by all files in SILC (directly or through other global include file).
-*/
-
-#ifndef SILCINCLUDES_H
-#define SILCINCLUDES_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Compilation time defines, for third-party software */
-@__SILC_HAVE_SIM@
-@__SILC_ENABLE_DEBUG@
-
-#if defined(HAVE_SILCDEFS_H)
-
-/* Automatically generated configuration header */
-#ifndef SILC_SYMBIAN
-#include "silcdefs.h"
-#else
-#include "../symbian/silcdefs.h"
-#endif /* SILC_SYMBIAN */
-#include "silcdistdefs.h"
-
-#else
-
-/* Autodetect CPU so that inline assembly in headers are enabled */
-
-#if defined(__i386__)
-#undef SILC_I386
-#define SILC_I386
-#undef SILC_I486
-#define SILC_I486
-#endif /* __i386__ */
-
-#if defined(__x86_64__)
-#undef SILC_X86_64
-#define SILC_X86_64
-#endif /* __x86_64__ */
-
-#if defined(__ia64__)
-#undef SILC_IA64
-#define SILC_IA64
-#endif /* __ia64__ */
-
-#if defined(__ppc__) || defined(__ppc64__)
-#undef SILC_POWERPC
-#define SILC_POWERPC
-#endif /* __ppc__ || __ppc64__ */
-
-#ifndef SILC_ALIGNMENT
-#define SILC_ALIGNMENT SILC_SIZEOF_VOID_P
-#endif /* SILC_ALIGNMENT */
-
-#endif /* HAVE_SILCDEFS_H */
-
-/* Platform specific includes */
-
-#if defined(SILC_WIN32)
-#include "silcwin32.h"
-#endif
-
-#if defined(SILC_SYMBIAN)
-#include "silcsymbian.h"
-#endif
-
-#ifndef DLLAPI
-#define DLLAPI
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdarg.h>
-#include <ctype.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <time.h>
-#include <dirent.h>
-
-#ifdef HAVE_SIGNAL_H
-#include <signal.h>
-#endif
-
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-
-#ifdef HAVE_ERRNO_H
-#include <errno.h>
-#endif
-
-#ifdef HAVE_ASSERT_H
-#include <assert.h>
-#endif
-
-#if !defined(SILC_WIN32)
-
-#include <unistd.h>
-#include <sys/time.h>
-#include <pwd.h>
-#include <sys/times.h>
-
-#ifdef HAVE_GRP_H
-#include <grp.h>
-#endif
-
-#ifdef SOCKS5
-#include "socks.h"
-#endif
-
-#include <sys/socket.h>
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-
-#ifdef HAVE_XTI_H
-#include <xti.h>
-#else
-#ifdef HAVE_NETINET_TCP_H
-#include <netinet/tcp.h>
-#endif
-#endif
-
-#ifdef HAVE_NETDB_H
-#include <netdb.h>
-#endif
-
-#ifdef HAVE_ARPA_INET_H
-#include <arpa/inet.h>
-#endif
-
-#ifdef HAVE_SYS_MMAN_H
-#include <sys/mman.h>
-#endif
-
-#ifdef HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#ifdef HAVE_LIMITS_H
-#include <limits.h>
-#endif
-
-#ifdef SILC_HAVE_PTHREAD
-#include <pthread.h>
-#endif
-
-#ifdef HAVE_STDDEF_H
-#include <stddef.h>
-#endif
-
-#ifdef HAVE_TERMIOS_H
-#include <termios.h>
-#endif
-
-#ifdef HAVE_UTIME_H
-#include <utime.h>
-#endif
-
-#ifdef HAVE_ICONV_H
-#include <iconv.h>
-#endif
-
-#ifdef HAVE_LOCALE_H
-#include <locale.h>
-#endif
-
-#ifdef HAVE_LANGINFO_H
-#include <langinfo.h>
-#endif
-
-#ifdef HAVE_SYS_RESOURCE_H
-#include <sys/resource.h>
-#endif
-
-#endif                         /* !SILC_WIN32 */
-
-/* Include generic SILC type definitions */
-#include "silcerrno.h"
-#include "silctypes.h"
-#include "silcbitops.h"
-#include "silcmutex.h"
-#include "silcatomic.h"
-#include "silcversion.h"
-
-/* SILC util library includes */
-#include "silcgetopt.h"
-#include "silclist.h"
-#include "silcstack.h"
-#include "silcmemory.h"
-#include "silcsnprintf.h"
-
-/* Math library includes */
-#include "silcmp.h"
-#include "silcmath.h"
-
-/* More SILC util library includes */
-#include "silctime.h"
-#include "silctimer.h"
-#include "silccond.h"
-#include "silcthread.h"
-#include "silcschedule.h"
-#include "silclog.h"
-#include "silcdir.h"
-#include "silcfileutil.h"
-#include "silcbuffer.h"
-#include "silcbuffmt.h"
-#include "silcasync.h"
-#include "silcdlist.h"
-
-/* Crypto library includes */
-#include "silccrypto.h"
-#include "silccipher.h"
-#include "silchash.h"
-#include "silchmac.h"
-#include "silcrng.h"
-#include "silcpkcs.h"
-#include "silcpk.h"
-#include "silcpkcs1.h"
-#ifdef SILC_DIST_ACC
-#include "silcacc.h"
-#endif /* SILC_DIST_ACC */
-#ifdef SILC_DIST_SSH
-#include "silcssh.h"
-#endif /* SILC_DIST_SSH */
-
-/* More SILC util library includes */
-#include "silcregex.h"
-#include "silcenv.h"
-#include "silcdll.h"
-#include "silchashtable.h"
-#include "silcstream.h"
-#include "silcnet.h"
-#include "silcbase64.h"
-#include "silcstrutil.h"
-#include "silcutf8.h"
-#include "silcstringprep.h"
-#include "silcutil.h"
-#include "silcconfig.h"
-#include "silcfsm.h"
-#include "silcsocketstream.h"
-#include "silcfdstream.h"
-#include "silcmime.h"
-
-#ifdef SILC_DIST_VCARD
-#include "silcvcard.h"
-#endif /* SILC_DIST_VCARD */
-
-#ifdef SILC_DIST_ASN1
-#include "silcasn1.h"
-#include "silcber.h"
-#endif /* SILC_DIST_ASN1 */
-
-/* SILC core library includes */
-#include "silcargument.h"
-#include "silcstatus.h"
-#include "silcid.h"
-#include "silccommand.h"
-#include "silcauth.h"
-#include "silcmessage.h"
-#include "silcchannel.h"
-#include "silcpacket.h"
-#include "silcnotify.h"
-#include "silcmode.h"
-#include "silcattrs.h"
-#include "silcpubkey.h"
-
-/* Application utility includes */
-#include "silcapputil.h"
-#ifdef SILC_DIST_IDCACHE
-#include "silcidcache.h"
-#endif /* SILC_DIST_IDCACHE */
-
-#ifdef SILC_DIST_SKR
-#include "silcskr.h"
-#endif /* SILC_DIST_SKR */
-
-#if defined(SILC_SIM)
-/* SILC Module library includes */
-#include "silcsim.h"
-#include "silcsimutil.h"
-#endif
-
-/* SILC Key Exchange library includes */
-#include "silcske.h"
-#include "silcske_payload.h"
-#include "silcske_groups.h"
-#include "silcconnauth.h"
-
-#ifdef SILC_DIST_SFTP
-/* SILC SFTP library */
-#include "silcsftp.h"
-#include "silcsftp_fs.h"
-#endif /* SILC_DIST_SFTP */
-
-#ifdef SILC_DIST_HTTP
-/* SILC HTTP library */
-#include "silchttpserver.h"
-#include "silchttpphp.h"
-#endif /* SILC_DIST_HTTP */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* SILCINCLUDES_H */
diff --git a/includes/silcversion.h.in b/includes/silcversion.h.in
deleted file mode 100644 (file)
index 45a65c9..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
-
-  silcversion.h
-
-  Author: Pekka Riikonen <priikone@silcnet.org>
-
-  Copyright (C) 1997 - 2007 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; version 2 of the License.
-
-  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.
-
-*/
-
-#ifndef SILCVERSION_H
-#define SILCVERSION_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Version check macro.  Use this to check that package is of specific
-   version compile time.  Use the __SILC_XXX_VERSION below in comparison. */
-#define SILC_VERSION(a, b, c) (((a) << 24) + ((b) << 16) + ((c) << 8)
-@__SILC_PACKAGE_VERSION@
-
-#define SILC_VERSION_STRING "@VERSION@"
-#define SILC_DIST_VERSION_STRING "@VERSION@"
-#define SILC_PROTOCOL_VERSION_STRING "SILC-1.2-@VERSION@ @PACKAGE@"
-#define SILC_NAME "SILC @PACKAGE_NAME@"
-
-/* SILC Protocol version number */
-#define SILC_PROTOCOL_VERSION_CURRENT 12
-
-/* SILC version string */
-#define silc_version SILC_VERSION_STRING
-#define silc_dist_version SILC_DIST_VERSION_STRING
-#define silc_version_string SILC_PROTOCOL_VERSION_STRING
-#define silc_name SILC_NAME
-#define silc_fullname "Secure Internet Live Conferencing"
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* SILCVERSION_H */
diff --git a/lib/.gitignore b/lib/.gitignore
deleted file mode 100644 (file)
index a501f92..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-Makefile
-*.in
-*.am
-*.o
-*.lo
-*.la
-*.a
-*.pc
index 0fbdfd86a58e8d028368792db8f67d422c50ee1a..1408d693a4fec4672610070e59856ec0a31eeecc 100644 (file)
 
 AUTOMAKE_OPTIONS = 1.0 no-dependencies foreign
 
-SUBDIRS=
+RUNTIME_BASE_VERSION=@RUNTIME_BASE_VERSION@
+RUNTIME_CURRENT=@RUNTIME_CURRENT@
+RUNTIME_REVISION=@RUNTIME_REVISION@
+RUNTIME_AGE=@RUNTIME_AGE@
 
-include Makefile.runtime
+# SILC Library dirs
+RUNTIME_DIRS =                 \
+       contrib         \
+       silcutil
+
+if SILC_ENABLE_SHARED
+if SILC_WIN32
+LIBTOOL_OPTS= -release $(RUNTIME_BASE_VERSION) -rpath $(DESTDIR)$(libdir) \
+              -export-dynamic -no-undefined
+else
+LIBTOOL_OPTS= -release $(RUNTIME_BASE_VERSION) -rpath $(DESTDIR)$(libdir)
+endif
+LIBTOOL_RUNTIME_VERSION = \
+   -version-info $(RUNTIME_CURRENT):$(RUNTIME_REVISION):$(RUNTIME_AGE)
+else
+LIBTOOL_OPTS=
+LIBTOOL_RUNTIME_VERSION =
+endif
+if SILC_WIN32
+RUNTIME_LINK_LIBS=$(LIBS)
+else
+RUNTIME_LINK_LIBS=
+endif
+
+RUNTIME_LIB = libsrt.a
+
+SUBDIRS = $(RUNTIME_DIRS)
+
+CLEANFILES = $(RUNTIME_LIB)
+DISTCLEANFILES = $(RUNTIME_LIB)
+
+remove:
+       -rm -f $(CLEANFILES)
+
+all:
+       $(MAKE) remove $(RUNTIME_LIB)
+
+install-exec-hook:
+       -mkdir -p $(DESTDIR)$(libdir)
+       -$(LIBTOOL) $(INSTALL) libsrt.la $(DESTDIR)$(libdir)/
+
+libsrt.a:
+       find $(RUNTIME_DIRS) -type f -name *.lo | xargs \
+       $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) \
+       $(RUNTIME_LINK_LIBS) \
+       $(LIBTOOL_RUNTIME_VERSION) \
+       $(LIBTOOL_OPTS) -o libsrt.la
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = srt.pc
+
+EXTRA_DIST = srt.pc.in
+
+#srt-install:
+#      -mkdir -p $(docdir)/toolkit/
+#      -$(INSTALL_DATA) $(top_srcdir)/doc/toolkit/* $(docdir)/toolkit
+#      -$(INSTALL_DATA) $(top_srcdir)/lib/doc/*.gif $(docdir)/toolkit
+#      -cp -R $(top_srcdir)/tutorial $(docdir)
+
+#install-data-hook:    \
+#      srt-install
 
 include $(top_srcdir)/Makefile.defines.in
diff --git a/lib/Makefile.runtime.ad b/lib/Makefile.runtime.ad
deleted file mode 100644 (file)
index c71f102..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-#
-#  Makefile.runtime.am
-#
-#  Author: Pekka Riikonen <priikone@silcnet.org>
-#
-#  Copyright (C) 2008 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; version 2 of the License.
-#
-#  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.
-#
-
-RUNTIME_BASE_VERSION=@RUNTIME_BASE_VERSION@
-RUNTIME_CURRENT=@RUNTIME_CURRENT@
-RUNTIME_REVISION=@RUNTIME_REVISION@
-RUNTIME_AGE=@RUNTIME_AGE@
-
-# SILC Library dirs
-RUNTIME_DIRS =                 \
-       contrib         \
-       silcutil
-
-if SILC_ENABLE_SHARED
-if SILC_WIN32
-LIBTOOL_OPTS= -release $(RUNTIME_BASE_VERSION) -rpath $(DESTDIR)$(libdir) \
-              -export-dynamic -no-undefined
-else
-LIBTOOL_OPTS= -release $(RUNTIME_BASE_VERSION) -rpath $(DESTDIR)$(libdir)
-endif
-LIBTOOL_RUNTIME_VERSION = \
-   -version-info $(RUNTIME_CURRENT):$(RUNTIME_REVISION):$(RUNTIME_AGE)
-else
-LIBTOOL_OPTS=
-LIBTOOL_RUNTIME_VERSION =
-endif
-if SILC_WIN32
-RUNTIME_LINK_LIBS=$(LIBS)
-else
-RUNTIME_LINK_LIBS=
-endif
-
-RUNTIME_LIB = libsrt.a
-
-SUBDIRS += $(RUNTIME_DIRS)
-
-CLEANFILES = $(RUNTIME_LIB)
-DISTCLEANFILES = $(RUNTIME_LIB)
-
-remove:
-       -rm -f $(CLEANFILES)
-
-all:
-       $(MAKE) remove $(RUNTIME_LIB)
-
-install-exec-hook:
-       -mkdir -p $(DESTDIR)$(libdir)
-       -$(LIBTOOL) $(INSTALL) libsrt.la $(DESTDIR)$(libdir)/
-
-libsrt.a:
-       find $(RUNTIME_DIRS) -type f -name *.lo | xargs \
-       $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) \
-       $(RUNTIME_LINK_LIBS) \
-       $(LIBTOOL_RUNTIME_VERSION) \
-       $(LIBTOOL_OPTS) -o libsrt.la
-
-pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = srt.pc
-
-EXTRA_DIST = srt.pc.in
-
-#srt-install:
-#      -mkdir -p $(docdir)/toolkit/
-#      -$(INSTALL_DATA) $(top_srcdir)/doc/toolkit/* $(docdir)/toolkit
-#      -$(INSTALL_DATA) $(top_srcdir)/lib/doc/*.gif $(docdir)/toolkit
-#      -cp -R $(top_srcdir)/tutorial $(docdir)
-
-#install-data-hook:    \
-#      srt-install
diff --git a/lib/contrib/.gitignore b/lib/contrib/.gitignore
deleted file mode 100644 (file)
index 282522d..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
index 93565e0beeea61f07687c226ec04e1c57d4f15ab..97d75eba7de0bc09cb75a3f482dd134202b56eaa 100644 (file)
@@ -1,13 +1,13 @@
 <!--
- Index file for SILC Toolkit Reference Manual. This file is processed with
- the SILC Document generator.
+ Index file for SILC Runtime Toolkit Reference Manual. This file is 
processed with the SILC Document generator.
 -->
 
 <big><b>SILC Toolkit Reference Manual</b></big>
 <br />
 <small>
 Version: @VERSION@<br />
-Copyright &copy; 1997 - 2007 The SILC Project<br />
+Copyright &copy; 1997 - 2008 The SILC Project<br />
 Updated: @DATE@
 </small>
 <br /><br /><br />
index 35745dac9e2dc1dee55e6789f2b34665e1bbd8d1..88c83b46f66b421ad0298d9704a46409928cbf10 100644 (file)
@@ -1,11 +1,11 @@
 <big><b>Building the Toolkit</b></big>
 
 <br />&nbsp;<br />
-SILC Toolkit works on various platforms, such as on several Unix systems and
-on Windows.  Building of the Toolkit on some platform may differ from the
-other.  This document describes how to build the Toolkit from the sources,
-to create linkable libraries and binaries, on all platforms the Toolkit
-support.
+SILC Runtime Toolkit works on various platforms, such as on several Unix 
+systems and on Windows.  Building of the Toolkit on some platform may 
+differ from the other.  This document describes how to build the Toolkit 
+from the sources, to create linkable libraries and binaries, on all 
+platforms the Toolkit support.
 
 <br />&nbsp;<br />
 The building instructions for all platforms are also included in the Toolkit
@@ -23,13 +23,8 @@ README.MACOSX for building on Mac OS X.
 <b><a name="unix"></a>Building on Unix & Linux</b>
 
 <br />&nbsp;<br />
-Building the Toolkit on Unix will produce binaries of all libraries, and
-SILC Client and SILC Server.  The Toolkit package includes also Client and
-Server as an example applications, and they are compiled automatically.
-The libraries are compiled to provide staticly linkable libraries.  Two
-libraries are produced: libsilc.a and libsilcclient.a.  The libsilc.a includes
-everything else except the Client library.  The libsilcclient.a includes
-only the Client library.
+On Unix systems both statically and dynamically linkable libraries are 
+built by default.
 
 <br />&nbsp;<br />
 To build Toolkit on Unix systems, give commands:
@@ -60,15 +55,6 @@ you can give this option to the `configure'.  It is recommended to use
 this option when you are doing development with Toolkit.  It is helpful
 to enable run-time debugging.
 
-<br />&nbsp;<br />
-<tt>--with-gmp[=DIR]</tt>
-
-<br />&nbsp;<br />
-If you wish to use GMP library for arbitrary precision arithmetic
-library instead of using the MPI library included in the package, you can
-give the --with-gmp[=DIR] option to the `configure'. The DIR is the upper
-path in your system which contains lib/ and include/ for GMP library.
-
 <br />&nbsp;<br />
 <tt>--with-iconv[=DIR]</tt>
 
@@ -105,6 +91,17 @@ The `configure' will attempt to check for IPv6 support in your system.
 However, if it fails, but you still want to compile in the IPv6 support
 you can give --enable-ipv6 option to force the IPv6 support.
 
+<br />&nbsp;<br />
+<tt>--disable-cpu-optimizations</tt>
+
+<br />&nbsp;<br />
+By default the configure script will attempt to detect the type of your 
+CPU and enable any features specific to your CPU that could optimize the 
+performance of the Toolkit.  If you are creating binary package that 
+should work on any CPU (and not only your CPU) you should diable these 
+optimizations.  If you compile it for yourself only, keeping the 
+optimizations enabled is recommended.
+
 <br />&nbsp;<br />
 After compilation you can install the Toolkit into your system by giving
 the command:
@@ -126,25 +123,10 @@ Toolkit package.
 <br />&nbsp;<br />
 The Toolkit package includes ready MSVC++ Workspace files, that will
 automatically compile the Toolkit.  The MSVC++ workspace and project files
-resides in the win32/ subdirectory of the Toolkit package.  The `silc.dsw'
+resides in the win32/ subdirectory of the Toolkit package.  The `srt.dsw'
 file is the workspace file that automatically supports compiling the Toolkit
-and to generate the SILC Core DLL and SILC Client DLL libraries.
-
-<br />&nbsp;<br />
-The SILC Core DLL is named as libsilc and will generate libsilc.dll, and
-the SILC Client DLL is named as libsilcclient and will generate
-libsilcclient.dll.  Both of the projects also automatically generates
-libsilc.lib and libsilcclient.lib import libraries that may be used to
-link against a client application.
-
-<br />&nbsp;<br />
-Generally you do not need to do any specific settings to compile the
-Toolkit.  However, you must compile the libsilc before compiling the
-libsilclient, since the SILC Client DLL depends on the SILC Core DLL.
-You may compile the DLLs as either Release or Debug version.  Just select
-the preferred method of compilation.  The Debug version will compile the
-SILC Toolkit with run-time debugging support, which is recommended when
-doing development with the Toolkit.
+and to generate the SILC Runtime DLL (libsrt.dll).  You may also compile 
+debug version by selecteing the Debug compilation method.
 
 <br />&nbsp;<br />&nbsp;<br />
 <b><a name="macosx"></a>Building on Mac OS X</b>
@@ -169,14 +151,10 @@ command:
 <tt>./configure --help</tt>
 
 <br />&nbsp;<br />
-If you do not want to compile the applications, or they do not compile on
-your system, you can also choose to compile only the libraries, and skip
-all applications.  In this case, before giving the "make" command, go
-to the lib/ subdirectory, and give "make" command there:
+To compile, give:
 
 <br />&nbsp;<br />
 <tt>
-cd lib/<br />
 make
 </tt>
 
@@ -206,16 +184,16 @@ CTags and the SDK.  Perl and the SDK are required, but CTags is
 optional and if necessary can be omitted.
 
 <br />&nbsp;<br />
-The SILC Toolkit is generic C and C++ code and should work with any
+The Toolkit is generic C and C++ code and should work with any
 SDK.  If you don't have SDK already installed, install the latest
 version you can find.  The links to SDKs are found in the Carbide.c++
 instructions after installation.  If you already have SDK in your
 system, you should use that.
 
 <br />&nbsp;<br />
-After installation import the SILC Toolkit project to Carbide.c++ from the
-symbian/ subdirectory in the SILC Toolkit package.
+After installation import the Toolkit project to Carbide.c++ from the
+symbian/ subdirectory in the Toolkit package.
 
 <br />&nbsp;<br />
-Please read the README.SYMBIAN from the SILC Toolkit package for complete
-building instructions.
+Please read the README.SYMBIAN from the SILC Runtime Toolkit package for 
+complete building instructions.
index c34c500d0ecc6ceb2a42421b3afce0659c5daafe..bfa0996ad9c53307d488017b26b0335b0283651a 100644 (file)
@@ -1,10 +1,10 @@
 <big><b>Platform Implementations</b></big>
 
 <br />&nbsp;<br />
-This document describes the implementation issues with different platforms
-that the SILC Toolkit support.  Some of the supported platforms does not
-support all the features delivered with the Toolkit or they may behave
-differently from other platforms.
+This document describes the implementation issues with different platforms 
+that the SILC Runtime Toolkit support.  Some of the supported platforms 
+does not support all the features delivered with the Toolkit or they may 
+behave differently from other platforms.
 
 <br />&nbsp;<br />
 <li><a href="#unix">Unix & Linux Implementation</a><br />
@@ -16,25 +16,25 @@ differently from other platforms.
 <b>Supported Platforms</b>
 
 <br />&nbsp;<br />
-SILC Toolkit supports by default all Unix and Linux platforms, Windows
+The Toolkit supports by default all Unix and Linux platforms, Windows
 platforms from Windows 2000 and newer, Mac OS X and Symbian OS.
 
 <br />&nbsp;<br />&nbsp;<br />
 <b><a name="unix"></a>Unix Implementation</b>
 
 <br />&nbsp;<br />
-All features and components delivered with the SILC Toolkit work on all
+All features and components delivered with the Toolkit work on all
 Unix and Linux platforms.  There are no special Unix platform related
-implementation issues with current version of SILC Toolkit.
+implementation issues with current version of Toolkit.
 
 
 <br />&nbsp;<br />&nbsp;<br />
 <b><a name="windows"></a>Windows Implementation</b>
 
 <br />&nbsp;<br />
-By default all features and components delivered with SILC Toolkit are 
+By default all features and components delivered with Toolkit are 
 supported on Windows.  However, there are some certain issues with the 
-Windows version of the SILC Toolkit.
+Windows version of the Toolkit.
 
 <br />&nbsp;<br />
 <li>Some of the network routines do not support IPv6.
@@ -44,19 +44,19 @@ Windows version of the SILC Toolkit.
 <b><a name="macosx"></a>Mac OS X Implementation</b>
 
 <br />&nbsp;<br />
-All features and components delivered with the SILC Toolkit work on Mac
+All features and components delivered with the Toolkit work on Mac
 OS X platform.  There are no special Mac OS X platform related
-implementation issues with current version of SILC Toolkit.
+implementation issues with current version of Toolkit.
 
 
 <br />&nbsp;<br />&nbsp;<br />
 <b><a name="symbian"></a>Symbian OS Implementation</b>
 
 <br />&nbsp;<br />
-Symbian OS support in SILC Toolkit is still experimental.  By default all 
-features and components delivered with SILC Toolkit are supported and 
+Symbian OS support in Toolkit is still experimental.  By default all 
+features and components delivered with the Toolkit are supported and 
 should work on Symbian.  However, there are some issues with the Symbian 
-version of the SILC Toolkit of what Symbian developers need to be aware.
+version of the Toolkit of what Symbian developers need to be aware.
 
 <br />&nbsp;<br />
 <li>The function <tt>silc_schedule</tt> on Symbian will allocate new Active 
diff --git a/lib/doc/porting.html b/lib/doc/porting.html
deleted file mode 100644 (file)
index 64a89f7..0000000
+++ /dev/null
@@ -1,678 +0,0 @@
-<big><b>Porting from Toolkit 1.0 to 1.1</b></big>
-
-<br />&nbsp;<br />
-This documents describes the differences between the SILC Toolkit 1.0 and
-1.1 and should help application programmers to port their SILC applications
-to the new Toolkit version.
-
-<br />&nbsp;<br />
-<li><a href="#general">General</a><br />
-<li><a href="#platform">Platform changes</a>
-<li><a href="#client">Client library</a><br />
-<li><a href="#util">Utility library</a><br />
-<li><a href="#apputil">Application utility library</a>
-<li><a href="#crypto">Crypto library</a>
-<li><a href="#skr">Key Repository library</a>
-<li><a href="#vcard">VCard library</a>
-<li><a href="#http">HTTP library</a>
-<li><a href="#asn1">ASN.1 library</a>
-
-<br />&nbsp;<br />
-<h3><a name="general"></a>General changes</h3>
-
-The main SILC Toolkit header file has changed its name from silcincludes.h
-to silc.h.  The first task in porting from 1.0 to 1.1 is to change these
-filenames in your source tree.
-
-
-<br />&nbsp;<br />
-<h3><a name="platform"></a>Platform changes</h3>
-
-The Windows support has been made better by improving the SILC scheduler
-and network routines.  Calling silc_net_win32_init and silc_net_win32_uninit
-is not needed anymore.  The network routines on Windows are enabled
-automatically.
-
-
-<br />&nbsp;<br />
-<h3><a name="client"></a>Client library, lib/silcclient/</h3>
-
-The client library in Toolkit 1.1 has been partially rewritten.  It was
-rewritten to work out some technical issues and to increase performance
-and decrease memory consumption.  The client library API has also faced
-some changes, altough most of it has remained the same.  Most major change
-in the client library is that is now fully supports multiple threads.  In
-the past making multithreaded SILC client application was always a bit hard
-but with Toolkit 1.1 it should be relatively straightforward.
-
-<h4>SilcClientOperations structure</h4>
-
-The SilcClientOperations structure has changed significantly.  It no longer
-has `connected', `disconnected' and `failure' function pointers.  Instead a
-new SilcClientConnectCallback has been defined that is given as argument to
-functions like silc_client_connect_to_server, silc_client_connect_to_client
-and silc_client_key_exchange (last two being entirely new functions in the
-API).  That callback is called when connection is established and when it
-is disconnected, or if a protocol failure occurred during connecting.  That
-callback also delivers a detailed error information when error occurs.  New
-connection related status types in SilcClientConnectionStatus has also been
-added, see the API for the details.
-
-<br />&nbsp;<br />
-Also the `detach' client operation function pointer has been removed.  Instead
-the detachment data is now simply delivered in the SILC_COMMAND_DETACH
-command reply.
-
-<br />&nbsp;<br />
-Some of the remaining client operation function pointers have changed a bit.
-Most major change is the `command' operation now having the arguments that
-user gave on the user interface sent back to application.  The `command_reply'
-does not anymore include the SilcCommandPayload as an argument.  Also the
-variable argument lis is now delivered as va_list.  Also the boolean
-success indicator is removed and SilcStatus error argument instead is telling
-the exact error if the SilcStatus status is other than SILC_STATUS_OK.
-
-<br />&nbsp;<br />
-The `get_auth_method' client operation now includes the authentication method
-that has been resolved from the remote server.  The application no longer
-needs to resolve it and the function silc_client_request_authentication_method
-has been removed from the API.
-
-<br />&nbsp;<br />
-The `verify_public_key' client operation now include the SilcPublicKey pointer
-instead of the public key in raw encoded form.  Also the connection type
-argument has changed to SilcConnectionType.
-
-<br />&nbsp;<br />
-The `key_agreement' client operation now includes a new protocol argument
-which tells whether the key agremeent is supposed to be done on TCP or on
-UDP transport.  The new Toolkit 1.1 supports both.
-
-<h4>SilcClient</h4>
-
-The SilcClientParams includes new fields and some fields have been removed
-or moved to other places.  All connection timeout related fields have been
-moved to SilcClientConnectionParams.  The nickname_parse callback pointer has
-also been removed from SilcClientParams.  The Toolkit 1.1 now automatically
-parses formatted nicknames.
-
-<br />&nbsp;<br />
-The new field boolean `threads' can be used to tell whether the new SilcClient
-is to use multiple threads or not. If threads support has been compiled in
-and that field is set to TRUE then the client library will create new thread
-for each new connection to a remote host.  If you are going to use several
-connections or some of the connections are high throughput connections (like
-multimedia connections) then using threads is recommended for performance.
-Note that your application needs to be multithreaded and, if necessary to,
-perform concurrencly control in client operation callbacks which may be
-called from multiple threads at the same time for different connections.
-However, it is always guaranteed that for one connection the client
-operations cannot be called from multiple threads.  The multithreads
-support in Toolkit 1.1 client library means that each new connection and
-everything related to that connection is handled in own dedicated thread.
-
-<br />&nbsp;<br />
-The silc_client_init function now takes several new arguments.  It now takes
-the username, hostname and realname as argument that used to be required
-by the application to update directly to SilcClient pointer.  This is not
-longer required.  Also the nickname is no longer required to be put to
-SilcClient context as it has been made SilcClientConnection specific.
-The function also takes a SilcClientRunning callback as argument which will
-be called when the client library is running.  Only after the callback is
-delivered may the application start using other client library API functions.
-For example, connecting to a server will fail if it is performed before
-the SilcClientRunning callback is called.  The callback is called after the
-silc_client_run or silc_client_run_one has been called.
-
-<br />&nbsp;<br />
-The silc_client_stop function takes new SilcClientStopped callback as
-argument, and it will be called after the client library has been completely
-stopped.  The application should not quit before that is called in order
-to clean up all resources allocation by the client library.
-
-<br />&nbsp;<br />
-It is also not required to put the public key pair (SilcPublicKey and
-SilcPrivateKey) into SilcClient.  They have been made connection specific so
-you simply give them as argument when you create new connection.  This way
-it is now possible to use different key pairs with different connections,
-one that was not possible in Toolkit 1.0 without creating new SilcClient
-instance for each new connection.
-
-<h4>SilcClientConnection</h4>
-
-The SilcClientConnection represents connection to a remote host.  In new
-Toolkit 1.1 this structure now includes all connection related data and
-no connection related data is anymore included in SilcClient.  For this
-reason it is no longer necessary to create multiple SilcClient instances
-just because you want to create multiple connections.
-
-<br />&nbsp;<br />
-The SilcClientConnectionParams structure has many new fields.  This structure
-is given as argument to any function that is able to create a new connection
-or to create a network listener or to create a new SILC sessions.  See the
-API documentation for all the details but the following one field of special
-relevance when creating new SILC server connections.  The nickname field is
-now included in this structure and it is the nickname user would like to
-initially use in the SILC network.
-
-<br />&nbsp;<br />
-The functions silc_client_connect_to_server, silc_client_connect_to_client
-and silc_client_key_exchange can all be used to create new SILC session with
-a remote.  To connect SILC server use silc_client_connect_to_server.  You
-now give the SilcClientConnectionParams as argument which includes the 
-nicknameuser wants to use, you now can give the public key pair as argument that is
-to be used in the connecting.  The new SilcClientConnectCallback will be
-called once the connection has been established and it delivers the
-SilcClientConection context to the application.  It will be later called
-again to indicated disconnection from the remote host.  These functions
-now return SilcAsyncOperation context which can be used to cancel the
-connecting, if necessary.  In the past canceling connection was not possible.
-
-<br />&nbsp;<br />
-<pre>
-SilcAsyncOperation op;
-SilcClientConnectionParams params;
-
-memset(&params, 0, sizeof(params));
-
-/* Set nickname user wants to use */
-params.nickname = nickname;
-
-/* Set perfect forward secery for key exchange */
-params.pfs = TRUE;
-
-/* Example of creating, and then canceling a connection */
-op = silc_client_connect_to_server(client, params, public_key, private_key,
-                                   remote_host, remote_port, connection_cb,
-                                  app_context);
-if (!op) {
-  fatal("Connecting failed immediately"));
-  exit(1);
-}
-
-...
-
-/* Cancel connecting.  After canceling the `connection_cb' will not be
-   called. */
-silc_async_abort(op);
-</pre>
-
-<br />&nbsp;<br />
-The old function silc_client_start_key_exchange has been replaced with
-silc_client_key_exchange function.  Semantically it is equivalent to
-silc_client_connect_to_server but it does not create new connection.  Instead,
-it accepts SilcStream as argument which is already established connection
-to a remote host and it merely starts the key exchange.  See an example
-in the API documentation on how to use the silc_client_key_exchange, if
-your application wishes itself to create connection instead of using the
-client library to do it.
-
-The functions silc_client_add_connection, silc_client_del_connection and
-silc_client_del_socket has been removed.  They are no longer needed.
-
-<h4>Entries</h4>
-
-Just like in Toolkit 1.0 we now have SilcClientEntry to represent user,
-SilcChannelEntry to represent channel and SilcServerEntry to represent
-server.  In the past these structures and all API functions that dealt
-with them were in <a href="silcclient.html">silcclient.h</a> file.  They
-are now in <a href="silcclient_entry.html">silcclient_entry.h</a> in
-Toolkit 1.1.
-
-<br />&nbsp;<br />
-As an general convention each of these new entries now are reference
-counted and they have locks when using them in multithreaded application.
-Even in one-threaded application the application must always acquire a
-reference of the entry if it wishes to save the entry pointer in the
-application.  The reference must be released once the entry pointer is
-not needed anymore.  This ensures that the library cannot free the entry
-pointer underneath the application.  An own API for taking and releasing
-the reference is in Toolkit 1.1.
-
-<br />&nbsp;<br />
-<pre>
-/* Take reference of the client entry I save to my own context. */
-my_context->client_entry = silc_client_ref_client(client, conn, client_entry);
-</pre>
-
-<br />&nbsp;<br />
-If multiple threads are used and application wants to access the entry it
-must always first lock the entry.  After application has read the information
-it needs from the entry it must release the entry lock.  The entry lock
-should be held only for short periods of time and failure to release the
-lock will result into deadlock.   An own API for taking and releasing the
-entry lock is in Toolkit 1.1.  If you application is not multithreaded
-you do not need to use the entry locking.
-
-<br />&nbsp;<br />
-<pre>
-/* Read data from client entry in multithreaded environment */
-silc_client_lock_client(client_entry);
-fprintf(stdout, "%s\n", client_entry->nickname);
-fprintf(stdout, "%s\n", silc_id_render(SILC_ID_CLIENT, &client_entry->id));
-silc_client_unlock_client(client_entry);
-</pre>
-
-<br />&nbsp;<br />
-From the entries all unnecessary information for application has been either
-removed or moved to internal structure that is not accessible by the
-application.  As a result the entry structures are much smaller and cleaner.
-
-<br />&nbsp;<br />
-The SilcClientEntry now includes nickname_normalized field and it is the
-normalized version of the user's nickname, in case application needs it.
-It is also guaranteed in Toolkit 1.1 that the nickname inside SilcCientEntry
-is always valid nickname.
-
-<br />&nbsp;<br />
-The SilcChannelEntry now includes new channel_pubkeys list, which includes
-the channel public keys if they have added to the channel.  This information
-was not present in Toolkit 1.0.
-
-<br />&nbsp;<br />
-The SilcServerEntry now includes new field public_key, which is the server's
-public key if we have resolved it.  This information was not present in
-Toolkit 1.0.
-
-<br />&nbsp;<br />
-In Toolkit 1.1 it is now easier to search and resolve entries.  As a new
-feature it now also possible to search and resolve server entries from the
-SILC network.  See the API documentation for all the details on searching
-entries from the client library cache and from the SILC network.
-
-<h4>Sending/Receiving messages</h4>
-
-Sending messages has not much changed from the Toolkit 1.1.  In Toolkit 1.1
-the message may now safely be sent in from multiple threads for same client
-or for same channel.  In case the message are digitally signed the hash
-function used in the signature computation must now be given as argument.
-If this is done in multiple threads, each thread must use different SilcHash
-context because SilcHash does not support multiple threads.  Simply allocate
-new SilcHash for each thread where you send digitally signed messages.
-
-<br />&nbsp;<br />
-Receiving message is same as in Toolkit 1.0.  You receive private_message
-or channel_message client operation.  It is always guaranteed that even in
-multithreaded application the messages are received in one thread.  You need
-concurrency control in your application only if you access shared data in
-your client operation callbacks.
-
-<br />&nbsp;<br />
-In Toolkit 1.1 as a new feature it is also possible to wait for incoming
-private messages in a thread.  New function silc_client_private_message_wait
-can be used to block the calling process or thread until private message
-for the specified client is received.
-
-<h4>Calling and sending commands</h4>
-
-Just like in Toolkit 1.0 in Toolkit 1.1 you can call command implemented
-inside the client library with silc_client_command_call.  The command_reply
-client operation will be called once the command reply has arrived.
-
-<br />&nbsp;<br />
-As a major change in semantics of sending commands with the
-silc_client_command_send function is the way the command reply is handled
-in Toolkit 1.1.  In the new Toolkit the command_reply client operation will
-not be anymore called for commands that has been sent with
-silc_client_command_send.  The command_reply client operation is called only
-when silc_client_command_call function is used.  With silc_client_command_send
-you can give the command reply callback, SilcClientCommandReply, as argument,
-and it will be called for each command reply that is received from the
-server.
-
-<br />&nbsp;<br />
-Just likein 1.0 in 1.1 it is also possible to attach to pending commands
-by using silc_client_command_pending.  As a difference to 1.0 the command
-identifier is not anymore available to application from the
-SilcClientConnection context.  Instead the silc_client_command_call and
-silc_client_command_send return the command identifier, and application needs
-to save it in order to be able to attach to it at later time.  However,
-this feature is not expected to be very important for application
-programmers as the new silc_client_command_send already includes the
-command reply callback.
-
-<br />&nbsp;<br />
-<pre>
-Comparison between 1.0 and 1.1
-
-Toolkit 1.0:
-/* Send ping command.  The reply will be in the attached command reply
-   and in the command_reply client operation. */
-silc_client_command_send(client, conn, SILC_COMMAND_PING, ++conn->cmd_ident,
-                        1, 1, server_id, server_id_len);
-silc_client_command_pending(conn, SILC_COMMAND_PING, conn->cmd_ident,
-                            ping_command_reply, context);
-
-Toolkit 1.1:
-/* Send ping command.  The reply will be ping_command_reply function. */
-silc_client_command_send(client, conn, SILC_COMMAND_PING,
-                         ping_command_reply, context,
-                        1, 1, server_id, server_id_len);
-
-</pre>
-
-<h4>Notify arguments</h4>
-
-In Toolkit 1.1 the following notify arguments have had changes.  See
-the <a href="notifyargs.html">Notify Arguments</a> for details.  You should
-go through your application and change the handling of the following notify
-messages for Toolkit 1.1.
-
-<br />&nbsp;<br />
-SILC_NOTIFY_TYPE_NICK_CHANGE<br />
-SILC_NOTIFY_TYPE_CMODE_CHANGE<br />
-SILC_NOTIFY_TYPE_SIGNOFF<br />
-SILC_NOTIFY_TYPE_SERVER_SIGNOFF<br />
-
-<br />&nbsp;<br />
-The basic changes in notify arguments from Toolkit 1.0 is that the
-Toolkit 1.1 parses various lists and other raw data for the application as
-opposed to sending them in the raw format.  This makes programming easier.
-
-<h4>Command reply arguments</h4>
-
-In Toolkit 1.1 the following command reply arguments have had changes.  See
-the <a href="command_reply_args.html">Command Reply Arguments</a> for
-details.  You should go through your application and change the handling
-of the following command replies for Toolkit 1.1.
-
-<br />&nbsp;<br />
-SILC_COMMAND_WHOIS<br />
-SILC_COMMAND_INVITE<br />
-SILC_COMMAND_STATS<br />
-SILC_COMMAND_JOIN<br />
-SILC_COMMAND_CMODE<br />
-SILC_COMMAND_BAN<br />
-SILC_COMMAND_DETACH<br />
-SILC_COMMAND_USERS<br />
-
-<br />&nbsp;<br />
-The basic changes in command reply arguments from Toolkit 1.0 is that the
-Toolkit 1.1 parses various lists and other raw data for the application as
-opposed to sending them in the raw format..  This makes programming easier.
-
-<h4>Other changes in client library</h4>
-
-There are many other smaller changes in Toolkit 1.1 that require you to
-change your application when porting from Toolkit 1.0.  We are not listing
-all of them here but briefly mention some API changes.
-
-<br />&nbsp;<br />
-Listing channel private keys now return SilcDList instead of an array.
-
-<br />&nbsp;<br />
-The key agreement API has changed a little bit and is now more cleaner and
-supports all the features that are needed in full featured key agreement.
-The silc_client_peform_key_agreement_fd has been replaced by
-silc_client_perform_key_agreement_stream.
-
-<br />&nbsp;<br />
-The private message key API has slight changes also.  It is no longer
-necessary for the caller to specify whether the private message key is for
-responder or initiator use.
-
-<br />&nbsp;<br />
-The file transfer API has changed a little bit and is now more cleaner and
-supports all the features that are needed in full featured file transfer.
-It is now easier to send files when you are behind NAT when you can
-specifically define the IPs that are used in both file sending and
-receiving.
-
-<br />&nbsp;<br />
-As a new function silc_client_nickname_format can now be used to format
-the nickname of a client entry.  The client library automatically formats
-the nicknames but in some cases application might like to change the
-nickname of a certain client entry.
-
-
-<br />&nbsp;<br />
-<h3><a name="util"></a>Utility library, lib/silcutil/</h3>
-
-The Utility library (runtime library) has had several changes and has several
-new interfaces.  Some interfaces has also been removed or moved to some
-other library.  Removed interfaces rae: silcprotocol.h and silcsockconn.h.
-Moved interfaces are: <a href="silcapputil.html">silcapputil.h</a> and
-<a href="silcvcard.html">silcvcard.h</a>.
-
-<h4>SILC Async Operation Interface</h4>
-
-A new asynchronous operation API (<a href="silcasync.html">silcasync.h</a>)
-has been added.  It can be used to control asynchronous operations, like
-to cancel them.  Many asynchronous routines in SILC Toolkit now return
-SilcAsyncOperation context so that the operation can be controlled by the
-caller.  It especiallly provides a generic way to cancel asynchronous
-operations which can be difficult.
-
-<h4>SILC Atomic Operations Interface</h4>
-
-A new atomic operations API (<a href="silcatomic.html">silcatomic.h</a>)
-has been added.  It provides routines to perform various operations on
-integeres and pointers atomically.
-
-<h4>SILC Data Stack Interface</h4>
-
-A new data stack (memory pool system) API
-(<a href="silcstack.html">silcstack.h</a>) has been added.
-It provides a fast memory allocation system.  Many routines in the SILC Toolkit
-are SilcStack aware thus enabling them to use the SilcStack as their source
-for memory allocation.  All routines that are SilcStack aware automatically
-revert back to normal memory allocation if SilcStack is not given as
-argument.  See silcstack.h for list of utility routines that support SilcStack
-by default.
-
-<h4>SILC Condition Variable Interface</h4>
-
-A new condition variable API (<a href="silccond.html">silccond.h</a>)
-has been added.  It provides condition variables for multithreaded
-applications.
-
-<h4>SILC Stream Interface</h4>
-
-A new abstract stream API (<a href="silcstream.html">silcstream.h</a>)
-has been added.  The SilcStream
-provides an abstract way of representing different kinds of streams.  The
-API provides functions that can be used to read, write, control and destroy
-streams.  The API is not used to create streams but separate interfaces
-exist for streams that use the SilcStream abstraction.  For example,
-socket stream and file descriptor stream exist.
-
-<h4>SILC FD Stream Interface</h4>
-
-A new file descriptor stream API
-(<a href="silcfdstream.html">silcfdstream.h</a>) has been added.  It
-provides a blocking and non-blocking file descriptor stream through the
-SilcStream abstraction.
-
-<h4>SILC Socket Stream Interface</h4>
-
-A new socket stream API
-(<a href="silcsocketstream.html">silcsocketstream.h</a>) has been added.
-It provides a blocking and non-blocking socket stream through the SilcStream
-abstraction.
-
-<h4>SILC FSM Interface</h4>
-
-A new Finite State Machine API
-(<a href="silcfsm.html">silcfsm.h</a>) has been added.  It provides
-an FSM that can be used to implement all kinds of machines and protocols.
-The machine also supports threads, and threads that are actually executed
-in real system threads.  The SILC FSM API also supports asynchronous
-events.
-
-<h4>SILC Time Interface</h4>
-
-A new SILC Time API
-(<a href="silctime.html">silctime.h</a>) has been added.  It provides utility
-functions to retrieve and represent time in different ways.  It supports
-Universal and Generalized time string creation and parsing and adds a new
-SilcTime structure to represent time.
-
-<h4>SILC Snprintf Interface</h4>
-
-A new snprintf API
-(<a href="silcsnprintf.html">silcsnprintf.h</a>) has been added.  It
-provides snprintf and other string formatting routines.
-
-<h4>SILC Mutex Interface changes</h4>
-
-The SILC Mutex API (<a href="silcmutex.html">silcmutex.h</a>)
-has several changes.  A support for read/write locks has been added
-(SilcRwLock).  Also silc_mutex_assert_locked function is added.
-
-<h4>SILC Network Interface changes</h4>
-
-The SILC Network API
-(<a href="silcnet.html">silcnet.h</a>) has several changes.  The API is almost
-entirely rewritten and most of the old functions have been removed.  The
-API has now both TCP and UDP support, and as previously supports IPv4
-and IPv6.  New functions are silc_net_tcp_create_listener,
-silc_net_listener_get_port, silc_net_close_listener, silc_net_tcp_connnect,
-silc_net_udp_connect, silc_net_udp_receive, silc_net_udp_send.
-
-<h4>SILC Scheduler Interface changes</h4>
-
-The SILC Schedule API
-(<a href="silcschedule.html">silcschedule.h</a>) has several changes.  The
-scheduler has been entirely rewritten but most of the API remains the same.
-The SILC_TASK_GENERIC and SILC_TASK_CALLBACK_GLOCAL have been removed.
-The way signal are dispatched has been changed.  The SILC Schedule is now
-able to itself dispatch all signals.  New functions are
-silc_schedule_task_add_fd, silc_schedule_task_add_timeout,
-silc_schedule_task_add_signal, silc_task_del_by_all,
-silc_schedule_get_fd_events.  The functions silc_schedule_signal_register,
-silc_schedule_signal_unregister and silc_schedule_signal_call have been
-removed.
-
-<h4>SILC Types Interface changes</h4>
-
-The SILC Type API (<a href="silctypes.html">silctypes.h</a>) has several
-changes.  The bool type is replaced with SilcBool.  Sockets are now
-represented by SilcSocket.
-
-<h4>SILC String util Interface changes</h4>
-
-The SILC string utility API
-(<a href="silcstrutil.html">silcstrutil.h</a>) has changes.  The PEM encoding
-and decoding routines has been renamed, silc_base64_encode,
-silc_base64_encode_file and silc_base64_decode.  The silc_mime_parse has
-been removed.  A new silc_string_split function has been added.
-
-<h4>SILC Utility Interface changes</h4>
-
-
-<h4>SILC File Util Interface changes</h4>
-
-The SILC file utility API (<a href="silcfileutil.html">silcfileutil.h</a>)
-has changes.  A new function silc_file_set_nonblock has been added.
-
-<h4>SILC List and Dynamic List Interface changes</h4>
-
-The SILC List (<a href="silclist.html">silclist.h</a>) and SILC Dynamic List
-(silcdlist.h) APIs have changes. New functions silc_list_insert and
-silc_dlist_insert have been added.
-
-<h4>SILC Buffer Interface changes</h4>
-
-The SILC Buffer API (<a href="silcbuffer.html">silcbuffer.h</a>) has several
-changes.  The SilcBuffer
-structure no longer contain the buffer length and true length fields
-but silc_buffer_len() and silc_buffr_truelen() macros are available
-instead.  Also silc_buffer_data(), silc_buffer_datalen(), silc_buffer_purge(),
-silc_buffer_reset(), silc_buffer_start(), silc_buffer_end() and
-silc_buffer_enlarge() has been added.  The API also supports SilcStack.
-
-<h4>SILC Buffer Formatting Interface changes</h4>
-
-The SILC Buffer Formatting API
-(<a href="silcbuffmt.html">silcbuffmt.h</a>) has several changes.  The
-silc_buffer_format now automatically allocates memory to the destination
-buffer if it does not have space.  Also new the following new formatters
-have been added: SILC_STR_DATA (replaces SILC_STR_UI_XNSTRING),
-SILC_STR_BUFFER, SILC_STR_FUNC, SILC_STF_OFFSET and SILC_STR_ADVANCE.
-The API also supports SilcStack.
-
-<h4>SILC Memory Interface changes</h4>
-
-The memory allocation API (<a href="silcmemory.html">silcmemory.h</a>) has
-several changes.  It supports now SilcStack as memory source.  Also all
-memory allocation routines can now fail and return NULL as opposed to fatally
-failing when memory allocation fails.
-
-<br />&nbsp;<br />
-<h3><a name="apputil"></a>SILC Application Utility library, lib/silcapputil/</h3>
-
-A new SILC Application Utility library has been added.  It provides
-various application specific utility libraries that are not part of
-the runtime library (lib/silcutil/).  The interfaces in the Application
-utility library were in other libraries in Toolkit 1.0 and the library
-does not contain any entirely new interfaces.
-
-<h4>SILC Application Utility Interface</h4>
-
-The <a href="silcapputil.html">silcapputil.h</a> contains various application
-utility functions.  It
-existed in Toolkit 1.0 but some of the APIs has been changed.  The
-silc_create_key_pair, silc_load_key_pair and silc_show_public_key APIs
-has changed.  A new silc_show_public_key_file has been added.  Functions
-silc_identifier_check, silc_identifier_verify, silc_channel_name_check,
-silc_channel_name_verify, silc_get_mode_list silc_get_status_message,
-silc_get_packet_name, silc_get_command_name, silc_parse_version_string,
-silc_version_to_num, silc_client_chmode, silc_client_chumode,
-silc_client_chumode_char and silc_id_render has been moved from other
-libraries into this interface in Toolkit 1.1.
-
-<h4>SILC ID Cache Interface</h4>
-
-The ID Cache interface (<a href="silcidcache.html">silcidcache.h</a>) has
-been moved from lib/silccore into lib/silcapputil/.
-
-<br />&nbsp;<br />
-<h3><a name="skr"></a>SILC Key Repository library, lib/silcskr/</h3>
-
-A new SILC Key Repository library has been added.  The library provides
-a SILC Key Repository API (<a href="silcskr.html">silcskr.h</a>) which provides
-a repository for storing and retrieving public keys.
-
-<br />&nbsp;<br />
-<h3><a name="vcard"></a>SILC VCard library, lib/silcvcard/</h3>
-
-A new SILC VCard library has been added.  The SILC VCard API has been
-moved from utility library to own library in lib/silcvcard/.
-
-<br />&nbsp;<br />
-<h3><a name="http"></a>SILC HTTP library, lib/silchttp/</h3>
-
-A new SILC HTTP library has been added.  The library includes SILC HTTP
-Server Interface and SILC HTTP PHP Translator Interface.
-
-<h4>SILC HTTP Server Interface</h4>
-
-The SILC HTTP Server API (<a href="silchttpserver.html">silchttpservder.h</a>)
-provides a simple HTTP server implementation for applications that want to
-integrate a small HTTP server.
-
-<h4>SILC HTTP PHP Translator Interface</h4>
-
-The SILC HTTP PHP Translator API (<a href="silchttpphp.html">silchttpphp.h</a>)
- provides PHP translates PHP code into HTML.  It can be used to serve PHP
-pages in HTTP server.
-
-<br />&nbsp;<br />
-<h3><a name="asn1"></a>SILC ASN.1 library, lib/silcasn1/</h3>
-
-A new Abstract Syntax Notation One (ASN.1) library has been added.  The
-library provides SILC ASN.1 encoder and decoder interface and SILC BER
-encoder and decoder interface.
-
-<h4>SILC ASN.1 Interface</h4>
-
-The SILC ASN.1 API (<a href="silcasn1.html">silcasn1.h</a>) provides ASN.1
-encoder and decoder.  The interface provides efficient encoder and decoder
-and is support SilcStack as memory source.  The interface is simple and it
-supports almost all ASN.1 features.
-
-<h4>SILC BER Interface</h4>
-
-The SILC BER API (<a href="silcber.html">silcber.h</a>) provides BER/DER
-encoder and decoder.  It is integral part of the ASN.1 library and the ASN.1
-encoder and decoder.
diff --git a/lib/silcutil/.gitignore b/lib/silcutil/.gitignore
deleted file mode 100644 (file)
index a501f92..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-Makefile
-*.in
-*.am
-*.o
-*.lo
-*.la
-*.a
-*.pc
index b1ce5fd05301be11f24d68881a2be538d7e0855a..d3dcb57b7f9c95f10ba768893c9eadf2d3b3509d 100644 (file)
@@ -121,7 +121,8 @@ include_HEADERS =   \
        silcregex.h     \
        silcthreadqueue.h \
        silcrand.h      \
-       silcglobal.h
+       silcglobal.h    \
+       silcruntime.h
 
 SILC_EXTRA_DIST =
 
index 6e7469839e8ea06dfd953ee43fd89831295fdbf4..d146335456407af1188fa77769b5284fd37094cd 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 2005 - 2007 Pekka Riikonen
+  Copyright (C) 2005 - 2008 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
@@ -17,7 +17,7 @@
 
 */
 
-/****h* silcutil/SILC Async Operation Interface
+/****h* silcutil/Async Operation Interface
  *
  * DESCRIPTION
  *
@@ -66,7 +66,7 @@
 #ifndef SILCASYNC_H
 #define SILCASYNC_H
 
-/****s* silcutil/SilcAsyncOperationAPI/SilcAsyncOperation
+/****s* silcutil/SilcAsyncOperation
  *
  * NAME
  *
@@ -84,7 +84,7 @@
  ***/
 typedef struct SilcAsyncOperationObject *SilcAsyncOperation;
 
-/****s* silcutil/SilcAsyncOperationAPI/SilcAsyncOperationStruct
+/****s* silcutil/SilcAsyncOperationStruct
  *
  * NAME
  *
@@ -101,7 +101,7 @@ typedef struct SilcAsyncOperationObject *SilcAsyncOperation;
  ***/
 typedef struct SilcAsyncOperationObject SilcAsyncOperationStruct;
 
-/****f* silcutil/SilcAsyncOperationAPI/SilcAsyncOperationAbort
+/****f* silcutil/SilcAsyncOperationAbort
  *
  * SYNOPSIS
  *
@@ -122,7 +122,7 @@ typedef struct SilcAsyncOperationObject SilcAsyncOperationStruct;
 typedef void (*SilcAsyncOperationAbort)(SilcAsyncOperation op,
                                        void *context);
 
-/****f* silcutil/SilcAsyncOperationAPI/SilcAsyncOperationPause
+/****f* silcutil/SilcAsyncOperationPause
  *
  * SYNOPSIS
  *
@@ -150,7 +150,7 @@ typedef SilcBool (*SilcAsyncOperationPause)(SilcAsyncOperation op,
    that has received SilcAsyncOperation context can control the async
    operation with these functions. */
 
-/****f* silcutil/SilcAsyncOperationAPI/silc_async_halt
+/****f* silcutil/silc_async_halt
  *
  * SYNOPSIS
  *
@@ -169,7 +169,7 @@ typedef SilcBool (*SilcAsyncOperationPause)(SilcAsyncOperation op,
  ***/
 SilcBool silc_async_halt(SilcAsyncOperation op);
 
-/****f* silcutil/SilcAsyncOperationAPI/silc_async_resume
+/****f* silcutil/silc_async_resume
  *
  * SYNOPSIS
  *
@@ -187,7 +187,7 @@ SilcBool silc_async_halt(SilcAsyncOperation op);
  ***/
 SilcBool silc_async_resume(SilcAsyncOperation op);
 
-/****f* silcutil/SilcAsyncOperationAPI/silc_async_abort
+/****f* silcutil/silc_async_abort
  *
  * SYNOPSIS
  *
@@ -214,7 +214,7 @@ void silc_async_abort(SilcAsyncOperation op,
 /* The operation layer functions.  The layer that performs the async
    operation use these functions. */
 
-/****f* silcutil/SilcAsyncOperationAPI/silc_async_alloc
+/****f* silcutil/silc_async_alloc
  *
  * SYNOPSIS
  *
@@ -261,7 +261,7 @@ SilcAsyncOperation silc_async_alloc(SilcAsyncOperationAbort abort_cb,
                                    SilcAsyncOperationPause pause_cb,
                                    void *context);
 
-/****f* silcutil/SilcAsyncOperationAPI/silc_async_init
+/****f* silcutil/silc_async_init
  *
  * SYNOPSIS
  *
@@ -291,7 +291,7 @@ SilcBool silc_async_init(SilcAsyncOperation op,
                         SilcAsyncOperationPause pause_cb,
                         void *context);
 
-/****f* silcutil/SilcAsyncOperationAPI/silc_async_free
+/****f* silcutil/silc_async_free
  *
  * SYNOPSIS
  *
@@ -310,7 +310,7 @@ SilcBool silc_async_init(SilcAsyncOperation op,
  ***/
 void silc_async_free(SilcAsyncOperation op);
 
-/****f* silcutil/SilcAsyncOperationAPI/silc_async_get_context
+/****f* silcutil/silc_async_get_context
  *
  * SYNOPSIS
  *
index 77197fa0b37eb879b53ea39060d34af9548be5c1..a6cb2b51bdc919c6409a2ae1313012580f249f1c 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 2006 - 2007 Pekka Riikonen
+  Copyright (C) 2006 - 2008 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
@@ -17,7 +17,7 @@
 
 */
 
-/****h* silcutil/SILC Atomic Operations Interface
+/****h* silcutil/Atomic Operations Interface
  *
  * DESCRIPTION
  *
@@ -60,7 +60,7 @@
 #define SILC_SMP_LOCK
 #endif /* SILC_SMP */
 
-/****s* silcutil/SilcAtomicAPI/SilcAtomic32
+/****s* silcutil/SilcAtomic32
  *
  * NAME
  *
@@ -88,7 +88,7 @@
  *
  ***/
 
-/****s* silcutil/SilcAtomicAPI/SilcAtomic16
+/****s* silcutil/SilcAtomic16
  *
  * NAME
  *
  *
  ***/
 
-/****s* silcutil/SilcAtomicAPI/SilcAtomic8
+/****s* silcutil/SilcAtomic8
  *
  * NAME
  *
  *
  ***/
 
-/****s* silcutil/SilcAtomicAPI/SilcAtomicPointer
+/****s* silcutil/SilcAtomicPointer
  *
  * NAME
  *
@@ -227,7 +227,7 @@ typedef struct {
 } SilcAtomic8;
 #endif
 
-/****f* silcutil/SilcAtomicAPI/silc_atomic_init32
+/****f* silcutil/silc_atomic_init32
  *
  * SYNOPSIS
  *
@@ -242,7 +242,7 @@ typedef struct {
  *
  ***/
 
-/****f* silcutil/SilcAtomicAPI/silc_atomic_init16
+/****f* silcutil/silc_atomic_init16
  *
  * SYNOPSIS
  *
@@ -257,7 +257,7 @@ typedef struct {
  *
  ***/
 
-/****f* silcutil/SilcAtomicAPI/silc_atomic_init8
+/****f* silcutil/silc_atomic_init8
  *
  * SYNOPSIS
  *
@@ -272,7 +272,7 @@ typedef struct {
  *
  ***/
 
-/****f* silcutil/SilcAtomicAPI/silc_atomic_init_pointer
+/****f* silcutil/silc_atomic_init_pointer
  *
  * SYNOPSIS
  *
@@ -313,7 +313,7 @@ SILC_ATOMIC_INIT(16, 16, SilcUInt16)
 SILC_ATOMIC_INIT(32, 32, SilcUInt32)
 SILC_ATOMIC_INIT(_pointer, Pointer, void *)
 
-/****f* silcutil/SilcAtomicAPI/silc_atomic_uninit32
+/****f* silcutil/silc_atomic_uninit32
  *
  * SYNOPSIS
  *
@@ -327,7 +327,7 @@ SILC_ATOMIC_INIT(_pointer, Pointer, void *)
  *
  ***/
 
-/****f* silcutil/SilcAtomicAPI/silc_atomic_uninit16
+/****f* silcutil/silc_atomic_uninit16
  *
  * SYNOPSIS
  *
@@ -341,7 +341,7 @@ SILC_ATOMIC_INIT(_pointer, Pointer, void *)
  *
  ***/
 
-/****f* silcutil/SilcAtomicAPI/silc_atomic_uninit8
+/****f* silcutil/silc_atomic_uninit8
  *
  * SYNOPSIS
  *
@@ -355,7 +355,7 @@ SILC_ATOMIC_INIT(_pointer, Pointer, void *)
  *
  ***/
 
-/****f* silcutil/SilcAtomicAPI/silc_atomic_uninit_pointer
+/****f* silcutil/silc_atomic_uninit_pointer
  *
  * SYNOPSIS
  *
@@ -391,7 +391,7 @@ SILC_ATOMIC_UNINIT(16, 16)
 SILC_ATOMIC_UNINIT(32, 32)
 SILC_ATOMIC_UNINIT(_pointer, Pointer)
 
-/****f* silcutil/SilcAtomicAPI/silc_atomic_set_int32
+/****f* silcutil/silc_atomic_set_int32
  *
  * SYNOPSIS
  *
@@ -404,7 +404,7 @@ SILC_ATOMIC_UNINIT(_pointer, Pointer)
  *
  ***/
 
-/****f* silcutil/SilcAtomicAPI/silc_atomic_set_int16
+/****f* silcutil/silc_atomic_set_int16
  *
  * SYNOPSIS
  *
@@ -417,7 +417,7 @@ SILC_ATOMIC_UNINIT(_pointer, Pointer)
  *
  ***/
 
-/****f* silcutil/SilcAtomicAPI/silc_atomic_set_int8
+/****f* silcutil/silc_atomic_set_int8
  *
  * SYNOPSIS
  *
@@ -493,7 +493,7 @@ SILC_ATOMIC_SET_INT(8, "b", "b")
 SILC_ATOMIC_SET_INT(16, "w", "w")
 SILC_ATOMIC_SET_INT(32, "l", "")
 
-/****f* silcutil/SilcAtomicAPI/silc_atomic_set_pointer
+/****f* silcutil/silc_atomic_set_pointer
  *
  * SYNOPSIS
  *
@@ -535,7 +535,7 @@ void silc_atomic_set_pointer(SilcAtomicPointer *atomic, void *pointer)
 #endif
 }
 
-/****f* silcutil/SilcAtomicAPI/silc_atomic_get_int32
+/****f* silcutil/silc_atomic_get_int32
  *
  * SYNOPSIS
  *
@@ -548,7 +548,7 @@ void silc_atomic_set_pointer(SilcAtomicPointer *atomic, void *pointer)
  *
  ***/
 
-/****f* silcutil/SilcAtomicAPI/silc_atomic_get_int16
+/****f* silcutil/silc_atomic_get_int16
  *
  * SYNOPSIS
  *
@@ -561,7 +561,7 @@ void silc_atomic_set_pointer(SilcAtomicPointer *atomic, void *pointer)
  *
  ***/
 
-/****f* silcutil/SilcAtomicAPI/silc_atomic_get_int8
+/****f* silcutil/silc_atomic_get_int8
  *
  * SYNOPSIS
  *
@@ -632,7 +632,7 @@ SILC_ATOMIC_GET_INT(8)
 SILC_ATOMIC_GET_INT(16)
 SILC_ATOMIC_GET_INT(32)
 
-/****f* silcutil/SilcAtomicAPI/silc_atomic_get_pointer
+/****f* silcutil/silc_atomic_get_pointer
  *
  * SYNOPSIS
  *
@@ -677,7 +677,7 @@ void *silc_atomic_get_pointer(SilcAtomicPointer *atomic)
 #endif
 }
 
-/****f* silcutil/SilcAtomicAPI/silc_atomic_add_int32
+/****f* silcutil/silc_atomic_add_int32
  *
  * SYNOPSIS
  *
@@ -691,7 +691,7 @@ void *silc_atomic_get_pointer(SilcAtomicPointer *atomic)
  *
  ***/
 
-/****f* silcutil/SilcAtomicAPI/silc_atomic_add_int16
+/****f* silcutil/silc_atomic_add_int16
  *
  * SYNOPSIS
  *
@@ -705,7 +705,7 @@ void *silc_atomic_get_pointer(SilcAtomicPointer *atomic)
  *
  ***/
 
-/****f* silcutil/SilcAtomicAPI/silc_atomic_add_int8
+/****f* silcutil/silc_atomic_add_int8
  *
  * SYNOPSIS
  *
@@ -804,7 +804,7 @@ SILC_ATOMIC_ADD_INT(8, "b")
 SILC_ATOMIC_ADD_INT(16, "w")
 SILC_ATOMIC_ADD_INT(32, "l")
 
-/****f* silcutil/SilcAtomicAPI/silc_atomic_sub_int32
+/****f* silcutil/silc_atomic_sub_int32
  *
  * SYNOPSIS
  *
@@ -818,7 +818,7 @@ SILC_ATOMIC_ADD_INT(32, "l")
  *
  ***/
 
-/****f* silcutil/SilcAtomicAPI/silc_atomic_sub_int16
+/****f* silcutil/silc_atomic_sub_int16
  *
  * SYNOPSIS
  *
@@ -832,7 +832,7 @@ SILC_ATOMIC_ADD_INT(32, "l")
  *
  ***/
 
-/****f* silcutil/SilcAtomicAPI/silc_atomic_sub_int8
+/****f* silcutil/silc_atomic_sub_int8
  *
  * SYNOPSIS
  *
@@ -850,7 +850,7 @@ SILC_ATOMIC_ADD_INT(32, "l")
 #define silc_atomic_sub_int16(a, v) silc_atomic_add_int16(a, (-v))
 #define silc_atomic_sub_int32(a, v) silc_atomic_add_int32(a, (-v))
 
-/****f* silcutil/SilcAtomicAPI/silc_atomic_inc32
+/****f* silcutil/silc_atomic_inc32
  *
  * SYNOPSIS
  *
@@ -863,7 +863,7 @@ SILC_ATOMIC_ADD_INT(32, "l")
  *
  ***/
 
-/****f* silcutil/SilcAtomicAPI/silc_atomic_inc16
+/****f* silcutil/silc_atomic_inc16
  *
  * SYNOPSIS
  *
@@ -876,7 +876,7 @@ SILC_ATOMIC_ADD_INT(32, "l")
  *
  ***/
 
-/****f* silcutil/SilcAtomicAPI/silc_atomic_inc8
+/****f* silcutil/silc_atomic_inc8
  *
  * SYNOPSIS
  *
@@ -956,7 +956,7 @@ SILC_ATOMIC_INC(8, "b")
 SILC_ATOMIC_INC(16, "w")
 SILC_ATOMIC_INC(32, "l")
 
-/****f* silcutil/SilcAtomicAPI/silc_atomic_dec32
+/****f* silcutil/silc_atomic_dec32
  *
  * SYNOPSIS
  *
@@ -969,7 +969,7 @@ SILC_ATOMIC_INC(32, "l")
  *
  ***/
 
-/****f* silcutil/SilcAtomicAPI/silc_atomic_dec16
+/****f* silcutil/silc_atomic_dec16
  *
  * SYNOPSIS
  *
@@ -982,7 +982,7 @@ SILC_ATOMIC_INC(32, "l")
  *
  ***/
 
-/****f* silcutil/SilcAtomicAPI/silc_atomic_dec8
+/****f* silcutil/silc_atomic_dec8
  *
  * SYNOPSIS
  *
@@ -1062,7 +1062,7 @@ SILC_ATOMIC_DEC(8, "b")
 SILC_ATOMIC_DEC(16, "w")
 SILC_ATOMIC_DEC(32, "l")
 
-/****f* silcutil/SilcAtomicAPI/silc_atomic_cas32
+/****f* silcutil/silc_atomic_cas32
  *
  * SYNOPSIS
  *
@@ -1079,7 +1079,7 @@ SILC_ATOMIC_DEC(32, "l")
  *
  ***/
 
-/****f* silcutil/SilcAtomicAPI/silc_atomic_cas16
+/****f* silcutil/silc_atomic_cas16
  *
  * SYNOPSIS
  *
@@ -1096,7 +1096,7 @@ SILC_ATOMIC_DEC(32, "l")
  *
  ***/
 
-/****f* silcutil/SilcAtomicAPI/silc_atomic_cas8
+/****f* silcutil/silc_atomic_cas8
  *
  * SYNOPSIS
  *
@@ -1190,7 +1190,7 @@ SILC_ATOMIC_CAS(8, "b")
 SILC_ATOMIC_CAS(16, "w")
 SILC_ATOMIC_CAS(32, "l")
 
-/****f* silcutil/SilcAtomicAPI/silc_atomic_cas_pointer
+/****f* silcutil/silc_atomic_cas_pointer
  *
  * SYNOPSIS
  *
index 98effa135a89105e1395eaaf510c987c12ec4064..0ef7760c592ebd7ee100956176b1b0370458e155 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 2007 Pekka Riikonen
+  Copyright (C) 2007 - 2008 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
@@ -17,7 +17,7 @@
 
 */
 
-/****h* silcutil/SILC Base64 API
+/****h* silcutil/Base64 Interface
  *
  * DESCRIPTION
  *
@@ -28,7 +28,7 @@
 #ifndef SILCBASE64_H
 #define SILCBASE64_H
 
-/****f* silcutil/SilcBase64API/silc_base64_encode
+/****f* silcutil/silc_base64_encode
  *
  * SYNOPSIS
  *
@@ -45,7 +45,7 @@
  ***/
 char *silc_base64_encode(SilcStack stack, unsigned char *data, SilcUInt32 len);
 
-/****f* silcutil/SilcBase64API/silc_base64_encode_file
+/****f* silcutil/silc_base64_encode_file
  *
  * SYNOPSIS
  *
@@ -63,7 +63,7 @@ char *silc_base64_encode(SilcStack stack, unsigned char *data, SilcUInt32 len);
 char *silc_base64_encode_file(SilcStack stack,
                              unsigned char *data, SilcUInt32 data_len);
 
-/****f* silcutil/SilcBase64API/silc_base_decode
+/****f* silcutil/silc_base_decode
  *
  * SYNOPSIS
  *
index 87bc85eb24a7441c3f0cf94a462845d75d69d97e..8fec4042d0140f83c9d0710f4f56a471c0de6c6b 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 2007 Pekka Riikonen
+  Copyright (C) 2007 - 2008 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
@@ -17,7 +17,7 @@
 
 */
 
-/****h* silcutil/SILC Bit Operations Interface
+/****h* silcutil/Bit Operations Interface
  *
  * DESCRIPTION
  *
@@ -25,6 +25,8 @@
  * find bits in an arbitrarily large bitmap.  The interface does not support
  * setting the bits atomically.
  *
+ * EXAMPLE
+ *
  * Example with a pre-allocated bitmap:
  *
  * // Declare bitmap of size of 500 bits
@@ -53,7 +55,7 @@
 
 #define SILC_BIT_SIZE (SILC_SIZEOF_LONG * 8)
 
-/****d* silcutil/SilcBitOpAPI/SILC_BITMAP_DECLARE
+/****d* silcutil/SILC_BITMAP_DECLARE
  *
  * NAME
  *
@@ -68,7 +70,7 @@
 #define SILC_BITMAP_DECLARE(name, bits)                \
   unsigned long name[SILC_BITMAP_SIZE(bits)]
 
-/****d* silcutil/SilcBitOpAPI/SILC_BITMAP_SIZE
+/****d* silcutil/SILC_BITMAP_SIZE
  *
  * NAME
  *
@@ -83,7 +85,7 @@
  ***/
 #define SILC_BITMAP_SIZE(bits) (((bits) + SILC_BIT_SIZE) / SILC_BIT_SIZE)
 
-/****f* silcutil/SilcBitOpAPI/silc_bit_set
+/****f* silcutil/silc_bit_set
  *
  * SYNOPSIS
  *
 SilcBool silc_bit_set(volatile unsigned long *bitmap, SilcUInt32 bitmap_size,
                      SilcUInt32 bit);
 
-/****f* silcutil/SilcBitOpAPI/silc_bit_clear
+/****f* silcutil/silc_bit_clear
  *
  * SYNOPSIS
  *
@@ -115,7 +117,7 @@ SilcBool silc_bit_set(volatile unsigned long *bitmap, SilcUInt32 bitmap_size,
 SilcBool silc_bit_clear(volatile unsigned long *bitmap, SilcUInt32 bitmap_size,
                        SilcUInt32 bit);
 
-/****f* silcutil/SilcBitOpAPI/silc_bit_toggle
+/****f* silcutil/silc_bit_toggle
  *
  * SYNOPSIS
  *
@@ -131,7 +133,7 @@ SilcBool silc_bit_clear(volatile unsigned long *bitmap, SilcUInt32 bitmap_size,
 SilcBool silc_bit_toggle(volatile unsigned long *bitmap,
                         SilcUInt32 bitmap_size, SilcUInt32 bit);
 
-/****f* silcutil/SilcBitOpAPI/silc_bit_test_and_set
+/****f* silcutil/silc_bit_test_and_set
  *
  * SYNOPSIS
  *
@@ -148,7 +150,7 @@ SilcBool silc_bit_toggle(volatile unsigned long *bitmap,
 int silc_bit_test_and_set(volatile unsigned long *bitmap,
                          SilcUInt32 bitmap_size, SilcUInt32 bit);
 
-/****f* silcutil/SilcBitOpAPI/silc_bit_test_and_clear
+/****f* silcutil/silc_bit_test_and_clear
  *
  * SYNOPSIS
  *
@@ -165,7 +167,7 @@ int silc_bit_test_and_set(volatile unsigned long *bitmap,
 int silc_bit_test_and_clear(volatile unsigned long *bitmap,
                            SilcUInt32 bitmap_size, SilcUInt32 bit);
 
-/****f* silcutil/SilcBitOpAPI/silc_bit_test_and_toggle
+/****f* silcutil/silc_bit_test_and_toggle
  *
  * SYNOPSIS
  *
@@ -182,7 +184,7 @@ int silc_bit_test_and_clear(volatile unsigned long *bitmap,
 int silc_bit_test_and_toggle(volatile unsigned long *bitmap,
                             SilcUInt32 bitmap_size, SilcUInt32 bit);
 
-/****f* silcutil/SilcBitOpAPI/silc_bit_get
+/****f* silcutil/silc_bit_get
  *
  * SYNOPSIS
  *
@@ -198,7 +200,7 @@ int silc_bit_test_and_toggle(volatile unsigned long *bitmap,
 int silc_bit_get(volatile unsigned long *bitmap, SilcUInt32 bitmap_size,
                 SilcUInt32 bit);
 
-/****f* silcutil/SilcBitOpAPI/silc_bit_ffs
+/****f* silcutil/silc_bit_ffs
  *
  * SYNOPSIS
  *
@@ -213,7 +215,7 @@ int silc_bit_get(volatile unsigned long *bitmap, SilcUInt32 bitmap_size,
  ***/
 int silc_bit_ffs(volatile unsigned long *bitmap, SilcUInt32 bitmap_size);
 
-/****f* silcutil/SilcBitOpAPI/silc_bit_ffz
+/****f* silcutil/silc_bit_ffz
  *
  * SYNOPSIS
  *
@@ -228,7 +230,7 @@ int silc_bit_ffs(volatile unsigned long *bitmap, SilcUInt32 bitmap_size);
  ***/
 int silc_bit_ffz(volatile unsigned long *bitmap, SilcUInt32 bitmap_size);
 
-/****f* silcutil/SilcBitOpAPI/silc_bit_fns
+/****f* silcutil/silc_bit_fns
  *
  * SYNOPSIS
  *
@@ -245,7 +247,7 @@ int silc_bit_ffz(volatile unsigned long *bitmap, SilcUInt32 bitmap_size);
 int silc_bit_fns(volatile unsigned long *bitmap, SilcUInt32 bitmap_size,
                 SilcUInt32 offset);
 
-/****f* silcutil/SilcBitOpAPI/silc_bit_fnz
+/****f* silcutil/silc_bit_fnz
  *
  * SYNOPSIS
  *
@@ -262,7 +264,7 @@ int silc_bit_fns(volatile unsigned long *bitmap, SilcUInt32 bitmap_size,
 int silc_bit_fnz(volatile unsigned long *bitmap, SilcUInt32 bitmap_size,
                 SilcUInt32 offset);
 
-/****f* silcutil/SilcBitOpAPI/silc_bit_clear_bitmap
+/****f* silcutil/silc_bit_clear_bitmap
  *
  * SYNOPSIS
  *
index 6083fbb83f99d8b0fb603bc2d7ea373fb5541f03..7751f965b197bc83c6f068fcab6a7b95c2b010db 100644 (file)
   GNU General Public License for more details.
 
 */
-/* $Id: silcbuffer.h,v 1.43 2008/01/15 06:36:54 priikone Exp $ */
 
-/****h* silcutil/SILC Buffer Interface
+/****h* silcutil/Buffer Interface
  *
  * DESCRIPTION
  *
- * SilcBuffer is very simple and easy to use, yet you can do to the
- * buffer almost anything you want with its method functions. The buffer
+ * Data buffer interface that provides buffer allocation and manipulation
+ * routines.  SilcBuffer is simple and easy to use, yet you can do to the
+ * buffer almost anything you want with its method functions.  The buffer
  * is constructed of four different data sections that in whole creates
- * the allocated data area.
+ * the allocated data area.  See the SilcBuffer context for more information.
+ *
+ * The SilcBuffer context is not thread-safe and if same context must be
+ * used from multiple threads concurrency control must be employed.
  *
  ***/
 
 #ifndef SILCBUFFER_H
 #define SILCBUFFER_H
 
-/****s* silcutil/SilcBufferAPI/SilcBuffer
+/****s* silcutil/SilcBuffer
  *
  * NAME
  *
  *    SILC Buffer object. Following short description of the fields
  *    of the buffer.
  *
- * EXAMPLE
- *
- *    unsiged char *head;
+ *     unsiged char *head;
  *
  *        Head of the allocated buffer. This is the start of the allocated
  *        data area and remains as same throughout the lifetime of the buffer.
  *        However, the end of the head area or the start of the currently valid
- *        data area is variable.
+ *        data area is variable.  Reallocating the buffer may change the
+ *        pointer.
  *
  *        --------------------------------
  *        | head  | data         | tail  |
@@ -59,7 +61,7 @@
  *
  *        Current head section in the buffer is sb->data - sb->head.
  *
- *    unsigned char *data;
+ *     unsigned char *data;
  *
  *        Currently valid data area. This is the start of the currently valid
  *        main data area. The data area is variable in all directions.
@@ -71,7 +73,7 @@
  *
  *        Current valid data area in the buffer is sb->tail - sb->data.
  *
- *     unsigned char *tail;
+ *      unsigned char *tail;
  *
  *        Tail of the buffer. This is the end of the currently valid data area
  *        or start of the tail area. The start of the tail area is variable.
@@ -83,7 +85,7 @@
  *
  *        Current tail section in the buffer is sb->end - sb->tail.
  *
- *    unsigned char *end;
+ *     unsigned char *end;
  *
  *        End of the allocated buffer. This is the end of the allocated data
  *        area and remains as same throughout the lifetime of the buffer.
  *
  *        Length of the entire buffer is (ie. truelen) sb->end - sb->head.
  *
- *     Currently valid data area is considered to be the main data area in
- *     the buffer. However, the entire buffer is of course valid data and can
- *     be used as such. Usually head section of the buffer includes different
- *     kind of headers or similar. Data section includes the main data of
- *     the buffer. Tail section can be seen as a reserve space of the data
- *     section. Tail section can be pulled towards end, and thus the data
- *     section becomes larger.
- *
- * SILC Buffer is not thread-safe.  If the same SilcBuffer context must be
- * used in multithreaded environment concurrency control must be employed.
+ *    Currently valid data area is considered to be the main data area in
+ *    the buffer. However, the entire buffer is of course valid data and can
+ *    be used as such. Usually head section of the buffer includes different
+ *    kind of headers or similar. Data section includes the main data of
+ *    the buffer. Tail section can be seen as a reserve space of the data
+ *    section. Tail section can be pulled towards end, and thus the data
+ *    section becomes larger.
  *
  * SOURCE
  */
 typedef struct SilcBufferObject {
-  unsigned char *head;
-  unsigned char *data;
-  unsigned char *tail;
-  unsigned char *end;
+  unsigned char *head;         /* Head of the allocated buffer area */
+  unsigned char *data;         /* Start of the data area */
+  unsigned char *tail;         /* Start of the tail area */
+  unsigned char *end;          /* End of the buffer */
 } *SilcBuffer, SilcBufferStruct;
 /***/
 
 /* Macros */
 
-/****f* silcutil/SilcBufferAPI/silc_buffer_data
+/****f* silcutil/silc_buffer_data
  *
  * NAME
  *
@@ -135,7 +134,7 @@ typedef struct SilcBufferObject {
 #define silc_buffer_data(x) (x)->data
 /***/
 
-/****f* silcutil/SilcBufferAPI/silc_buffer_tail
+/****f* silcutil/silc_buffer_tail
  *
  * NAME
  *
@@ -150,7 +149,7 @@ typedef struct SilcBufferObject {
 #define silc_buffer_tail(x) (x)->tail
 /***/
 
-/****f* silcutil/SilcBufferAPI/silc_buffer_datalen
+/****f* silcutil/silc_buffer_datalen
  *
  * NAME
  *
@@ -176,7 +175,7 @@ typedef struct SilcBufferObject {
 
 /* Inline functions */
 
-/****d* silcutil/SilcBufferAPI/silc_buffer_truelen
+/****d* silcutil/silc_buffer_truelen
  *
  * NAME
  *
@@ -193,7 +192,7 @@ SilcUInt32 silc_buffer_truelen(SilcBuffer x)
   return (SilcUInt32)(x->end - x->head);
 }
 
-/****d* silcutil/SilcBufferAPI/silc_buffer_len
+/****d* silcutil/silc_buffer_len
  *
  * NAME
  *
@@ -210,7 +209,7 @@ SilcUInt32 silc_buffer_len(SilcBuffer x)
   return (SilcUInt32)(x->tail - x->data);
 }
 
-/****d* silcutil/SilcBufferAPI/silc_buffer_headlen
+/****d* silcutil/silc_buffer_headlen
  *
  * NAME
  *
@@ -227,7 +226,7 @@ SilcUInt32 silc_buffer_headlen(SilcBuffer x)
   return (SilcUInt32)(x->data - x->head);
 }
 
-/****d* silcutil/SilcBufferAPI/silc_buffer_taillen
+/****d* silcutil/silc_buffer_taillen
  *
  * NAME
  *
@@ -244,7 +243,7 @@ SilcUInt32 silc_buffer_taillen(SilcBuffer x)
   return (SilcUInt32)(x->end - x->tail);
 }
 
-/****f* silcutil/SilcBufferAPI/silc_buffer_alloc
+/****f* silcutil/silc_buffer_alloc
  *
  * SYNOPSIS
  *
@@ -283,7 +282,7 @@ SilcBuffer silc_buffer_alloc(SilcUInt32 len)
   return sb;
 }
 
-/****f* silcutil/SilcBufferAPI/silc_buffer_salloc
+/****f* silcutil/silc_buffer_salloc
  *
  * SYNOPSIS
  *
@@ -331,7 +330,7 @@ SilcBuffer silc_buffer_salloc(SilcStack stack, SilcUInt32 len)
   return sb;
 }
 
-/****f* silcutil/SilcBufferAPI/silc_buffer_free
+/****f* silcutil/silc_buffer_free
  *
  * SYNOPSIS
  *
@@ -363,7 +362,7 @@ void silc_buffer_free(SilcBuffer sb)
   }
 }
 
-/****f* silcutil/SilcBufferAPI/silc_buffer_sfree
+/****f* silcutil/silc_buffer_sfree
  *
  * SYNOPSIS
  *
@@ -394,7 +393,7 @@ void silc_buffer_sfree(SilcStack stack, SilcBuffer sb)
   silc_buffer_free(sb);
 }
 
-/****f* silcutil/SilcBufferAPI/silc_buffer_steal
+/****f* silcutil/silc_buffer_steal
  *
  * SYNOPSIS
  *
@@ -422,7 +421,7 @@ unsigned char *silc_buffer_steal(SilcBuffer sb, SilcUInt32 *data_len)
   return buf;
 }
 
-/****f* silcutil/SilcBufferAPI/silc_buffer_purge
+/****f* silcutil/silc_buffer_purge
  *
  * SYNOPSIS
  *
@@ -449,7 +448,7 @@ void silc_buffer_purge(SilcBuffer sb)
   silc_free(silc_buffer_steal(sb, NULL));
 }
 
-/****f* silcutil/SilcBufferAPI/silc_buffer_spurge
+/****f* silcutil/silc_buffer_spurge
  *
  * SYNOPSIS
  *
@@ -479,7 +478,7 @@ void silc_buffer_spurge(SilcStack stack, SilcBuffer sb)
   silc_buffer_purge(sb);
 }
 
-/****f* silcutil/SilcBufferAPI/silc_buffer_set
+/****f* silcutil/silc_buffer_set
  *
  * SYNOPSIS
  *
@@ -509,7 +508,7 @@ void silc_buffer_set(SilcBuffer sb, unsigned char *data, SilcUInt32 data_len)
   sb->tail = sb->end = data + data_len;
 }
 
-/****f* silcutil/SilcBufferAPI/silc_buffer_pull
+/****f* silcutil/silc_buffer_pull
  *
  * SYNOPSIS
  *
@@ -557,7 +556,7 @@ unsigned char *silc_buffer_pull(SilcBuffer sb, SilcUInt32 len)
   return old_data;
 }
 
-/****f* silcutil/SilcBufferAPI/silc_buffer_push
+/****f* silcutil/silc_buffer_push
  *
  * SYNOPSIS
  *
@@ -605,7 +604,7 @@ unsigned char *silc_buffer_push(SilcBuffer sb, SilcUInt32 len)
   return old_data;
 }
 
-/****f* silcutil/SilcBufferAPI/silc_buffer_pull_tail
+/****f* silcutil/silc_buffer_pull_tail
  *
  * SYNOPSIS
  *
@@ -652,7 +651,7 @@ unsigned char *silc_buffer_pull_tail(SilcBuffer sb, SilcUInt32 len)
   return old_tail;
 }
 
-/****f* silcutil/SilcBufferAPI/silc_buffer_push_tail
+/****f* silcutil/silc_buffer_push_tail
  *
  * SYNOPSIS
  *
@@ -700,7 +699,7 @@ unsigned char *silc_buffer_push_tail(SilcBuffer sb, SilcUInt32 len)
   return old_tail;
 }
 
-/****f* silcutil/SilcBufferAPI/silc_buffer_put_head
+/****f* silcutil/silc_buffer_put_head
  *
  * SYNOPSIS
  *
@@ -751,7 +750,7 @@ unsigned char *silc_buffer_put_head(SilcBuffer sb,
   return (unsigned char *)memcpy(sb->head, data, len);
 }
 
-/****f* silcutil/SilcBufferAPI/silc_buffer_put
+/****f* silcutil/silc_buffer_put
  *
  * SYNOPSIS
  *
@@ -802,7 +801,7 @@ unsigned char *silc_buffer_put(SilcBuffer sb,
   return (unsigned char *)memcpy(sb->data, data, len);
 }
 
-/****f* silcutil/SilcBufferAPI/silc_buffer_put_tail
+/****f* silcutil/silc_buffer_put_tail
  *
  * SYNOPSIS
  *
@@ -853,7 +852,7 @@ unsigned char *silc_buffer_put_tail(SilcBuffer sb,
   return (unsigned char *)memcpy(sb->tail, data, len);
 }
 
-/****f* silcutil/SilcBufferAPI/silc_buffer_alloc_size
+/****f* silcutil/silc_buffer_alloc_size
  *
  * SYNOPSIS
  *
@@ -878,7 +877,7 @@ SilcBuffer silc_buffer_alloc_size(SilcUInt32 len)
   return sb;
 }
 
-/****f* silcutil/SilcBufferAPI/silc_buffer_salloc_size
+/****f* silcutil/silc_buffer_salloc_size
  *
  * SYNOPSIS
  *
@@ -909,7 +908,7 @@ SilcBuffer silc_buffer_salloc_size(SilcStack stack, SilcUInt32 len)
   return sb;
 }
 
-/****f* silcutil/SilcBufferAPI/silc_buffer_reset
+/****f* silcutil/silc_buffer_reset
  *
  * SYNOPSIS
  *
@@ -930,7 +929,7 @@ void silc_buffer_reset(SilcBuffer sb)
   sb->data = sb->tail = sb->head;
 }
 
-/****f* silcutil/SilcBufferAPI/silc_buffer_clear
+/****f* silcutil/silc_buffer_clear
  *
  * SYNOPSIS
  *
@@ -951,7 +950,7 @@ void silc_buffer_clear(SilcBuffer sb)
   silc_buffer_reset(sb);
 }
 
-/****f* silcutil/SilcBufferAPI/silc_buffer_start
+/****f* silcutil/silc_buffer_start
  *
  * SYNOPSIS
  *
@@ -971,7 +970,7 @@ void silc_buffer_start(SilcBuffer sb)
   sb->data = sb->head;
 }
 
-/****f* silcutil/SilcBufferAPI/silc_buffer_end
+/****f* silcutil/silc_buffer_end
  *
  * SYNOPSIS
  *
@@ -993,7 +992,7 @@ void silc_buffer_end(SilcBuffer sb)
   sb->tail = sb->end;
 }
 
-/****f* silcutil/SilcBufferAPI/silc_buffer_copy
+/****f* silcutil/silc_buffer_copy
  *
  * SYNOPSIS
  *
@@ -1021,7 +1020,7 @@ SilcBuffer silc_buffer_copy(SilcBuffer sb)
   return sb_new;
 }
 
-/****f* silcutil/SilcBufferAPI/silc_buffer_scopy
+/****f* silcutil/silc_buffer_scopy
  *
  * SYNOPSIS
  *
@@ -1055,7 +1054,7 @@ SilcBuffer silc_buffer_scopy(SilcStack stack, SilcBuffer sb)
   return sb_new;
 }
 
-/****f* silcutil/SilcBufferAPI/silc_buffer_clone
+/****f* silcutil/silc_buffer_clone
  *
  * SYNOPSIS
  *
@@ -1085,7 +1084,7 @@ SilcBuffer silc_buffer_clone(SilcBuffer sb)
   return sb_new;
 }
 
-/****f* silcutil/SilcBufferAPI/silc_buffer_sclone
+/****f* silcutil/silc_buffer_sclone
  *
  * SYNOPSIS
  *
@@ -1121,7 +1120,7 @@ SilcBuffer silc_buffer_sclone(SilcStack stack, SilcBuffer sb)
   return sb_new;
 }
 
-/****f* silcutil/SilcBufferAPI/silc_buffer_realloc
+/****f* silcutil/silc_buffer_realloc
  *
  * SYNOPSIS
  *
@@ -1167,7 +1166,7 @@ SilcBuffer silc_buffer_realloc(SilcBuffer sb, SilcUInt32 newsize)
   return sb;
 }
 
-/****f* silcutil/SilcBufferAPI/silc_buffer_srealloc
+/****f* silcutil/silc_buffer_srealloc
  *
  * SYNOPSIS
  *
@@ -1226,7 +1225,7 @@ SilcBuffer silc_buffer_srealloc(SilcStack stack,
   return sb;
 }
 
-/****f* silcutil/SilcBufferAPI/silc_buffer_realloc_size
+/****f* silcutil/silc_buffer_realloc_size
  *
  * SYNOPSIS
  *
@@ -1251,7 +1250,7 @@ SilcBuffer silc_buffer_realloc_size(SilcBuffer sb, SilcUInt32 newsize)
   return sb;
 }
 
-/****f* silcutil/SilcBufferAPI/silc_buffer_srealloc_size
+/****f* silcutil/silc_buffer_srealloc_size
  *
  * SYNOPSIS
  *
@@ -1284,7 +1283,7 @@ SilcBuffer silc_buffer_srealloc_size(SilcStack stack,
   return sb;
 }
 
-/****f* silcutil/SilcBufferAPI/silc_buffer_enlarge
+/****f* silcutil/silc_buffer_enlarge
  *
  * SYNOPSIS
  *
@@ -1317,7 +1316,7 @@ SilcBool silc_buffer_enlarge(SilcBuffer sb, SilcUInt32 size)
   return TRUE;
 }
 
-/****f* silcutil/SilcBufferAPI/silc_buffer_senlarge
+/****f* silcutil/silc_buffer_senlarge
  *
  * SYNOPSIS
  *
@@ -1358,7 +1357,7 @@ SilcBool silc_buffer_senlarge(SilcStack stack, SilcBuffer sb, SilcUInt32 size)
   return TRUE;
 }
 
-/****f* silcutil/SilcBufferAPI/silc_buffer_append
+/****f* silcutil/silc_buffer_append
  *
  * SYNOPSIS
  *
@@ -1404,7 +1403,7 @@ SilcBool silc_buffer_append(SilcBuffer sb, SilcUInt32 size)
   return TRUE;
 }
 
-/****f* silcutil/SilcBufferAPI/silc_buffer_append
+/****f* silcutil/silc_buffer_sappend
  *
  * SYNOPSIS
  *
@@ -1458,7 +1457,7 @@ SilcBool silc_buffer_sappend(SilcStack stack, SilcBuffer sb, SilcUInt32 size)
   return TRUE;
 }
 
-/****f* silcutil/SilcBufferAPI/silc_buffer_strchr
+/****f* silcutil/silc_buffer_strchr
  *
  * SYNOPSIS
  *
@@ -1511,7 +1510,7 @@ unsigned char *silc_buffer_strchr(SilcBuffer sb, int c, SilcBool first)
   return NULL;
 }
 
-/****f* silcutil/SilcBufferAPI/silc_buffer_equal
+/****f* silcutil/silc_buffer_equal
  *
  * SYNOPSIS
  *
@@ -1533,7 +1532,7 @@ SilcBool silc_buffer_equal(SilcBuffer sb1, SilcBuffer sb2)
   return memcmp(sb1->data, sb2->data, silc_buffer_len(sb1)) == 0;
 }
 
-/****f* silcutil/SilcBufferAPI/silc_buffer_memcmp
+/****f* silcutil/silc_buffer_memcmp
  *
  * SYNOPSIS
  *
@@ -1558,7 +1557,7 @@ SilcBool silc_buffer_memcmp(SilcBuffer buffer, const unsigned char *data,
   return memcmp(buffer->data, data, data_len) == 0;
 }
 
-/****f* silcutil/SilcBufferAPI/silc_buffer_printf
+/****f* silcutil/silc_buffer_printf
  *
  * SYNOPSIS
  *
index 50ab190708491a6fba3391c88e540b39e0286b43..60d61124e82e61b4b865c33f37672067e4915944 100644 (file)
@@ -17,7 +17,7 @@
 
 */
 
-/****h* silcutil/SILC Buffer Format Interface
+/****h* silcutil/Buffer Format Interface
  *
  * DESCRIPTION
  *
@@ -36,7 +36,7 @@
  * macro provides many different flags that can change the behavior of the
  * matching, with capabilities to also mimic Sed behavior.
  *
- * As the SilcBuffer API is not thread-safe these routines may not be used
+ * As the SilcBuffer context is not thread-safe these routines may not be used
  * in multithreaded environment with a same SilcBuffer context without
  * concurrency control.
  *
@@ -44,6 +44,7 @@
  *
  * SilcBufferStruct buffer;
  *
+ * // Encode buffer
  * memset(&buffer, 0, sizeof(buffer));
  * ret = silc_buffer_format(&buffer,
  *                          SILC_STR_UINT32(intval),
@@ -66,7 +67,7 @@
 #ifndef SILCBUFFMT_H
 #define SILCBUFFMT_H
 
-/****f* silcutil/SilcBufferFormatAPI/SilcBufferFormatFunc
+/****f* silcutil/SilcBufferFormatFunc
  *
  * SYNOPSIS
  *
@@ -97,7 +98,7 @@
 typedef int (*SilcBufferFormatFunc)(SilcStack stack, SilcBuffer buffer,
                                    void *value, void *context);
 
-/****f* silcutil/SilcBufferFormatAPI/SilcBufferUnformatFunc
+/****f* silcutil/SilcBufferUnformatFunc
  *
  * SYNOPSIS
  *
@@ -128,7 +129,7 @@ typedef int (*SilcBufferUnformatFunc)(SilcStack stack, SilcBuffer buffer,
 
 /* Prototypes */
 
-/****f* silcutil/SilcBufferFormatAPI/silc_buffer_format
+/****f* silcutil/silc_buffer_format
  *
  * SYNOPSIS
  *
@@ -163,7 +164,7 @@ typedef int (*SilcBufferUnformatFunc)(SilcStack stack, SilcBuffer buffer,
  *    silc_buffer_purge(&buffer);
  *
  *    // Dynamically allocated zero size buffer
- *    SilcBuffer buf;
 *    SilcBuffer buf;
  *    buf = silc_buffer_alloc(0);
  *    ret = silc_buffer_format(buf,
  *                             SILC_STR_UINT32(intval),
@@ -188,7 +189,7 @@ typedef int (*SilcBufferUnformatFunc)(SilcStack stack, SilcBuffer buffer,
  ***/
 int silc_buffer_format(SilcBuffer dst, ...);
 
-/****f* silcutil/SilcBufferFormatAPI/silc_buffer_sformat
+/****f* silcutil/silc_buffer_sformat
  *
  * SYNOPSIS
  *
@@ -206,7 +207,7 @@ int silc_buffer_format(SilcBuffer dst, ...);
  ***/
 int silc_buffer_sformat(SilcStack stack, SilcBuffer dst, ...);
 
-/****f* silcutil/SilcBufferFormatAPI/silc_buffer_format_vp
+/****f* silcutil/silc_buffer_format_vp
  *
  * SYNOPSIS
  *
@@ -221,7 +222,7 @@ int silc_buffer_sformat(SilcStack stack, SilcBuffer dst, ...);
  ***/
 int silc_buffer_format_vp(SilcBuffer dst, va_list ap);
 
-/****f* silcutil/SilcBufferFormatAPI/silc_buffer_sformat_vp
+/****f* silcutil/silc_buffer_sformat_vp
  *
  * SYNOPSIS
  *
@@ -239,7 +240,7 @@ int silc_buffer_format_vp(SilcBuffer dst, va_list ap);
  ***/
 int silc_buffer_sformat_vp(SilcStack stack, SilcBuffer dst, va_list ap);
 
-/****f* silcutil/SilcBufferFormatAPI/silc_buffer_unformat
+/****f* silcutil/silc_buffer_unformat
  *
  * SYNOPSIS
  *
@@ -265,7 +266,7 @@ int silc_buffer_sformat_vp(SilcStack stack, SilcBuffer dst, va_list ap);
  ***/
 int silc_buffer_unformat(SilcBuffer src, ...);
 
-/****f* silcutil/SilcBufferFormatAPI/silc_buffer_sunformat
+/****f* silcutil/silc_buffer_sunformat
  *
  * SYNOPSIS
  *
@@ -282,7 +283,7 @@ int silc_buffer_unformat(SilcBuffer src, ...);
  ***/
 int silc_buffer_sunformat(SilcStack stack, SilcBuffer src, ...);
 
-/****f* silcutil/SilcBufferFormatAPI/silc_buffer_unformat_vp
+/****f* silcutil/silc_buffer_unformat_vp
  *
  * SYNOPSIS
  *
@@ -296,7 +297,7 @@ int silc_buffer_sunformat(SilcStack stack, SilcBuffer src, ...);
  ***/
 int silc_buffer_unformat_vp(SilcBuffer src, va_list ap);
 
-/****f* silcutil/SilcBufferFormatAPI/silc_buffer_sunformat_vp
+/****f* silcutil/silc_buffer_sunformat_vp
  *
  * SYNOPSIS
  *
@@ -313,7 +314,7 @@ int silc_buffer_unformat_vp(SilcBuffer src, va_list ap);
  ***/
 int silc_buffer_sunformat_vp(SilcStack stack, SilcBuffer src, va_list ap);
 
-/****f* silcutil/SilcBufferFormatAPI/silc_buffer_strformat
+/****f* silcutil/silc_buffer_strformat
  *
  * SYNOPSIS
  *
@@ -338,7 +339,7 @@ int silc_buffer_sunformat_vp(SilcStack stack, SilcBuffer src, va_list ap);
  ***/
 int silc_buffer_strformat(SilcBuffer dst, ...);
 
-/****f* silcutil/SilcBufferFormatAPI/silc_buffer_sstrformat
+/****f* silcutil/silc_buffer_sstrformat
  *
  * SYNOPSIS
  *
@@ -361,7 +362,7 @@ int silc_buffer_strformat(SilcBuffer dst, ...);
  ***/
 int silc_buffer_sstrformat(SilcStack stack, SilcBuffer dst, ...);
 
-/****d* silcutil/SilcBufferFormatAPI/SILC_STR_SINT8
+/****d* silcutil/SILC_STR_SINT8
  *
  * NAME
  *
@@ -371,13 +372,13 @@ int silc_buffer_sstrformat(SilcStack stack, SilcBuffer dst, ...);
  *
  *    One 8-bit signed integer.
  *
- *    Formatting:    SILC_STR_SINT8(SilcInt8)
- *    Unformatting:  SILC_STR_SINT8(SilcInt8 *)
+ *     Formatting:    SILC_STR_SINT8(SilcInt8)
+ *     Unformatting:  SILC_STR_SINT8(SilcInt8 *)
  *
  ***/
 #define SILC_STR_SINT8(x) SILC_PARAM_SINT8, (x)
 
-/****d* silcutil/SilcBufferFormatAPI/SILC_STR_UINT8
+/****d* silcutil/SILC_STR_UINT8
  *
  * NAME
  *
@@ -387,8 +388,8 @@ int silc_buffer_sstrformat(SilcStack stack, SilcBuffer dst, ...);
  *
  *    One 8-bit unsigned integer.
  *
- *    Formatting:    SILC_STR_UINT8(SilcUInt8)
- *    Unformatting:  SILC_STR_UINT8(SilcUInt8 *)
+ *     Formatting:    SILC_STR_UINT8(SilcUInt8)
+ *     Unformatting:  SILC_STR_UINT8(SilcUInt8 *)
  *
  ***/
 #define SILC_STR_UINT8(x) SILC_PARAM_UINT8, (x)
@@ -397,7 +398,7 @@ int silc_buffer_sstrformat(SilcStack stack, SilcBuffer dst, ...);
 #define SILC_STR_SI_CHAR(x) SILC_PARAM_SINT8, (x)
 #define SILC_STR_UI_CHAR(x) SILC_PARAM_UINT8, (x)
 
-/****d* silcutil/SilcBufferFormatAPI/SILC_STR_SINT16
+/****d* silcutil/SILC_STR_SINT16
  *
  * NAME
  *
@@ -407,13 +408,13 @@ int silc_buffer_sstrformat(SilcStack stack, SilcBuffer dst, ...);
  *
  *    SilcInt16.
  *
- *    Formatting:    SILC_STR_SINT16(SilcInt16)
- *    Unformatting:  SILC_STR_SINT16(SilcInt16 *)
+ *     Formatting:    SILC_STR_SINT16(SilcInt16)
+ *     Unformatting:  SILC_STR_SINT16(SilcInt16 *)
  *
  ***/
 #define SILC_STR_SINT16(x) SILC_PARAM_SINT16, (x)
 
-/****d* silcutil/SilcBufferFormatAPI/SILC_STR_UINT16
+/****d* silcutil/SILC_STR_UINT16
  *
  * NAME
  *
@@ -423,8 +424,8 @@ int silc_buffer_sstrformat(SilcStack stack, SilcBuffer dst, ...);
  *
  *    SilcUInt16.
  *
- *    Formatting:    SILC_STR_UINT16(SilcUInt16)
- *    Unformatting:  SILC_STR_UINT16(SilcUInt16 *)
+ *     Formatting:    SILC_STR_UINT16(SilcUInt16)
+ *     Unformatting:  SILC_STR_UINT16(SilcUInt16 *)
  *
  ***/
 #define SILC_STR_UINT16(x) SILC_PARAM_UINT16, (x)
@@ -433,7 +434,7 @@ int silc_buffer_sstrformat(SilcStack stack, SilcBuffer dst, ...);
 #define SILC_STR_SI_SHORT(x) SILC_PARAM_SINT16, (x)
 #define SILC_STR_UI_SHORT(x) SILC_PARAM_UINT16, (x)
 
-/****d* silcutil/SilcBufferFormatAPI/SILC_STR_SINT32
+/****d* silcutil/SILC_STR_SINT32
  *
  * NAME
  *
@@ -443,13 +444,13 @@ int silc_buffer_sstrformat(SilcStack stack, SilcBuffer dst, ...);
  *
  *    SilcInt32.
  *
- *    Formatting:    SILC_STR_SINT32(SilcInt32)
- *    Unformatting:  SILC_STR_SINT32(SilcInt32 *)
+ *     Formatting:    SILC_STR_SINT32(SilcInt32)
+ *     Unformatting:  SILC_STR_SINT32(SilcInt32 *)
  *
  ***/
 #define SILC_STR_SINT32(x) SILC_PARAM_SINT32, (x)
 
-/****d* silcutil/SilcBufferFormatAPI/SILC_STR_UINT32
+/****d* silcutil/SILC_STR_UINT32
  *
  * NAME
  *
@@ -459,8 +460,8 @@ int silc_buffer_sstrformat(SilcStack stack, SilcBuffer dst, ...);
  *
  *    SilcUInt32.
  *
- *    Formatting:    SILC_STR_UINT32(SilcUInt32)
- *    Unformatting:  SILC_STR_UINT32(SilcUInt32 *)
+ *     Formatting:    SILC_STR_UINT32(SilcUInt32)
+ *     Unformatting:  SILC_STR_UINT32(SilcUInt32 *)
  *
  ***/
 #define SILC_STR_UINT32(x) SILC_PARAM_UINT32, (x)
@@ -469,7 +470,7 @@ int silc_buffer_sstrformat(SilcStack stack, SilcBuffer dst, ...);
 #define SILC_STR_SI_INT(x) SILC_PARAM_SINT32, (x)
 #define SILC_STR_UI_INT(x) SILC_PARAM_UINT32, (x)
 
-/****d* silcutil/SilcBufferFormatAPI/SILC_STR_SINT64
+/****d* silcutil/SILC_STR_SINT64
  *
  * NAME
  *
@@ -479,13 +480,13 @@ int silc_buffer_sstrformat(SilcStack stack, SilcBuffer dst, ...);
  *
  *    SilcInt64.
  *
- *    Formatting:    SILC_STR_SINT64(SilcInt64)
- *    Unformatting:  SILC_STR_SINT64(SilcInt64 *)
+ *     Formatting:    SILC_STR_SINT64(SilcInt64)
+ *     Unformatting:  SILC_STR_SINT64(SilcInt64 *)
  *
  ***/
 #define SILC_STR_SI_INT64(x) SILC_PARAM_SINT64, (x)
 
-/****d* silcutil/SilcBufferFormatAPI/SILC_STR_UINT64
+/****d* silcutil/SILC_STR_UINT64
  *
  * NAME
  *
@@ -495,8 +496,8 @@ int silc_buffer_sstrformat(SilcStack stack, SilcBuffer dst, ...);
  *
  *    SilcUInt64.
  *
- *    Formatting:    SILC_STR_UINT64(SilcUInt64)
- *    Unformatting:  SILC_STR_UINT64(SilcUInt64 *)
+ *     Formatting:    SILC_STR_UINT64(SilcUInt64)
+ *     Unformatting:  SILC_STR_UINT64(SilcUInt64 *)
  *
  ***/
 #define SILC_STR_UI_INT64(x) SILC_PARAM_UINT64, (x)
@@ -505,7 +506,7 @@ int silc_buffer_sstrformat(SilcStack stack, SilcBuffer dst, ...);
 #define SILC_STR_SI_INT64(x) SILC_PARAM_SINT64, (x)
 #define SILC_STR_UI_INT64(x) SILC_PARAM_UINT64, (x)
 
-/****d* silcutil/SilcBufferFormatAPI/SILC_STR_STRING
+/****d* silcutil/SILC_STR_STRING
  *
  * NAME
  *
@@ -515,14 +516,14 @@ int silc_buffer_sstrformat(SilcStack stack, SilcBuffer dst, ...);
  *
  *    Encode NULL terminated string.  Use this only for formatting.
  *
- *    Formatting:  SILC_STR_STRING(char *)
+ *     Formatting:  SILC_STR_STRING(char *)
  *
  *    For unformatting use one of the SILC_STR_*_STRING macros, which
  *    automatically gets the length of the string from the buffer.  Note
  *    SILC_STR_STRING does not save the length of the string into the buffer.
  *    The caller must do that in order for the unformatting macros to work.
  *
- *    Example:
+ * EXAMPLE
  *
  *    Formatting:    ..., SILC_STR_UINT32(strlen(string)),
  *                        SILC_STR_STRING(string), ...
@@ -531,7 +532,7 @@ int silc_buffer_sstrformat(SilcStack stack, SilcBuffer dst, ...);
  ***/
 #define SILC_STR_STRING(x) SILC_PARAM_UI8_STRING, (x)
 
-/****d* silcutil/SilcBufferFormatAPI/SILC_STR_*_STRING
+/****d* silcutil/SILC_STR_*_STRING
  *
  * NAME
  *
@@ -548,8 +549,8 @@ int silc_buffer_sstrformat(SilcStack stack, SilcBuffer dst, ...);
  *    NULL terminated because strlen() will be used to get the length of
  *    the string.
  *
- *    Formatting:    SILC_STR_UI32_STRING(unsigned char *)
- *    Unformatting:  SILC_STR_UI32_STRING(unsigned char **)
+ *     Formatting:    SILC_STR_UI32_STRING(unsigned char *)
+ *     Unformatting:  SILC_STR_UI32_STRING(unsigned char **)
  *
  *    Unformatting procedure will check for length of the string from the
  *    buffer before trying to get the string out. Thus, one *must* format the
@@ -558,7 +559,7 @@ int silc_buffer_sstrformat(SilcStack stack, SilcBuffer dst, ...);
  *    length of the string because unformatting procedure will take it
  *    automatically.
  *
- *    Example:
+ * EXAMPLE
  *
  *    Formatting:    ..., SILC_STR_UINT32(strlen(string)),
  *                        SILC_STR_UI32_STRING(string), ...
@@ -580,7 +581,7 @@ int silc_buffer_sstrformat(SilcStack stack, SilcBuffer dst, ...);
 #define SILC_STR_UI32_STRING(x) SILC_PARAM_UI32_STRING, (x)
 #define SILC_STR_UI32_STRING_ALLOC(x) SILC_PARAM_UI32_STRING | SILC_PARAM_ALLOC, (x)
 
-/****d* silcutil/SilcBufferFormatAPI/SILC_STR_*_NSTRING
+/****d* silcutil/SILC_STR_*_NSTRING
  *
  * NAME
  *
@@ -595,8 +596,8 @@ int silc_buffer_sstrformat(SilcStack stack, SilcBuffer dst, ...);
  *
  *    Unsigned string. Second argument is the length of the string.
  *
- *    Formatting:    SILC_STR_UI32_NSTRING(unsigned char *, SilcUInt32)
- *    Unformatting:  SILC_STR_UI32_NSTRING(unsigned char **, SilcUInt32 *)
+ *     Formatting:    SILC_STR_UI32_NSTRING(unsigned char *, SilcUInt32)
+ *     Unformatting:  SILC_STR_UI32_NSTRING(unsigned char **, SilcUInt32 *)
  *
  *    Unformatting procedure will check for length of the string from the
  *    buffer before trying to get the string out. Thus, one *must* format the
@@ -605,7 +606,7 @@ int silc_buffer_sstrformat(SilcStack stack, SilcBuffer dst, ...);
  *    length of the string because unformatting procedure will take it
  *    automatically.
  *
- *     Example:
+ * EXAMPLE
  *
  *     Formatting:    ..., SILC_STR_UINT32(strlen(string)),
  *                         SILC_STR_UI32_NSTRING(string, strlen(string)), ...
@@ -632,7 +633,7 @@ int silc_buffer_sstrformat(SilcStack stack, SilcBuffer dst, ...);
 #define SILC_STR_UI32_NSTRING_ALLOC(x, l) \
   SILC_PARAM_UI32_NSTRING | SILC_PARAM_ALLOC, (x), (l)
 
-/****d* silcutil/SilcBufferFormatAPI/SILC_STR_DATA
+/****d* silcutil/SILC_STR_DATA
  *
  * NAME
  *
@@ -643,8 +644,8 @@ int silc_buffer_sstrformat(SilcStack stack, SilcBuffer dst, ...);
  *
  *    Binary data formatting.  Second argument is the length of the data.
  *
- *    Formatting:    SILC_STR_DATA(unsigned char *, SilcUInt32)
- *    Unformatting:  SILC_STR_DATA(unsigned char **, SilcUInt32)
+ *     Formatting:    SILC_STR_DATA(unsigned char *, SilcUInt32)
+ *     Unformatting:  SILC_STR_DATA(unsigned char **, SilcUInt32)
  *
  *    This type can be used to take arbitrary size data block from the buffer
  *    by sending the requested amount of bytes as argument.
@@ -660,7 +661,7 @@ int silc_buffer_sstrformat(SilcStack stack, SilcBuffer dst, ...);
 #define SILC_STR_UI_XNSTRING(x, l) SILC_PARAM_UICHAR, (x), (l)
 #define SILC_STR_UI_XNSTRING_ALLOC(x, l) SILC_PARAM_UICHAR | SILC_PARAM_ALLOC, (x), (l)
 
-/****d* silcutil/SilcBufferFormatAPI/SILC_STR_BUFFER
+/****d* silcutil/SILC_STR_BUFFER
  *
  * NAME
  *
@@ -671,8 +672,8 @@ int silc_buffer_sstrformat(SilcStack stack, SilcBuffer dst, ...);
  *
  *    SilcBuffer formatting.
  *
- *    Formatting:    SILC_STR_BUFFER(SilcBuffer)
- *    Unformatting:  SILC_STR_BUFFER(SilcBuffer)
+ *     Formatting:    SILC_STR_BUFFER(SilcBuffer)
+ *     Unformatting:  SILC_STR_BUFFER(SilcBuffer)
  *
  *    This type can be used to format and unformat SilcBuffer.  Note that, the
  *    length of the buffer will be automatically encoded into the buffer as
@@ -686,7 +687,7 @@ int silc_buffer_sstrformat(SilcStack stack, SilcBuffer dst, ...);
 #define SILC_STR_BUFFER(x) SILC_PARAM_BUFFER, (x)
 #define SILC_STR_BUFFER_ALLOC(x) SILC_PARAM_BUFFER | SILC_PARAM_ALLOC, (x)
 
-/****d* silcutil/SilcBufferFormatAPI/SILC_STR_REPLACE
+/****d* silcutil/SILC_STR_REPLACE
  *
  * NAME
  *
@@ -716,9 +717,9 @@ int silc_buffer_sstrformat(SilcStack stack, SilcBuffer dst, ...);
  *
  *    Use this only for formatting.
  *
- *    Formatting:  SILC_STR_REPLACE(unsigned char *, SilcUInt32)
+ *     Formatting:  SILC_STR_REPLACE(unsigned char *, SilcUInt32)
  *
- *    Example:
+ * EXAMPLE
  *
  *    Before replacing
  *    -------------------------
@@ -738,7 +739,7 @@ int silc_buffer_sstrformat(SilcStack stack, SilcBuffer dst, ...);
  ***/
 #define SILC_STR_REPLACE(x, l) SILC_PARAM_UICHAR | SILC_PARAM_REPLACE, (x), (l)
 
-/****d* silcutil/SilcBufferFormatAPI/SILC_STR_FUNC
+/****d* silcutil/SILC_STR_FUNC
  *
  * NAME
  *
@@ -748,8 +749,8 @@ int silc_buffer_sstrformat(SilcStack stack, SilcBuffer dst, ...);
  *
  *    Formatting and unformatting of arbitrary data.
  *
- *    Formatting:    SILC_STR_FUNC(function, void *value, void *context)
- *    Unformatting:  SILC_STR_FUNC(function, void **value, void *context)
+ *     Formatting:    SILC_STR_FUNC(function, void *value, void *context)
+ *     Unformatting:  SILC_STR_FUNC(function, void **value, void *context)
  *
  *    This type can be used to call the `function' of the type
  *    SilcBufferFormatFunc or SilcBufferUnformatFunc to encode or decode
@@ -791,7 +792,7 @@ int silc_buffer_sstrformat(SilcStack stack, SilcBuffer dst, ...);
 #define SILC_STR_FUNC(func, val, context) SILC_PARAM_FUNC, \
     func, (val), (context)
 
-/****d* silcutil/SilcBufferFormatAPI/SilcBufferRegexFlags
+/****d* silcutil/SilcBufferRegexFlags
  *
  * NAME
  *
@@ -847,7 +848,7 @@ typedef enum {
 } SilcBufferRegexFlags;
 /***/
 
-/****d* silcutil/SilcBufferFormatAPI/SILC_STR_REGEX
+/****d* silcutil/SILC_STR_REGEX
  *
  * NAME
  *
@@ -857,8 +858,8 @@ typedef enum {
  *
  *    Regular expression matching within the buffer.
  *
- *    Formatting:    SILC_STR_REGEX(char *regex, SilcBufferRegexFlags flags)
- *    Unformatting:  SILC_STR_REGEX(char *regex, SilcBufferRegexFlags flags)
+ *     Formatting:    SILC_STR_REGEX(char *regex, SilcBufferRegexFlags flags)
+ *     Unformatting:  SILC_STR_REGEX(char *regex, SilcBufferRegexFlags flags)
  *
  *    SILC_STR_REGEX can be used to do regular expression matching within
  *    the SilcBuffer.  When the string in the buffer matches the regular
@@ -935,7 +936,7 @@ typedef enum {
  ***/
 #define SILC_STR_REGEX(regex, flags) SILC_PARAM_REGEX, (regex), (flags)
 
-/****d* silcutil/SilcBufferFormatAPI/SILC_STR_DELETE
+/****d* silcutil/SILC_STR_DELETE
  *
  * NAME
  *
@@ -954,12 +955,12 @@ typedef enum {
  *
  *    Use this only for formatting.
  *
- *    Formatting:  SILC_STR_DELETE(int bytes)
+ *     Formatting:  SILC_STR_DELETE(int bytes)
  *
  ***/
 #define SILC_STR_DELETE(x) SILC_PARAM_DELETE, (x)
 
-/****d* silcutil/SilcBufferFormatAPI/SILC_STR_OFFSET
+/****d* silcutil/SILC_STR_OFFSET
  *
  * NAME
  *
@@ -972,7 +973,7 @@ typedef enum {
  *    or backwards (negative offset).  It can be used to for example skip
  *    some types during unformatting.
  *
- *    Example:
+ * EXAMPLE
  *
  *    ..., SILC_STR_OFFSET(5), ...
  *    ..., SILC_STR_OFFSET(-3), ...
@@ -984,7 +985,7 @@ typedef enum {
  ***/
 #define SILC_STR_OFFSET(x) SILC_PARAM_OFFSET, (x)
 
-/****d* silcutil/SilcBufferFormatAPI/SILC_STR_OFFSET_START
+/****d* silcutil/SILC_STR_OFFSET_START
  *
  * NAME
  *
@@ -994,14 +995,14 @@ typedef enum {
  *
  *    Moves the buffer position to the start of the data area.
  *
- *    Example:
+ * EXAMPLE
  *
  *    ..., SILC_STR_OFFSET_START, ...
  *
  ***/
 #define SILC_STR_OFFSET_START SILC_PARAM_OFFSET_START
 
-/****d* silcutil/SilcBufferFormatAPI/SILC_STR_OFFSET_END
+/****d* silcutil/SILC_STR_OFFSET_END
  *
  * NAME
  *
@@ -1011,14 +1012,14 @@ typedef enum {
  *
  *    Moves the buffer position to the end of the data area.
  *
- *    Example:
+ * EXAMPLE
  *
  *    ..., SILC_STR_OFFSET_END, ...
  *
  ***/
 #define SILC_STR_OFFSET_END SILC_PARAM_OFFSET_END
 
-/****d* silcutil/SilcBufferFormatAPI/SILC_STR_ADVANCE
+/****d* silcutil/SILC_STR_ADVANCE
  *
  * NAME
  *
@@ -1051,7 +1052,7 @@ typedef enum {
  ***/
 #define SILC_STR_ADVANCE SILC_PARAM_ADVANCE
 
-/****d* silcutil/SilcBufferFormatAPI/SILC_STR_END
+/****d* silcutil/SILC_STR_END
  *
  * NAME
  *
@@ -1065,7 +1066,7 @@ typedef enum {
  ***/
 #define SILC_STR_END SILC_PARAM_END
 
-/****d* silcutil/SilcBufferFormatAPI/SILC_STRFMT_END
+/****d* silcutil/SILC_STRFMT_END
  *
  * NAME
  *
index 59918a48ef3aa6b4d14bf7204cc5476bb6b11b1f..3774be21db93254b018f3fe39cd7e2ce1f06905c 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 2006 - 2007 Pekka Riikonen
+  Copyright (C) 2006 - 2008 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
@@ -17,7 +17,7 @@
 
 */
 
-/****h* silcutil/SILC Condition Variable Interface
+/****h* silcutil/Condition Variable Interface
  *
  * DESCRIPTION
  *
@@ -49,7 +49,7 @@
 #ifndef SILCCOND_H
 #define SILCCOND_H
 
-/****s* silcutil/SilcCondAPI/SilcCond
+/****s* silcutil/SilcCond
  *
  * NAME
  *
@@ -64,7 +64,7 @@
  ***/
 typedef struct SilcCondStruct *SilcCond;
 
-/****s* silcutil/SilcCondAPI/silc_cond_alloc
+/****f* silcutil/silc_cond_alloc
  *
  * SYNOPSIS
  *
@@ -81,7 +81,7 @@ typedef struct SilcCondStruct *SilcCond;
  ***/
 SilcBool silc_cond_alloc(SilcCond *cond);
 
-/****s* silcutil/SilcCondAPI/silc_cond_free
+/****f* silcutil/silc_cond_free
  *
  * SYNOPSIS
  *
@@ -95,7 +95,7 @@ SilcBool silc_cond_alloc(SilcCond *cond);
  ***/
 void silc_cond_free(SilcCond cond);
 
-/****s* silcutil/SilcCondAPI/silc_cond_wait
+/****f* silcutil/silc_cond_wait
  *
  * SYNOPSIS
  *
@@ -120,7 +120,7 @@ void silc_cond_free(SilcCond cond);
  ***/
 void silc_cond_wait(SilcCond cond, SilcMutex mutex);
 
-/****s* silcutil/SilcCondAPI/silc_cond_timedwait
+/****f* silcutil/silc_cond_timedwait
  *
  * SYNOPSIS
  *
@@ -140,7 +140,7 @@ void silc_cond_wait(SilcCond cond, SilcMutex mutex);
  ***/
 SilcBool silc_cond_timedwait(SilcCond cond, SilcMutex mutex, int timeout);
 
-/****s* silcutil/SilcCondAPI/silc_cond_signal
+/****f* silcutil/silc_cond_signal
  *
  * SYNOPSIS
  *
@@ -167,7 +167,7 @@ SilcBool silc_cond_timedwait(SilcCond cond, SilcMutex mutex, int timeout);
  ***/
 void silc_cond_signal(SilcCond cond);
 
-/****s* silcutil/SilcCondAPI/silc_cond_broadcast
+/****f* silcutil/silc_cond_broadcast
  *
  * SYNOPSIS
  *
index 4d4be4252bcb9b57b2a00ef17ff12f73c39619ed..c4824886640e97aed3585d0c37df639f12daeeb1 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Giovanni Giacobbi <giovanni@giacobbi.net>
 
-  Copyright (C) 2002 - 2003 Giovanni Giacobbi
+  Copyright (C) 2002 - 2003, 2008 Giovanni Giacobbi
 
   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
@@ -17,7 +17,7 @@
 
 */
 
-/****h* silcutil/SILC Config Interface
+/****h* silcutil/Config File Interface
  *
  * DESCRIPTION
  *
@@ -75,7 +75,7 @@
 #ifndef SILCCONFIG_H
 #define SILCCONFIG_H
 
-/****d* silcutil/SilcConfigAPI/SilcConfigErrno
+/****d* silcutil/SilcConfigErrno
  *
  * NAME
  *
@@ -111,7 +111,7 @@ enum {
 };
 /***/
 
-/****d* silcutil/SilcConfigAPI/SilcConfigType
+/****d* silcutil/SilcConfigType
  *
  * NAME
  *
@@ -138,7 +138,7 @@ typedef enum {
 } SilcConfigType;
 /***/
 
-/****f* silcutil/SilcConfigAPI/SilcConfigCallback
+/****f* silcutil/SilcConfigCallback
  *
  * SYNOPSIS
  *
@@ -157,7 +157,7 @@ typedef enum {
 typedef int (*SilcConfigCallback)(SilcConfigType type, const char *name,
                                  SilcUInt32 line, void *val, void *context);
 
-/****s* silcutil/SilcConfigAPI/SilcConfigTable
+/****s* silcutil/SilcConfigTable
  *
  * SYNOPSIS
  *
@@ -203,7 +203,7 @@ typedef struct SilcConfigTableStruct {
   const struct SilcConfigTableStruct *subtable;
 } SilcConfigTable;
 
-/****s* silcutil/SilcConfigAPI/SilcConfigFile
+/****s* silcutil/SilcConfigFile
  *
  * SYNOPSIS
  *
@@ -219,7 +219,7 @@ typedef struct SilcConfigTableStruct {
  ***/
 typedef struct SilcConfigFileObject SilcConfigFile;
 
-/****s* silcutil/SilcConfigAPI/SilcConfigEntity
+/****s* silcutil/SilcConfigEntity
  *
  * SYNOPSIS
  *
@@ -235,7 +235,7 @@ typedef struct SilcConfigEntityObject *SilcConfigEntity;
 
 /* Macros */
 
-/****d* silcutil/SilcConfigAPI/SILC_CONFIG_CALLBACK
+/****d* silcutil/SILC_CONFIG_CALLBACK
  *
  * NAME
  *
@@ -255,7 +255,7 @@ static int func(SilcConfigType type, const char *name,              \
 
 /* Prototypes */
 
-/****f* silcutil/SilcConfigAPI/silc_config_open
+/****f* silcutil/silc_config_open
  *
  * SYNOPSIS
  *
@@ -271,7 +271,7 @@ static int func(SilcConfigType type, const char *name,              \
  ***/
 SilcConfigFile *silc_config_open(const char *configfile);
 
-/****f* silcutil/SilcConfigAPI/silc_config_close
+/****f* silcutil/silc_config_close
  *
  * SYNOPSIS
  *
@@ -288,7 +288,7 @@ SilcConfigFile *silc_config_open(const char *configfile);
  ***/
 void silc_config_close(SilcConfigFile *file);
 
-/****f* silcutil/SilcConfigAPI/silc_config_init
+/****f* silcutil/silc_config_init
  *
  * SYNOPSIS
  *
@@ -306,7 +306,7 @@ void silc_config_close(SilcConfigFile *file);
  ***/
 SilcConfigEntity silc_config_init(SilcConfigFile *file);
 
-/****f* silcutil/SilcConfigAPI/silc_config_strerror
+/****f* silcutil/silc_config_strerror
  *
  * SYNOPSIS
  *
@@ -320,7 +320,7 @@ SilcConfigEntity silc_config_init(SilcConfigFile *file);
  ***/
 char *silc_config_strerror(int errnum);
 
-/****f* silcutil/SilcConfigAPI/silc_config_get_filename
+/****f* silcutil/silc_config_get_filename
  *
  * SYNOPSIS
  *
@@ -335,7 +335,7 @@ char *silc_config_strerror(int errnum);
  ***/
 char *silc_config_get_filename(SilcConfigFile *file);
 
-/****f* silcutil/SilcConfigAPI/silc_config_get_line
+/****f* silcutil/silc_config_get_line
  *
  * SYNOPSIS
  *
@@ -348,7 +348,7 @@ char *silc_config_get_filename(SilcConfigFile *file);
  ***/
 SilcUInt32 silc_config_get_line(SilcConfigFile *file);
 
-/****f* silcutil/SilcConfigAPI/silc_config_read_line
+/****f* silcutil/silc_config_read_line
  *
  * SYNOPSIS
  *
@@ -366,7 +366,7 @@ SilcUInt32 silc_config_get_line(SilcConfigFile *file);
  ***/
 char *silc_config_read_line(SilcConfigFile *file, SilcUInt32 line);
 
-/****f* silcutil/SilcConfigAPI/silc_config_read_current_line
+/****f* silcutil/silc_config_read_current_line
  *
  * SYNOPSIS
  *
@@ -382,7 +382,7 @@ char *silc_config_read_line(SilcConfigFile *file, SilcUInt32 line);
  ***/
 char *silc_config_read_current_line(SilcConfigFile *file);
 
-/****f* silcutil/SilcConfigAPI/silc_config_register
+/****f* silcutil/silc_config_register
  *
  * SYNOPSIS
  *
@@ -413,7 +413,7 @@ SilcBool silc_config_register(SilcConfigEntity ent, const char *name,
                          SilcConfigType type, SilcConfigCallback cb,
                          const SilcConfigTable *subtable, void *context);
 
-/****f* silcutil/SilcConfigAPI/silc_config_register_table
+/****f* silcutil/silc_config_register_table
  *
  * SYNOPSIS
  *
@@ -442,7 +442,7 @@ SilcBool silc_config_register(SilcConfigEntity ent, const char *name,
 SilcBool silc_config_register_table(SilcConfigEntity ent,
                                const SilcConfigTable table[], void *context);
 
-/****f* silcutil/SilcConfigAPI/silc_config_main
+/****f* silcutil/silc_config_main
  *
  * SYNOPSIS
  *
index 2868d2033a7174f86d0c9ec38e189e0140d467d9..739d94a68dec3b6ae8f98a47ddfe48bd91ffac58 100644 (file)
@@ -17,7 +17,7 @@
 
 */
 
-/****h* silcutil/SILC Directory Interface
+/****h* silcutil/Directory Interface
  *
  * DESCRIPTION
  *
@@ -32,7 +32,7 @@
  * dir = silc_dir_open("foodir");
  *
  * while ((entry = silc_dir_read(dir, NULL)))
- *   printf("File name: %s", silc_dir_entry_name(entry));
+ *   printf("File name: %s\n", silc_dir_entry_name(entry));
  *
  * silc_dir_close(dir);
  *
@@ -41,7 +41,7 @@
 #ifndef SILCDIR_H
 #define SILCDIR_H
 
-/****s* silcutil/SilcDirAPI/SilcDir
+/****s* silcutil/SilcDir
  *
  * NAME
  *
@@ -55,7 +55,7 @@
  ***/
 typedef struct SilcDirStruct *SilcDir;
 
-/****s* silcutil/SilcDirAPI/SilcDirEntry
+/****s* silcutil/SilcDirEntry
  *
  * NAME
  *
@@ -69,67 +69,7 @@ typedef struct SilcDirStruct *SilcDir;
  ***/
 typedef struct SilcDirEntryStruct *SilcDirEntry;
 
-/****d* silcutil/SilcDirAPI/SilcDirEntryMode
- *
- * NAME
- *
- *    typedef enum { ... } SilcDirEntryMode;
- *
- * DESCRIPTION
- *
- *    The directory entry mode bits.  These bits specify the entry mode,
- *    type and protection.
- *
- ***/
-typedef enum {
-  /* Type */
-  SILC_DIR_ENTRY_IFDIR     = 0x00000001,  /* Entry is directory */
-  SILC_DIR_ENTRY_IFCHR     = 0x00000002,  /* Entry is character device */
-  SILC_DIR_ENTRY_IFBLK     = 0x00000004,  /* Entry is block device */
-  SILC_DIR_ENTRY_IFREG     = 0x00000008,  /* Entry is regular file */
-  SILC_DIR_ENTRY_IFIFO     = 0x00000010,  /* Entry is FIFO */
-  SILC_DIR_ENTRY_IFLNK     = 0x00000020,  /* Entry is symbolic link */
-  SILC_DIR_ENTRY_IFSOCK    = 0x00000040,  /* Entry is socket */
-
-  /* Protection */
-  SILC_DIR_ENTRY_IRUSR     = 0x00000080,  /* Owner has read permission */
-  SILC_DIR_ENTRY_IWUSR     = 0x00000100,  /* Owner has write permission */
-  SILC_DIR_ENTRY_IXUSR     = 0x00000200,  /* Owner has execute permission */
-  SILC_DIR_ENTRY_IRGRP     = 0x00000400,  /* Group has read permission */
-  SILC_DIR_ENTRY_IWGRP     = 0x00000800,  /* Group has write permission */
-  SILC_DIR_ENTRY_IXGRP     = 0x00001000,  /* Group has execute permission */
-  SILC_DIR_ENTRY_IROTH     = 0x00002000,  /* Others have read permission */
-  SILC_DIR_ENTRY_IWOTH     = 0x00004000,  /* Others have write permission */
-  SILC_DIR_ENTRY_IXOTH     = 0x00008000,  /* Others have execute permission */
-} SilcDirEntryMode;
-
-/****s* silcutil/SilcDirAPI/SilcDirEntryStat
- *
- * NAME
- *
- *    typedef struct SilcDirEntryObject { ... } *SilcDirEntryStat,
- *                                               SilcDirEntryStatStruct;
- *
- * DESCRIPTION
- *
- *    The directory entry status information structure.  The structure
- *    contains various information about the entry in the directory.
- *    This context is returned by silc_dir_read or silc_dir_entry_stat.
- *
- ***/
-typedef struct SilcDirEntryStatObject {
-  SilcTimeStruct last_access;          /* Time of last access */
-  SilcTimeStruct last_mod;             /* Time of last modification */
-  SilcTimeStruct last_change;          /* Time of last status change */
-  SilcUInt64 size;                     /* Entry size in bytes */
-  SilcUInt32 uid;                      /* Owner ID of the entry */
-  SilcUInt32 gid;                      /* Group owner ID of the entry */
-  SilcUInt32 dev;                      /* Entry device number */
-  SilcUInt32 nlink;                    /* Number of hard links */
-  SilcDirEntryMode mode;               /* Entry mode */
-} *SilcDirEntryStat, SilcDirEntryStatStruct;
-
-/****f* silcutil/SilcDirAPI/silc_dir_open
+/****f* silcutil/silc_dir_open
  *
  * SYNOPSIS
  *
@@ -144,7 +84,7 @@ typedef struct SilcDirEntryStatObject {
  ***/
 SilcDir silc_dir_open(const char *name);
 
-/****f* silcutil/SilcDirAPI/silc_dir_close
+/****f* silcutil/silc_dir_close
  *
  * SYNOPSIS
  *
@@ -157,11 +97,11 @@ SilcDir silc_dir_open(const char *name);
  ***/
 void silc_dir_close(SilcDir dir);
 
-/****f* silcutil/SilcDirAPI/silc_dir_read
+/****f* silcutil/silc_dir_read
  *
  * SYNOPSIS
  *
- *    SilcDirEntry silc_dir_read(SilcDir dir, SilcDirEntryStat *status);
+ *    SilcDirEntry silc_dir_read(SilcDir dir, SilcFileStat status);
  *
  * DESCRIPTION
  *
@@ -170,16 +110,16 @@ void silc_dir_close(SilcDir dir);
  *    next entry context or NULL if there are no more entries or error occurs.
  *    In case of error the silc_errno is also set.
  *
- *    If the `status' is non-NULL this will also call silc_dir_entry_stat
- *    and returns the status into the `status' pointer.
+ *    If the `status' is non-NULL this will also call silc_file_stat and
+ *    returns the status into the `status' pointer.
  *
  *    The returned context remains valid until the silc_dir_read is called
  *    again.
  *
  ***/
-SilcDirEntry silc_dir_read(SilcDir dir, SilcDirEntryStat *status);
+SilcDirEntry silc_dir_read(SilcDir dir, SilcFileStat status);
 
-/****f* silcutil/SilcDirAPI/silc_dir_rewind
+/****f* silcutil/silc_dir_rewind
  *
  * SYNOPSIS
  *
@@ -193,7 +133,7 @@ SilcDirEntry silc_dir_read(SilcDir dir, SilcDirEntryStat *status);
  ***/
 void silc_dir_rewind(SilcDir dir);
 
-/****f* silcutil/SilcDirAPI/silc_dir_name
+/****f* silcutil/silc_dir_name
  *
  * SYNOPSIS
  *
@@ -206,7 +146,7 @@ void silc_dir_rewind(SilcDir dir);
  ***/
 const char *silc_dir_name(SilcDir dir);
 
-/****f* silcutil/SilcDirAPI/silc_dir_entry_name
+/****f* silcutil/silc_dir_entry_name
  *
  * SYNOPSIS
  *
@@ -220,21 +160,4 @@ const char *silc_dir_name(SilcDir dir);
  ***/
 const char *silc_dir_entry_name(SilcDirEntry entry);
 
-/****f* silcutil/SilcDirAPI/silc_dir_entry_stat
- *
- * SYNOPSIS
- *
- *    SilcDirEntryStat silc_dir_entry_stat(SilcDir dir, SilcDirEntry entry);
- *
- * DESCRIPTION
- *
- *    Returns the status of the entry.  The status context contains details
- *    of the entry (file) in the directory.  Returns NULL on error and sets
- *    the silc_errno.
- *
- *    The returned contest is valid until the silc_dir_read is called again.
- *
- ***/
-SilcDirEntryStat silc_dir_entry_stat(SilcDir dir, SilcDirEntry entry);
-
 #endif /* SILCDIR_H */
index a27aaad41ca86fd5f9139a986e53fe3bf10e8322..e20cdb38f6b0e5615be1aae76c7187f67abea0e1 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 2000 - 2007 Pekka Riikonen
+  Copyright (C) 2000 - 2008 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
@@ -22,7 +22,7 @@
 
 #include "silclist.h"
 
-/****h* silcutil/SILC Dynamic List Interface
+/****h* silcutil/Dynamic List Interface
  *
  * DESCRIPTION
  *
@@ -53,7 +53,7 @@
  *
  ***/
 
-/****s* silcutil/SilcDListAPI/SilcDList
+/****s* silcutil/SilcDList
  *
  * NAME
  *
@@ -81,7 +81,7 @@ typedef struct SilcDListEntryStruct {
   struct SilcDListEntryStruct *prev;
 } *SilcDListEntry;
 
-/****f* silcutil/SilcDListAPI/silc_dlist_init
+/****f* silcutil/silc_dlist_init
  *
  * SYNOPSIS
  *
@@ -109,7 +109,7 @@ SilcDList silc_dlist_init(void)
   return list;
 }
 
-/****f* silcutil/SilcDListAPI/silc_dlist_sinit
+/****f* silcutil/silc_dlist_sinit
  *
  * SYNOPSIS
  *
@@ -143,7 +143,7 @@ SilcDList silc_dlist_sinit(SilcStack stack)
   return list;
 }
 
-/****f* silcutil/SilcDListAPI/silc_dlist_uninit
+/****f* silcutil/silc_dlist_uninit
  *
  * SYNOPSIS
  *
@@ -175,7 +175,7 @@ void silc_dlist_uninit(SilcDList list)
   }
 }
 
-/****f* silcutil/SilcDListAPI/silc_dlist_count
+/****f* silcutil/silc_dlist_count
  *
  * SYNOPSIS
  *
@@ -194,7 +194,7 @@ int silc_dlist_count(SilcDList list)
   return silc_list_count(list->list);
 }
 
-/****f* silcutil/SilcDListAPI/silc_dlist_start
+/****f* silcutil/silc_dlist_start
  *
  * SYNOPSIS
  *
@@ -215,7 +215,7 @@ void silc_dlist_start(SilcDList list)
   list->current = list->prev = NULL;
 }
 
-/****f* silcutil/SilcDListAPI/silc_dlist_end
+/****f* silcutil/silc_dlist_end
  *
  * SYNOPSIS
  *
@@ -236,7 +236,7 @@ void silc_dlist_end(SilcDList list)
   list->current = list->prev = NULL;
 }
 
-/****f* silcutil/SilcDListAPI/silc_dlist_add
+/****f* silcutil/silc_dlist_add
  *
  * SYNOPSIS
  *
@@ -261,7 +261,7 @@ SilcBool silc_dlist_add(SilcDList list, void *context)
   return TRUE;
 }
 
-/****f* silcutil/SilcDList/silc_dlist_insert
+/****f* silcutil/silc_dlist_insert
  *
  * SYNOPSIS
  *
@@ -287,7 +287,7 @@ SilcBool silc_dlist_insert(SilcDList list, void *context)
   return TRUE;
 }
 
-/****f* silcutil/SilcDListAPI/silc_dlist_del
+/****f* silcutil/silc_dlist_del
  *
  * SYNOPSIS
  *
@@ -322,7 +322,7 @@ void silc_dlist_del(SilcDList list, void *entry)
   }
 }
 
-/****f* silcutil/SilcDListAPI/silc_dlist_get
+/****f* silcutil/silc_dlist_get
  *
  * SYNOPSIS
  *
index d0d2adf873eec489e73a65b7fc8404f2ce114512..3f3b8caef03d67d28855f48ad695fb7e678ad116 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 2007 Pekka Riikonen
+  Copyright (C) 2007 - 2008 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
@@ -42,7 +42,7 @@
 #ifndef SILCDLL_H
 #define SILCDLL_H
 
-/****s* silcutil/SilcDLLAPI/SilcDll
+/****s* silcutil/SilcDll
  *
  * NAME
  *
@@ -63,7 +63,7 @@ typedef HMODULE SilcDll;
 typedef void *SilcDll;
 #endif /* SILC_UNIX */
 
-/****f* silcutil/SilcDLLAPI/silc_dll_load
+/****f* silcutil/silc_dll_load
  *
  * SYNOPSIS
  *
@@ -80,7 +80,7 @@ typedef void *SilcDll;
  ***/
 SilcDll silc_dll_load(const char *object_path);
 
-/****f* silcutil/SilcDLLAPI/silc_dll_close
+/****f* silcutil/silc_dll_close
  *
  * SYNOPSIS
  *
@@ -95,7 +95,7 @@ SilcDll silc_dll_load(const char *object_path);
  ***/
 void silc_dll_close(SilcDll dll);
 
-/****f* silcutil/SilcDLLAPI/silc_dll_getsym
+/****f* silcutil/silc_dll_getsym
  *
  * SYNOPSIS
  *
@@ -110,7 +110,7 @@ void silc_dll_close(SilcDll dll);
  ***/
 void *silc_dll_getsym(SilcDll dll, const char *symbol);
 
-/****f* silcutil/SilcDLLAPI/silc_dll_error
+/****f* silcutil/silc_dll_error
  *
  * SYNOPSIS
  *
index 97dd663043cf019f7de0627bbc386cfd96ee965d..bd140f8c821decacd88031e46203ccb7ec98fc0e 100644 (file)
@@ -17,7 +17,7 @@
 
 */
 
-/****h* silcutil/Environment Manipulation Interface
+/****h* silcutil/Environment Interface
  *
  * DESCRIPTION
  *
@@ -30,7 +30,7 @@
 #ifndef SILCENV_H
 #define SILCENV_H
 
-/****f* silcutil/SilcEnvAPI/silc_setenv
+/****f* silcutil/silc_setenv
  *
  * SYNOPSIS
  *
@@ -46,7 +46,7 @@
  ***/
 SilcBool silc_setenv(const char *variable, const char *value);
 
-/****f* silcutil/SilcEnvAPI/silc_getenv
+/****f* silcutil/silc_getenv
  *
  * SYNOPSIS
  *
@@ -60,7 +60,7 @@ SilcBool silc_setenv(const char *variable, const char *value);
  ***/
 const char *silc_getenv(const char *variable);
 
-/****f* silcutil/SilcEnvAPI/silc_unsetenv
+/****f* silcutil/silc_unsetenv
  *
  * SYNOPSIS
  *
@@ -75,7 +75,7 @@ const char *silc_getenv(const char *variable);
  ***/
 SilcBool silc_unsetenv(const char *variable);
 
-/****f* silcutil/SilcEnvAPI/silc_clearenv
+/****f* silcutil/silc_clearenv
  *
  * SYNOPSIS
  *
index f4760d8a861b2a146aa69371bd6faa4b8a411987..f3c355c97110e3a5977c5b4267ee9e6ad106ade2 100644 (file)
@@ -17,7 +17,7 @@
 
 */
 
-/****h* silcutil/SILC Errno
+/****h* silcutil/Errno Interface
  *
  * DESCRIPTION
  *
@@ -53,7 +53,7 @@
 #ifndef SILCERRNO_H
 #define SILCERRNO_H
 
-/****d* silcutil/SilcErrnoAPI/SilcResult
+/****d* silcutil/SilcResult
  *
  * NAME
  *
@@ -140,7 +140,7 @@ typedef enum {
 } SilcResult;
 /***/
 
-/****d* silcutil/SilcErrnoAPI/silc_errno
+/****d* silcutil/silc_errno
  *
  * NAME
  *
@@ -154,7 +154,7 @@ typedef enum {
  ***/
 #define silc_errno silc_get_errno()
 
-/****f* silcutil/SilcErrnoAPI/silc_errno_string
+/****f* silcutil/silc_errno_string
  *
  * NAME
  *
@@ -168,7 +168,7 @@ typedef enum {
  ***/
 const char *silc_errno_string(SilcResult error);
 
-/****d* silcutil/SilcErrnoAPI/silc_errno_string
+/****d* silcutil/silc_errno_reason
  *
  * NAME
  *
index 285c796d07dcd6bfeaf06100e4349a11c0c845a8..c516505b6ed199f027529feb601bc452391bfba9 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 2005 - 2007 Pekka Riikonen
+  Copyright (C) 2005 - 2008 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
@@ -17,7 +17,7 @@
 
 */
 
-/****h* silcutil/SILC File Descriptor Stream Interface
+/****h* silcutil/Fd Stream Interface
  *
  * DESCRIPTION
  *
@@ -34,7 +34,7 @@
 #ifndef SILCFDSTREAM_H
 #define SILCFDSTREAM_H
 
-/****f* silcutil/SilcFDStreamAPI/silc_fd_stream_create
+/****f* silcutil/silc_fd_stream_create
  *
  * SYNOPSIS
  *
@@ -55,7 +55,7 @@
  ***/
 SilcStream silc_fd_stream_create(int fd, SilcStack stack);
 
-/****f* silcutil/SilcFDStreamAPI/silc_fd_stream_create2
+/****f* silcutil/silc_fd_stream_create2
  *
  * SYNOPSIS
  *
@@ -79,7 +79,7 @@ SilcStream silc_fd_stream_create(int fd, SilcStack stack);
  ***/
 SilcStream silc_fd_stream_create2(int read_fd, int write_fd, SilcStack stack);
 
-/****f* silcutil/SilcFDStreamAPI/silc_fd_stream_file
+/****f* silcutil/silc_fd_stream_file
  *
  * SYNOPSIS
  *
@@ -103,7 +103,7 @@ SilcStream silc_fd_stream_create2(int read_fd, int write_fd, SilcStack stack);
 SilcStream silc_fd_stream_file(const char *filename, SilcBool reading,
                               SilcBool writing, SilcStack stack);
 
-/****f* silcutil/SilcFDStreamAPI/silc_fd_stream_file2
+/****f* silcutil/silc_fd_stream_file2
  *
  * SYNOPSIS
  *
@@ -127,7 +127,7 @@ SilcStream silc_fd_stream_file(const char *filename, SilcBool reading,
 SilcStream silc_fd_stream_file2(const char *read_file, const char *write_file,
                                SilcStack stack);
 
-/****f* silcutil/SilcFDStreamAPI/silc_fd_stream_get_info
+/****f* silcutil/silc_fd_stream_get_info
  *
  * SYNOPSIS
  *
index 3b1a0d4bed8cf8e0fd006d21403d7e80b7fb4e9a..0ac6b9bdab1779932a48eb9ac98354eba7e760a8 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 2005, 2006, 2007 Pekka Riikonen
+  Copyright (C) 2005 - 2008 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
@@ -17,7 +17,7 @@
 
 */
 
-/****h* silcutil/SILC Finite State Machine
+/****h* silcutil/Finite State Machine
  *
  * DESCRIPTION
  *
@@ -44,7 +44,7 @@
 #ifndef SILCFSM_H
 #define SILCFSM_H
 
-/****s* silcutil/SilcFSMAPI/SilcFSM
+/****s* silcutil/SilcFSM
  *
  * NAME
  *
@@ -60,7 +60,7 @@
  ***/
 typedef struct SilcFSMObject *SilcFSM;
 
-/****s* silcutil/SilcFSMAPI/SilcFSMStruct
+/****s* silcutil/SilcFSMStruct
  *
  * NAME
  *
@@ -75,7 +75,7 @@ typedef struct SilcFSMObject *SilcFSM;
  ***/
 typedef struct SilcFSMObject SilcFSMStruct;
 
-/****s* silcutil/SilcFSMAPI/SilcFSMThread
+/****s* silcutil/SilcFSMThread
  *
  * NAME
  *
@@ -94,7 +94,7 @@ typedef struct SilcFSMObject SilcFSMStruct;
  ***/
 typedef struct SilcFSMObject *SilcFSMThread;
 
-/****s* silcutil/SilcFSMAPI/SilcFSMThreadStruct
+/****s* silcutil/SilcFSMThreadStruct
  *
  * NAME
  *
@@ -109,7 +109,7 @@ typedef struct SilcFSMObject *SilcFSMThread;
  ***/
 typedef struct SilcFSMObject SilcFSMThreadStruct;
 
-/****d* silcutil/SilcFSMAPI/SILC_FSM_CONTINUE
+/****d* silcutil/SILC_FSM_CONTINUE
  *
  * NAME
  *
@@ -139,7 +139,7 @@ typedef struct SilcFSMObject SilcFSMThreadStruct;
 #define SILC_FSM_CONTINUE SILC_FSM_ST_CONTINUE;
 #endif /* SILC_DEBUG */
 
-/****d* silcutil/SilcFSMAPI/SILC_FSM_YIELD
+/****d* silcutil/SILC_FSM_YIELD
  *
  * NAME
  *
@@ -155,7 +155,7 @@ typedef struct SilcFSMObject SilcFSMThreadStruct;
  ***/
 #define SILC_FSM_YIELD SILC_FSM_ST_YIELD;
 
-/****d* silcutil/SilcFSMAPI/SILC_FSM_WAIT
+/****d* silcutil/SILC_FSM_WAIT
  *
  * NAME
  *
@@ -170,7 +170,7 @@ typedef struct SilcFSMObject SilcFSMThreadStruct;
  ***/
 #define SILC_FSM_WAIT SILC_FSM_ST_WAIT
 
-/****d* silcutil/SilcFSMAPI/SILC_FSM_FINISH
+/****d* silcutil/SILC_FSM_FINISH
  *
  * NAME
  *
@@ -186,7 +186,7 @@ typedef struct SilcFSMObject SilcFSMThreadStruct;
  ***/
 #define SILC_FSM_FINISH SILC_FSM_ST_FINISH
 
-/****f* silcutil/SilcFSMAPI/SilcFSMDestructor
+/****f* silcutil/SilcFSMDestructor
  *
  * SYNOPSIS
  *
@@ -206,7 +206,7 @@ typedef struct SilcFSMObject SilcFSMThreadStruct;
 typedef void (*SilcFSMDestructor)(SilcFSM fsm, void *fsm_context,
                                   void *destructor_context);
 
-/****f* silcutil/SilcFSMAPI/SilcFSMThreadDestructor
+/****f* silcutil/SilcFSMThreadDestructor
  *
  * SYNOPSIS
  *
@@ -234,7 +234,7 @@ typedef void (*SilcFSMThreadDestructor)(SilcFSMThread thread,
                                        void *thread_context,
                                        void *destructor_context);
 
-/****d* silcutil/SilcFSMAPI/SILC_FSM_STATE
+/****d* silcutil/SILC_FSM_STATE
  *
  * NAME
  *
@@ -259,7 +259,7 @@ typedef int (*SilcFSMStateCallback)(struct SilcFSMObject *fsm,
                                    void *fsm_context,
                                    void *state_context);
 
-/****d* silcutil/SilcFSMAPI/SILC_FSM_CALL
+/****d* silcutil/SILC_FSM_CALL
  *
  * NAME
  *
@@ -298,7 +298,7 @@ do {                                                \
   return SILC_FSM_WAIT;                                \
 } while(0)
 
-/****d* silcutil/SilcFSMAPI/SILC_FSM_CALL_CONTINUE
+/****d* silcutil/SILC_FSM_CALL_CONTINUE
  *
  * NAME
  *
@@ -325,7 +325,7 @@ do {                                                \
     silc_fsm_continue(fsm);                    \
 } while(0)
 
-/****d* silcutil/SilcFSMAPI/SILC_FSM_CALL_CONTINUE_SYNC
+/****d* silcutil/SILC_FSM_CALL_CONTINUE_SYNC
  *
  * NAME
  *
@@ -354,7 +354,7 @@ do {                                                \
     silc_fsm_continue_sync(fsm);               \
 } while(0)
 
-/****d* silcutil/SilcFSMAPI/SILC_FSM_THREAD_WAIT
+/****d* silcutil/SILC_FSM_THREAD_WAIT
  *
  * NAME
  *
@@ -387,7 +387,7 @@ do {                                                \
   return SILC_FSM_WAIT;                                \
 } while(0)
 
-/****f* silcutil/SilcFSMAPI/silc_fsm_alloc
+/****f* silcutil/silc_fsm_alloc
  *
  * SYNOPSIS
  *
@@ -434,7 +434,7 @@ SilcFSM silc_fsm_alloc(void *fsm_context,
                        void *destructor_context,
                        SilcSchedule schedule);
 
-/****f* silcutil/SilcFSMAPI/silc_fsm_init
+/****f* silcutil/silc_fsm_init
  *
  * SYNOPSIS
  *
@@ -469,7 +469,7 @@ SilcBool silc_fsm_init(SilcFSM fsm,
                        void *destructor_context,
                        SilcSchedule schedule);
 
-/****f* silcutil/SilcFSMAPI/silc_fsm_thread_alloc
+/****f* silcutil/silc_fsm_thread_alloc
  *
  * SYNOPSIS
  *
@@ -532,7 +532,7 @@ SilcFSMThread silc_fsm_thread_alloc(SilcFSM fsm,
                                    void *destructor_context,
                                    SilcBool real_thread);
 
-/****f* silcutil/SilcFSMAPI/silc_fsm_thread_init
+/****f* silcutil/silc_fsm_thread_init
  *
  * SYNOPSIS
  *
@@ -571,7 +571,7 @@ void silc_fsm_thread_init(SilcFSMThread thread,
                          void *destructor_context,
                          SilcBool real_thread);
 
-/****f* silcutil/SilcFSMAPI/silc_fsm_free
+/****f* silcutil/silc_fsm_free
  *
  * SYNOPSIS
  *
@@ -591,7 +591,7 @@ void silc_fsm_thread_init(SilcFSMThread thread,
  ***/
 void silc_fsm_free(void *fsm);
 
-/****f* silcutil/SilcFSMAPI/silc_fsm_start
+/****f* silcutil/silc_fsm_start
  *
  * SYNOPSIS
  *
@@ -615,7 +615,7 @@ void silc_fsm_free(void *fsm);
  ***/
 void silc_fsm_start(void *fsm, SilcFSMStateCallback start_state);
 
-/****f* silcutil/SilcFSMAPI/silc_fsm_start_sync
+/****f* silcutil/silc_fsm_start_sync
  *
  * SYNOPSIS
  *
@@ -635,7 +635,7 @@ void silc_fsm_start(void *fsm, SilcFSMStateCallback start_state);
  ***/
 void silc_fsm_start_sync(void *fsm, SilcFSMStateCallback start_state);
 
-/****f* silcutil/SilcFSMAPI/silc_fsm_next
+/****f* silcutil/silc_fsm_next
  *
  * SYNOPSIS
  *
@@ -660,7 +660,7 @@ void silc_fsm_start_sync(void *fsm, SilcFSMStateCallback start_state);
  ***/
 void silc_fsm_next(void *fsm, SilcFSMStateCallback next_state);
 
-/****f* silcutil/SilcFSMAPI/silc_fsm_next_later
+/****f* silcutil/silc_fsm_next_later
  *
  * SYNOPSIS
  *
@@ -695,7 +695,7 @@ void silc_fsm_next(void *fsm, SilcFSMStateCallback next_state);
 void silc_fsm_next_later(void *fsm, SilcFSMStateCallback next_state,
                         SilcUInt32 seconds, SilcUInt32 useconds);
 
-/****f* silcutil/SilcFSMAPI/silc_fsm_continue
+/****f* silcutil/silc_fsm_continue
  *
  * SYNOPSIS
  *
@@ -713,7 +713,7 @@ void silc_fsm_next_later(void *fsm, SilcFSMStateCallback next_state,
  ***/
 void silc_fsm_continue(void *fsm);
 
-/****f* silcutil/SilcFSMAPI/silc_fsm_continue_sync
+/****f* silcutil/silc_fsm_continue_sync
  *
  * SYNOPSIS
  *
@@ -731,7 +731,7 @@ void silc_fsm_continue(void *fsm);
  ***/
 void silc_fsm_continue_sync(void *fsm);
 
-/****f* silcutil/SilcFSMAPI/silc_fsm_finish
+/****f* silcutil/silc_fsm_finish
  *
  * SYNOPSIS
  *
@@ -752,7 +752,7 @@ void silc_fsm_continue_sync(void *fsm);
  ***/
 void silc_fsm_finish(void *fsm);
 
-/****f* silcutil/SilcFSMAPI/silc_fsm_set_context
+/****f* silcutil/silc_fsm_set_context
  *
  * SYNOPSIS
  *
@@ -768,7 +768,7 @@ void silc_fsm_finish(void *fsm);
  ***/
 void silc_fsm_set_context(void *fsm, void *fsm_context);
 
-/****f* silcutil/SilcFSMAPI/silc_fsm_get_context
+/****f* silcutil/silc_fsm_get_context
  *
  * SYNOPSIS
  *
@@ -784,7 +784,7 @@ void silc_fsm_set_context(void *fsm, void *fsm_context);
  ***/
 void *silc_fsm_get_context(void *fsm);
 
-/****f* silcutil/SilcFSMAPI/silc_fsm_set_state_context
+/****f* silcutil/silc_fsm_set_state_context
  *
  * SYNOPSIS
  *
@@ -800,7 +800,7 @@ void *silc_fsm_get_context(void *fsm);
  ***/
 void silc_fsm_set_state_context(void *fsm, void *state_context);
 
-/****f* silcutil/SilcFSMAPI/silc_fsm_get_state_context
+/****f* silcutil/silc_fsm_get_state_context
  *
  * SYNOPSIS
  *
@@ -815,7 +815,7 @@ void silc_fsm_set_state_context(void *fsm, void *state_context);
  ***/
 void *silc_fsm_get_state_context(void *fsm);
 
-/****f* silcutil/SilcFSMAPI/silc_fsm_get_schedule
+/****f* silcutil/silc_fsm_get_schedule
  *
  * SYNOPSIS
  *
@@ -840,7 +840,7 @@ void *silc_fsm_get_state_context(void *fsm);
  ***/
 SilcSchedule silc_fsm_get_schedule(void *fsm);
 
-/****f* silcutil/SilcFSMAPI/silc_fsm_get_machine
+/****f* silcutil/silc_fsm_get_machine
  *
  * SYNOPSIS
  *
@@ -853,7 +853,7 @@ SilcSchedule silc_fsm_get_schedule(void *fsm);
  ***/
 SilcFSM silc_fsm_get_machine(SilcFSMThread thread);
 
-/****f* silcutil/SilcFSMAPI/silc_fsm_is_started
+/****f* silcutil/silc_fsm_is_started
  *
  * SYNOPSIS
  *
@@ -870,7 +870,7 @@ SilcBool silc_fsm_is_started(void *fsm);
 
 /* FSM Events */
 
-/****s* silcutil/SilcFSMAPI/SilcFSMEvent
+/****s* silcutil/SilcFSMEvent
  *
  * NAME
  *
@@ -885,7 +885,7 @@ SilcBool silc_fsm_is_started(void *fsm);
  ***/
 typedef struct SilcFSMEventObject *SilcFSMEvent;
 
-/****s* silcutil/SilcFSMAPI/SilcFSMEventStruct
+/****s* silcutil/SilcFSMEventStruct
  *
  * NAME
  *
@@ -900,7 +900,7 @@ typedef struct SilcFSMEventObject *SilcFSMEvent;
  ***/
 typedef struct SilcFSMEventObject SilcFSMEventStruct;
 
-/****f* silcutil/SilcFSMAPI/silc_fsm_event_alloc
+/****f* silcutil/silc_fsm_event_alloc
  *
  * SYNOPSIS
  *
@@ -924,7 +924,7 @@ typedef struct SilcFSMEventObject SilcFSMEventStruct;
  ***/
 SilcFSMEvent silc_fsm_event_alloc(SilcFSM fsm);
 
-/****f* silcutil/SilcFSMAPI/silc_fsm_event_init
+/****f* silcutil/silc_fsm_event_init
  *
  * SYNOPSIS
  *
@@ -940,7 +940,7 @@ SilcFSMEvent silc_fsm_event_alloc(SilcFSM fsm);
  ***/
 void silc_fsm_event_init(SilcFSMEvent event, SilcFSM fsm);
 
-/****f* silcutil/SilcFSMAPI/silc_fsm_event_free
+/****f* silcutil/silc_fsm_event_free
  *
  * SYNOPSIS
  *
@@ -953,7 +953,7 @@ void silc_fsm_event_init(SilcFSMEvent event, SilcFSM fsm);
  ***/
 void silc_fsm_event_free(SilcFSMEvent event);
 
-/****d* silcutil/SilcFSMAPI/SILC_FSM_EVENT_WAIT
+/****d* silcutil/SILC_FSM_EVENT_WAIT
  *
  * NAME
  *
@@ -993,7 +993,7 @@ do {                                                \
     return SILC_FSM_WAIT;                      \
 } while(0)
 
-/****d* silcutil/SilcFSMAPI/SILC_FSM_EVENT_TIMEDWAIT
+/****d* silcutil/SILC_FSM_EVENT_TIMEDWAIT
  *
  * NAME
  *
@@ -1038,7 +1038,7 @@ do {                                                                      \
     return SILC_FSM_WAIT;                                              \
 } while(0)
 
-/****f* silcutil/SilcFSMAPI/SILC_FSM_EVENT_SIGNAL
+/****f* silcutil/SILC_FSM_EVENT_SIGNAL
  *
  * SYNOPSIS
  *
index ac6b2168b1f78e994ca3605c32e1b3d54428859a..991c475995c41daa73a5e5c176d649650898a90c 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 2007 Pekka Riikonen
+  Copyright (C) 2007 - 2008 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
 
 */
 
+/****h* silcutil/GetOpt Interface
+ *
+ * DESCRIPTION
+ *
+ * SILC GetOpt Interface provides portable interface to handle command
+ * line options.
+ *
+ ***/
+
 #ifndef SILCGETOPT_H
 #define SILCGETOPT_H
 
-/****s* silcutil/SilcGetOptAPI/SilcGetOpt
+/****s* silcutil/SilcGetOpt
  *
  * NAME
  *
@@ -44,7 +53,7 @@ typedef struct SilcGetOptObject {
 } *SilcGetOpt, SilcGetOptStruct;
 /***/
 
-/****d* silcutil/SilcGetOptAPI/SILC_GETOPT_INIT
+/****d* silcutil/SILC_GETOPT_INIT
  *
  * NAME
  *
@@ -61,7 +70,7 @@ typedef struct SilcGetOptObject {
  ***/
 #define SILC_GETOPT_INIT { 1, 0, NULL, TRUE, 1 }
 
-/****f* silcutil/SilcGetOptAPI/silc_getopt
+/****f* silcutil/silc_getopt
  *
  * SYNOPSIS
  *
index 4895af5f3640cd8316c8aebafbc4bb883f39a416..4e8c33a6219df8094965a4f6a7dd40ac4801f665 100644 (file)
@@ -29,8 +29,7 @@
  * EXAMPLE
  *
  * // Initialize global buffer
- * unsigned char buffer[256];
- * silc_global_set_va("somebuf", sizeof(buffer), NULL, FALSE);
+ * silc_global_set_var("somebuf", 256, NULL, FALSE);
  *
  * // Retrieve the buffer
  * unsigned char *buf = silc_global_get_var("somebuf", FALSE);
@@ -69,7 +68,7 @@
  *    If `tls' is FALSE the variable is visible to all threads in the process.
  *    If it is TRUE the variable is visible only in the current thread.  The
  *    variable can be retrieved using the same name by calling the
- *    silc_thread_global_get_var.
+ *    silc_global_get_var.
  *
  *    Returns NULL and sets silc_errno if the variable could not be added, or
  *    a pointer to the added variable otherwise.
@@ -77,8 +76,7 @@
  * EXAMPLE
  *
  *    // Initialize global buffer
- *    unsigned char buffer[256];
- *    silc_global_set_va("somebuf", sizeof(buffer), NULL, FALSE);
+ *    silc_global_set_var("somebuf", 256, NULL, FALSE);
  *
  *    // Retrieve the buffer
  *    unsigned char *buf = silc_global_get_var("somebuf", FALSE);
@@ -92,7 +90,7 @@
  *    *intptr = 200;
  *
  *    // Set structure as global in the thread
- *    silc_global_set_va("somestruct", sizeof(*context), NULL, TRUE);
+ *    silc_global_set_var("somestruct", sizeof(*context), NULL, TRUE);
  *
  *    // Retrieve the context
  *    context = silc_global_get_var("somestruct", TRUE);
@@ -130,7 +128,8 @@ void *silc_global_get_var(const char *name, SilcBool tls);
  *    deleted, FALSE if such variable does not exist and sets silc_errno.
  *
  *    If variable is not deleted before the process or thread is destroyed
- *    it will be deleted and freed automatically.
+ *    it will be deleted and freed automatically when the process or thread
+ *    is destroyed.
  *
  ***/
 SilcBool silc_global_del_var(const char *name, SilcBool tls);
index 624d18a4331d5097688af5f7965984ece1ea555f..975644c44535b5c3d845e40ba1aa01f951df1186 100644 (file)
  *
  * DESCRIPTION
  *
- * Implementation of collision resistant hash table. This is a hash table
- * that provides a reliable (what you add there stays there, and duplicate
- * keys are allowed) with as fast reference to the key as possible. If
- * there are a lot of duplicate keys in the hash table the lookup slows down.
- * However, this is reliable and no data is lost at any point. If you know
- * that you never have duplicate keys then this is as fast as any simple hash
- * table.
+ * A collision resistant hash table API. This is a hash table that provides
+ * a reliable hash table (what you add there stays there, and duplicate keys
+ * are allowed) with as fast reference to the key as possible. If there are
+ * a lot of duplicate keys in the hash table the lookup slows down.  However,
+ * this is reliable and no data is lost at any point. If you know that you
+ * never have duplicate keys then this is as fast as any simple hash table.
  *
  * The interface provides many ways to search the hash table including
  * an extended interface where caller can specify their own hash and comparison
index 66efd22fa7dd8667df1280a8ccff30a06e0464bc..14fab3f54af3aa02c56e7c4dc0b68907dc41240f 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 2002 - 2007 Pekka Riikonen
+  Copyright (C) 2002 - 2008 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
@@ -17,7 +17,7 @@
 
 */
 
-/****h* silcutil/SILC List Interface
+/****h* silcutil/List Interface
  *
  * DESCRIPTION
  *
@@ -45,7 +45,7 @@
 #ifndef SILCLIST_H
 #define SILCLIST_H
 
-/****s* silcutil/SilcList/SilcList
+/****s* silcutil/SilcList
  *
  * NAME
  *
@@ -68,11 +68,11 @@ typedef struct SilcListStruct {
   unsigned int count       : 30;     /* Number of entries in the list */
 } SilcList;
 
-/****d* silcutil/SilcList/SILC_LIST_END
+/****d* silcutil/SILC_LIST_END
  *
  * NAME
  *
- *    #define SILC_LIST_END ...
+ *    #define SILC_LIST_END NULL
  *
  * DESCRIPTION
  *
@@ -84,7 +84,7 @@ typedef struct SilcListStruct {
 #define SILC_LIST_END NULL
 /***/
 
-/****f* silcutil/SilcList/silc_list_init
+/****f* silcutil/silc_list_init
  *
  * SYNOPSIS
  *
@@ -121,7 +121,7 @@ do {                                                        \
   (list).head = (list).tail = (list).current = NULL;   \
 } while(0)
 
-/****f* silcutil/SilcList/silc_list_init_prev
+/****f* silcutil/silc_list_init_prev
  *
  * SYNOPSIS
  *
@@ -161,7 +161,7 @@ do {                                                                \
   (list).head = (list).tail = (list).current = NULL;           \
 } while(0)
 
-/****f* silcutil/SilcList/silc_list_count
+/****f* silcutil/silc_list_count
  *
  * SYNOPSIS
  *
@@ -174,7 +174,7 @@ do {                                                                \
  ***/
 #define silc_list_count(list) (list).count
 
-/****f* silcutil/SilcList/silc_list_start
+/****f* silcutil/silc_list_start
  *
  * SYNOPSIS
  *
@@ -189,7 +189,7 @@ do {                                                                \
 #define silc_list_start(list)                          \
   ((list).current = (list).head, (list).end_set = 0)
 
-/****f* silcutil/SilcList/silc_list_end
+/****f* silcutil/silc_list_end
  *
  * SYNOPSIS
  *
@@ -215,7 +215,7 @@ do {                                                                \
 #define __silc_list_prev(list, pos)                            \
   ((void **)((unsigned char *)(pos) + (list).prev_offset))
 
-/****f* silcutil/SilcList/silc_list_add
+/****f* silcutil/silc_list_add
  *
  * SYNOPSIS
  *
@@ -240,7 +240,7 @@ do {                                                        \
   (list).count++;                                      \
 } while(0)
 
-/****f* silcutil/SilcList/silc_list_insert
+/****f* silcutil/silc_list_insert
  *
  * SYNOPSIS
  *
@@ -282,7 +282,7 @@ do {                                                                         \
   (list).count++;                                                       \
 } while(0)
 
-/****f* silcutil/SilcList/silc_list_del
+/****f* silcutil/silc_list_del
  *
  * SYNOPSIS
  *
@@ -313,7 +313,7 @@ do {                                                                        \
     (list).tail = prev;                                                        \
 } while(0)
 
-/****f* silcutil/SilcList/silc_list_get
+/****f* silcutil/silc_list_get
  *
  * SYNOPSIS
  *
index 56c58ec345691f9b74964a78ebcc7d541d644d5b..59bcac6ee000987e740b2d4263cf136da290dfed 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 1997 - 2007 Pekka Riikonen
+  Copyright (C) 1997 - 2008 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
@@ -17,7 +17,7 @@
 
 */
 
-/****h* silcutil/SILC Logging Interface
+/****h* silcutil/Logging Interface
  *
  * DESCRIPTION
  *
@@ -29,7 +29,7 @@
 #ifndef SILCLOG_H
 #define SILCLOG_H
 
-/****d* silcutil/SilcLogAPI/SilcLogType
+/****d* silcutil/SilcLogType
  *
  * NAME
  *
@@ -51,7 +51,7 @@ typedef enum {
 
 #include "silclog_i.h"
 
-/****f* silcutil/SilcLogAPI/SilcLogCb
+/****f* silcutil/SilcLogCb
  *
  * SYNOPSIS
  *
@@ -76,7 +76,7 @@ typedef enum {
  ***/
 typedef SilcBool (*SilcLogCb)(SilcLogType type, char *message, void *context);
 
-/****f* silcutil/SilcLogAPI/SilcLogDebugCb
+/****f* silcutil/SilcLogDebugCb
  *
  * SYNOPSIS
  *
@@ -102,7 +102,7 @@ typedef SilcBool (*SilcLogCb)(SilcLogType type, char *message, void *context);
 typedef SilcBool (*SilcLogDebugCb)(char *file, char *function, int line,
                                   char *message, void *context);
 
-/****f* silcutil/SilcLogAPI/SilcLogHexdumpCb
+/****f* silcutil/SilcLogHexdumpCb
  *
  * SYNOPSIS
  *
@@ -136,7 +136,7 @@ typedef SilcBool (*SilcLogHexdumpCb)(char *file, char *function, int line,
 
 /* Macros */
 
-/****d* silcutil/SilcLogAPI/SILC_LOG_INFO
+/****d* silcutil/SILC_LOG_INFO
  *
  * NAME
  *
@@ -162,7 +162,7 @@ typedef SilcBool (*SilcLogHexdumpCb)(char *file, char *function, int line,
 #define SILC_LOG_INFO(fmt) silc_log_output(SILC_LOG_INFO, silc_format fmt)
 /***/
 
-/****d* silcutil/SilcLogAPI/SILC_LOG_WARNING
+/****d* silcutil/SILC_LOG_WARNING
  *
  * NAME
  *
@@ -181,7 +181,7 @@ typedef SilcBool (*SilcLogHexdumpCb)(char *file, char *function, int line,
 #define SILC_LOG_WARNING(fmt) silc_log_output(SILC_LOG_WARNING, silc_format fmt)
 /***/
 
-/****d* silcutil/SilcLogAPI/SILC_LOG_ERROR
+/****d* silcutil/SILC_LOG_ERROR
  *
  * NAME
  *
@@ -200,7 +200,7 @@ typedef SilcBool (*SilcLogHexdumpCb)(char *file, char *function, int line,
 #define SILC_LOG_ERROR(fmt) silc_log_output(SILC_LOG_ERROR, silc_format fmt)
 /***/
 
-/****d* silcutil/SilcLogAPI/SILC_LOG_FATAL
+/****d* silcutil/SILC_LOG_FATAL
  *
  * NAME
  *
@@ -219,7 +219,7 @@ typedef SilcBool (*SilcLogHexdumpCb)(char *file, char *function, int line,
 #define SILC_LOG_FATAL(fmt) silc_log_output(SILC_LOG_FATAL, silc_format fmt)
 /***/
 
-/****d* silcutil/SilcLogAPI/SILC_LOG_DEBUG
+/****d* silcutil/SILC_LOG_DEBUG
  *
  * NAME
  *
@@ -250,7 +250,7 @@ typedef SilcBool (*SilcLogHexdumpCb)(char *file, char *function, int line,
 #endif /* SILC_DEBUG */
 /***/
 
-/****d* silcutil/SilcLogAPI/SILC_LOG_HEXDUMP
+/****d* silcutil/SILC_LOG_HEXDUMP
  *
  * NAME
  *
@@ -288,60 +288,9 @@ typedef SilcBool (*SilcLogHexdumpCb)(char *file, char *function, int line,
 #endif /* SILC_DEBUG */
 /***/
 
-/****d* silcutil/SilcLogAPI/SILC_ASSERT
- *
- * NAME
- *
- *    #define SILC_ASSERT(experssion)
- *
- * DESCRIPTION
- *
- *    Assert macro that prints error message to stderr and calls abort()
- *    if the `expression' is false (ie. compares equal to zero).  If
- *    SILC_DEBUG is not defined this macro has no effect.
- *
- * SOURCE
- */
-#if defined(SILC_DEBUG)
-#define SILC_ASSERT(expr) assert((expr));
-#else
-#define SILC_ASSERT(expr) do { } while(0)
-#endif /* SILC_DEBUG */
-/***/
-
-/****d* silcutil/SilcLogAPI/SILC_VERIFY
- *
- * NAME
- *
- *    #define SILC_VERIFY(experssion)
- *
- * DESCRIPTION
- *
- *    Verification macro that prints error message to stderr and calls
- *    abort() if the `expression' is false (ie. compares equal to zero)
- *    on debug builds (SILC_DEBUG defined), and prints error message to
- *    stderr on release builds (SILC_DEBUG undefined) but does not abort().
- *    This macro is always compiled even if debugging (SILC_DEBUG) is not
- *    defined.
- *
- * SOURCE
- */
-#if defined(SILC_DEBUG)
-#define SILC_VERIFY(expr) assert((expr));
-#else
-#define SILC_VERIFY(expr)                                              \
-  if (silc_unlikely(!(expr))) {                                                \
-    SILC_LOG_ERROR(("SILC_VERIFY %s:%s:%d",                            \
-                   __FILE__, __FUNCTION__, __LINE__));                 \
-    silc_set_errno_reason_nofail(SILC_ERR_ASSERT, "SILC_VERIFY %s:%s:%d", \
-                                __FILE__, __FUNCTION__, __LINE__);     \
-  }
-#endif /* SILC_DEBUG */
-/***/
-
 /* Prototypes */
 
-/****f* silcutil/SilcLogAPI/silc_log_set_file
+/****f* silcutil/silc_log_set_file
  *
  * SYNOPSIS
  *
@@ -366,7 +315,7 @@ typedef SilcBool (*SilcLogHexdumpCb)(char *file, char *function, int line,
 SilcBool silc_log_set_file(SilcLogType type, char *filename,
                           SilcUInt32 maxsize, SilcSchedule scheduler);
 
-/****f* silcutil/SilcLogAPI/silc_log_get_file
+/****f* silcutil/silc_log_get_file
  *
  * SYNOPSIS
  *
@@ -385,7 +334,7 @@ SilcBool silc_log_set_file(SilcLogType type, char *filename,
  ***/
 char *silc_log_get_file(SilcLogType type);
 
-/****f* silcutil/SilcLogAPI/silc_log_set_callback
+/****f* silcutil/silc_log_set_callback
  *
  * SYNOPSIS
  *
@@ -410,7 +359,7 @@ char *silc_log_get_file(SilcLogType type);
  ***/
 void silc_log_set_callback(SilcLogType type, SilcLogCb cb, void *context);
 
-/****f* silcutil/SilcLogAPI/silc_log_reset_callbacks
+/****f* silcutil/silc_log_reset_callbacks
  *
  * SYNOPSIS
  *
@@ -425,7 +374,7 @@ void silc_log_set_callback(SilcLogType type, SilcLogCb cb, void *context);
  ***/
 void silc_log_reset_callbacks(void);
 
-/****f* silcutil/SilcLogAPI/silc_log_flush_all
+/****f* silcutil/silc_log_flush_all
  *
  * SYNOPSIS
  *
@@ -442,7 +391,7 @@ void silc_log_reset_callbacks(void);
  ***/
 void silc_log_flush_all(void);
 
-/****f* silcutil/SilcLogAPI/silc_log_reset_all
+/****f* silcutil/silc_log_reset_all
  *
  * SYNOPSIS
  *
@@ -459,7 +408,7 @@ void silc_log_flush_all(void);
  ***/
 void silc_log_reset_all(void);
 
-/****f* silcutil/SilcLogAPI/silc_log_set_debug_callbacks
+/****f* silcutil/silc_log_set_debug_callbacks
  *
  * SYNOPSIS
  *
@@ -488,7 +437,7 @@ void silc_log_set_debug_callbacks(SilcLogDebugCb debug_cb,
                                  SilcLogHexdumpCb hexdump_cb,
                                  void *hexdump_context);
 
-/****f* silcutil/SilcLogAPI/silc_log_reset_debug_callbacks
+/****f* silcutil/silc_log_reset_debug_callbacks
  *
  * SYNOPSIS
  *
@@ -501,7 +450,7 @@ void silc_log_set_debug_callbacks(SilcLogDebugCb debug_cb,
  ***/
 void silc_log_reset_debug_callbacks(void);
 
-/****f* silcutil/SilcLogAPI/silc_log_set_debug_string
+/****f* silcutil/silc_log_set_debug_string
  *
  * SYNOPSIS
  *
@@ -516,7 +465,7 @@ void silc_log_reset_debug_callbacks(void);
  ***/
 void silc_log_set_debug_string(const char *debug_string);
 
-/****f* silcutil/SilcLogAPI/silc_log_timestamp
+/****f* silcutil/silc_log_timestamp
  *
  * NAME
  *
@@ -530,7 +479,7 @@ void silc_log_set_debug_string(const char *debug_string);
  ***/
 void silc_log_timestamp(SilcBool enable);
 
-/****f* silcutil/SilcLogAPI/silc_log_flushdelay
+/****f* silcutil/silc_log_flushdelay
  *
  * NAME
  *
@@ -543,7 +492,7 @@ void silc_log_timestamp(SilcBool enable);
  ***/
 void silc_log_flushdelay(SilcUInt32 flushdelay);
 
-/****f* silcutil/SilcLogAPI/silc_log_quick
+/****f* silcutil/silc_log_quick
  *
  * NAME
  *
@@ -567,7 +516,7 @@ void silc_log_flushdelay(SilcUInt32 flushdelay);
  ***/
 void silc_log_quick(SilcBool enable);
 
-/****v* silcutil/SilcLogAPI/silc_log_debug
+/****v* silcutil/silc_log_debug
  *
  * NAME
  *
@@ -585,7 +534,7 @@ void silc_log_quick(SilcBool enable);
  ***/
 void silc_log_debug(SilcBool enable);
 
-/****v* silcutil/SilcLogAPI/silc_log_debug_hexdump
+/****v* silcutil/silc_log_debug_hexdump
  *
  * NAME
  *
index 632af872021736455b4ecea20aa5148af3046978..2389a4bf5288efa2708153fd009e02bab0b9d95f 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 1999 - 2007 Pekka Riikonen
+  Copyright (C) 1999 - 2008 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
 
 */
 
-/****h* silcutil/SILC Memory Interface
+/****h* silcutil/Memory Interface
  *
  * DESCRIPTION
  *
- * Basic utility functions for allocating memory. All SILC routines, and
- * applications use these functions when they need to allocate, manipulate
- * and free memory.
+ * Routines for allocating and freeing memory.
  *
  ***/
 
@@ -34,7 +32,7 @@
 
 #ifndef SILC_STACKTRACE
 
-/****f* silcutil/SilcMemoryAPI/silc_malloc
+/****f* silcutil/silc_malloc
  *
  * SYNOPSIS
  *
@@ -49,7 +47,7 @@
  ***/
 void *silc_malloc(size_t size);
 
-/****f* silcutil/SilcMemoryAPI/silc_calloc
+/****f* silcutil/silc_calloc
  *
  * SYNOPSIS
  *
@@ -65,7 +63,7 @@ void *silc_malloc(size_t size);
  ***/
 void *silc_calloc(size_t items, size_t size);
 
-/****f* silcutil/SilcMemoryAPI/silc_realloc
+/****f* silcutil/silc_realloc
  *
  * SYNOPSIS
  *
@@ -87,7 +85,7 @@ void *silc_calloc(size_t items, size_t size);
  ***/
 void *silc_realloc(void *ptr, size_t size);
 
-/****f* silcutil/SilcMemoryAPI/silc_free
+/****f* silcutil/silc_free
  *
  * SYNOPSIS
  *
@@ -101,7 +99,7 @@ void *silc_realloc(void *ptr, size_t size);
  ***/
 void silc_free(void *ptr);
 
-/****f* silcutil/SilcMemoryAPI/silc_memdup
+/****f* silcutil/silc_memdup
  *
  * SYNOPSIS
  *
@@ -118,7 +116,7 @@ void silc_free(void *ptr);
  ***/
 void *silc_memdup(const void *ptr, size_t size);
 
-/****f* silcutil/SilcMemoryAPI/silc_strdup
+/****f* silcutil/silc_strdup
  *
  * SYNOPSIS
  *
@@ -143,7 +141,7 @@ char *silc_strdup(const char *str);
 
 /* Following functions that use SilcStack as memory source. */
 
-/****f* silcutil/SilcMemoryAPI/silc_smalloc
+/****f* silcutil/silc_smalloc
  *
  * SYNOPSIS
  *
@@ -167,7 +165,7 @@ char *silc_strdup(const char *str);
  ***/
 void *silc_smalloc(SilcStack stack, SilcUInt32 size);
 
-/****f* silcutil/SilcMemoryAPI/silc_scalloc
+/****f* silcutil/silc_scalloc
  *
  * SYNOPSIS
  *
@@ -190,7 +188,7 @@ void *silc_smalloc(SilcStack stack, SilcUInt32 size);
  ***/
 void *silc_scalloc(SilcStack stack, SilcUInt32 items, SilcUInt32 size);
 
-/****f* silcutil/SilcMemoryAPI/silc_srealloc
+/****f* silcutil/silc_srealloc
  *
  * SYNOPSIS
  *
@@ -217,7 +215,7 @@ void *silc_scalloc(SilcStack stack, SilcUInt32 items, SilcUInt32 size);
 void *silc_srealloc(SilcStack stack, SilcUInt32 old_size,
                    void *ptr, SilcUInt32 size);
 
-/****f* silcutil/SilcMemoryAPI/silc_smemdup
+/****f* silcutil/silc_smemdup
  *
  * SYNOPSIS
  *
@@ -243,7 +241,7 @@ void *silc_srealloc(SilcStack stack, SilcUInt32 old_size,
  ***/
 void *silc_smemdup(SilcStack stack, const void *ptr, SilcUInt32 size);
 
-/****f* silcutil/SilcMemoryAPI/silc_sfree
+/****f* silcutil/silc_sfree
  *
  * SYNOPSIS
  *
@@ -258,7 +256,7 @@ void *silc_smemdup(SilcStack stack, const void *ptr, SilcUInt32 size);
  ***/
 void silc_sfree(SilcStack stack, void *ptr);
 
-/****f* silcutil/SilcMemoryAPI/silc_sstrdup
+/****f* silcutil/silc_sstrdup
  *
  * SYNOPSIS
  *
index 293393bc8a1b85e1ef2cc062b1e5e0289718614a..9ea1ef4f34eecb3bd4f9e2e9a90de1d32aba1545 100644 (file)
@@ -29,14 +29,6 @@ typedef struct {
 
 /************************ Static utility functions **************************/
 
-/* MIME fields destructor */
-
-static void silc_mime_field_dest(void *key, void *context, void *user_context)
-{
-  silc_free(key);
-  silc_free(context);
-}
-
 /* Assembler fragment destructor */
 
 static void silc_mime_assembler_dest(void *key, void *context,
@@ -91,7 +83,7 @@ SilcMime silc_mime_alloc(void)
 
   mime->fields = silc_hash_table_alloc(NULL, 0, silc_hash_string_case, mime,
                                       silc_hash_string_case_compare, mime,
-                                      silc_mime_field_dest, mime, TRUE);
+                                      silc_hash_destructor, mime, TRUE);
   if (!mime->fields) {
     silc_mime_free(mime);
     return NULL;
index 3b22e6184623051c1ccb2db8bfc6472a996a3d98..e2831e6a4620098fdf5b22f0bfc06821cabb65c7 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 2005 - 2007 Pekka Riikonen
+  Copyright (C) 2005 - 2008 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
@@ -17,7 +17,7 @@
 
 */
 
-/****h* silcutil/SILC MIME Interface
+/****h* silcutil/MIME Interface
  *
  * DESCRIPTION
  *
@@ -33,7 +33,7 @@
 #ifndef SILCMIME_H
 #define SILCMIME_H
 
-/****s* silcutil/SILCMIMEAPI/SilcMime
+/****s* silcutil/SilcMime
  *
  * NAME
  *
@@ -48,7 +48,7 @@
  ***/
 typedef struct SilcMimeStruct *SilcMime;
 
-/****s* silcutil/SILCMIMEAPI/SilcMimeAssembler
+/****s* silcutil/SilcMimeAssembler
  *
  * NAME
  *
@@ -63,7 +63,7 @@ typedef struct SilcMimeStruct *SilcMime;
  ***/
 typedef struct SilcMimeAssemblerStruct *SilcMimeAssembler;
 
-/****f* silcutil/SILCMIMEAPI/silc_mime_alloc
+/****f* silcutil/silc_mime_alloc
  *
  * SYNOPSIS
  *
@@ -77,7 +77,7 @@ typedef struct SilcMimeAssemblerStruct *SilcMimeAssembler;
  ***/
 SilcMime silc_mime_alloc(void);
 
-/****f* silcutil/SILCMIMEAPI/silc_mime_free
+/****f* silcutil/silc_mime_free
  *
  * SYNOPSIS
  *
@@ -90,7 +90,7 @@ SilcMime silc_mime_alloc(void);
  ***/
 void silc_mime_free(SilcMime mime);
 
-/****f* silcutil/SILCMIMEAPI/silc_mime_assembler_alloc
+/****f* silcutil/silc_mime_assembler_alloc
  *
  * SYNOPSIS
  *
@@ -104,7 +104,7 @@ void silc_mime_free(SilcMime mime);
  ***/
 SilcMimeAssembler silc_mime_assembler_alloc(void);
 
-/****f* silcutil/SILCMIMEAPI/silc_mime_assembler_free
+/****f* silcutil/silc_mime_assembler_free
  *
  * SYNOPSIS
  *
@@ -117,7 +117,7 @@ SilcMimeAssembler silc_mime_assembler_alloc(void);
  ***/
 void silc_mime_assembler_free(SilcMimeAssembler assembler);
 
-/****f* silcutil/SILCMIMEAPI/silc_mime_assembler_purge
+/****f* silcutil/silc_mime_assembler_purge
  *
  * SYNOPSIS
  *
@@ -140,7 +140,7 @@ void silc_mime_assembler_free(SilcMimeAssembler assembler);
 void silc_mime_assembler_purge(SilcMimeAssembler assembler,
                               SilcUInt32 purge_minutes);
 
-/****f* silcutil/SILCMIMEAPI/silc_mime_decode
+/****f* silcutil/silc_mime_decode
  *
  * SYNOPSIS
  *
@@ -171,7 +171,7 @@ void silc_mime_assembler_purge(SilcMimeAssembler assembler,
 SilcMime silc_mime_decode(SilcMime mime, const unsigned char *data,
                          SilcUInt32 data_len);
 
-/****f* silcutil/SILCMIMEAPI/silc_mime_encode
+/****f* silcutil/silc_mime_encode
  *
  * SYNOPSIS
  *
@@ -190,7 +190,7 @@ SilcMime silc_mime_decode(SilcMime mime, const unsigned char *data,
  ***/
 unsigned char *silc_mime_encode(SilcMime mime, SilcUInt32 *encoded_len);
 
-/****f* silcutil/SILCMIMEAPI/silc_mime_assemble
+/****f* silcutil/silc_mime_assemble
  *
  * SYNOPSIS
  *
@@ -220,7 +220,7 @@ unsigned char *silc_mime_encode(SilcMime mime, SilcUInt32 *encoded_len);
  ***/
 SilcMime silc_mime_assemble(SilcMimeAssembler assembler, SilcMime partial);
 
-/****f* silcutil/SILCMIMEAPI/silc_mime_encode_partial
+/****f* silcutil/silc_mime_encode_partial
  *
  * SYNOPSIS
  *
@@ -240,7 +240,7 @@ SilcMime silc_mime_assemble(SilcMimeAssembler assembler, SilcMime partial);
  ***/
 SilcDList silc_mime_encode_partial(SilcMime mime, int max_size);
 
-/****f* silcutil/SILCMIMEAPI/silc_mime_partial_free
+/****f* silcutil/silc_mime_partial_free
  *
  * SYNOPSIS
  *
@@ -254,7 +254,7 @@ SilcDList silc_mime_encode_partial(SilcMime mime, int max_size);
  ***/
 void silc_mime_partial_free(SilcDList partials);
 
-/****f* silcutil/SILCMIMEAPI/silc_mime_add_field
+/****f* silcutil/silc_mime_add_field
  *
  * SYNOPSIS
  *
@@ -275,7 +275,7 @@ void silc_mime_partial_free(SilcDList partials);
  ***/
 void silc_mime_add_field(SilcMime mime, const char *field, const char *value);
 
-/****f* silcutil/SILCMIMEAPI/silc_mime_get_field
+/****f* silcutil/silc_mime_get_field
  *
  * SYNOPSIS
  *
@@ -289,7 +289,7 @@ void silc_mime_add_field(SilcMime mime, const char *field, const char *value);
  ***/
 const char *silc_mime_get_field(SilcMime mime, const char *field);
 
-/****f* silcutil/SILCMIMEAPI/silc_mime_add_data
+/****f* silcutil/silc_mime_add_data
  *
  * SYNOPSIS
  *
@@ -304,7 +304,7 @@ const char *silc_mime_get_field(SilcMime mime, const char *field);
 void silc_mime_add_data(SilcMime mime, const unsigned char *data,
                        SilcUInt32 data_len);
 
-/****f* silcutil/SILCMIMEAPI/silc_mime_get_data
+/****f* silcutil/silc_mime_get_data
  *
  * SYNOPSIS
  *
@@ -318,7 +318,7 @@ void silc_mime_add_data(SilcMime mime, const unsigned char *data,
  ***/
 const unsigned char *silc_mime_get_data(SilcMime mime, SilcUInt32 *data_len);
 
-/****f* silcutil/SILCMIMEAPI/silc_mime_steal_data
+/****f* silcutil/silc_mime_steal_data
  *
  * SYNOPSIS
  *
@@ -334,7 +334,7 @@ const unsigned char *silc_mime_get_data(SilcMime mime, SilcUInt32 *data_len);
  ***/
 unsigned char *silc_mime_steal_data(SilcMime mime, SilcUInt32 *data_len);
 
-/****f* silcutil/SILCMIMEAPI/silc_mime_is_partial
+/****f* silcutil/silc_mime_is_partial
  *
  * SYNOPSIS
  *
@@ -347,7 +347,7 @@ unsigned char *silc_mime_steal_data(SilcMime mime, SilcUInt32 *data_len);
  ***/
 SilcBool silc_mime_is_partial(SilcMime mime);
 
-/****f* silcutil/SILCMIMEAPI/silc_mime_set_multipart
+/****f* silcutil/silc_mime_set_multipart
  *
  * SYNOPSIS
  *
@@ -364,7 +364,7 @@ SilcBool silc_mime_is_partial(SilcMime mime);
 void silc_mime_set_multipart(SilcMime mime, const char *type,
                             const char *boundary);
 
-/****f* silcutil/SILCMIMEAPI/silc_mime_add_multipart
+/****f* silcutil/silc_mime_add_multipart
  *
  * SYNOPSIS
  *
@@ -394,7 +394,7 @@ void silc_mime_set_multipart(SilcMime mime, const char *type,
  ***/
 SilcBool silc_mime_add_multipart(SilcMime mime, SilcMime part);
 
-/****f* silcutil/SILCMIMEAPI/silc_mime_is_multipart
+/****f* silcutil/silc_mime_is_multipart
  *
  * SYNOPSIS
  *
@@ -408,7 +408,7 @@ SilcBool silc_mime_add_multipart(SilcMime mime, SilcMime part);
  ***/
 SilcBool silc_mime_is_multipart(SilcMime mime);
 
-/****f* silcutil/SILCMIMEAPI/silc_mime_get_multiparts
+/****f* silcutil/silc_mime_get_multiparts
  *
  * SYNOPSIS
  *
index 6e8efeb2b7dfd807ed63d9696f005351bb23d3bf..878d37deb8fdf4f9365aa7f67f9ce25140028cdf 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 2001 - 2007 Pekka Riikonen
+  Copyright (C) 2001 - 2008 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
@@ -17,7 +17,7 @@
 
 */
 
-/****h* silcutil/SILC Mutex Interface
+/****h* silcutil/Mutex Interface
  *
  * DESCRIPTION
  *
@@ -30,7 +30,7 @@
 #ifndef SILCMUTEX_H
 #define SILCMUTEX_H
 
-/****s* silcutil/SilcMutexAPI/SilcMutex
+/****s* silcutil/SilcMutex
  *
  * NAME
  *
@@ -45,7 +45,7 @@
  ***/
 typedef struct SilcMutexStruct *SilcMutex;
 
-/****s* silcutil/SilcMutexAPI/SilcRwLock
+/****s* silcutil/SilcRwLock
  *
  * NAME
  *
@@ -60,7 +60,7 @@ typedef struct SilcMutexStruct *SilcMutex;
  ***/
 typedef struct SilcRwLockStruct *SilcRwLock;
 
-/****f* silcutil/SilcMutexAPI/silc_mutex_alloc
+/****f* silcutil/silc_mutex_alloc
  *
  * SYNOPSIS
  *
@@ -77,7 +77,7 @@ typedef struct SilcRwLockStruct *SilcRwLock;
  ***/
 SilcBool silc_mutex_alloc(SilcMutex *mutex);
 
-/****f* silcutil/SilcMutexAPI/silc_mutex_free
+/****f* silcutil/silc_mutex_free
  *
  * SYNOPSIS
  *
@@ -91,7 +91,7 @@ SilcBool silc_mutex_alloc(SilcMutex *mutex);
  ***/
 void silc_mutex_free(SilcMutex mutex);
 
-/****f* silcutil/SilcMutexAPI/silc_mutex_lock
+/****f* silcutil/silc_mutex_lock
  *
  * SYNOPSIS
  *
@@ -113,7 +113,7 @@ void silc_mutex_free(SilcMutex mutex);
  ***/
 void silc_mutex_lock(SilcMutex mutex);
 
-/****f* silcutil/SilcMutexAPI/silc_mutex_unlock
+/****f* silcutil/silc_mutex_unlock
  *
  * SYNOPSIS
  *
@@ -133,7 +133,7 @@ void silc_mutex_lock(SilcMutex mutex);
  ***/
 void silc_mutex_unlock(SilcMutex mutex);
 
-/****f* silcutil/SilcMutexAPI/silc_mutex_assert_locked
+/****f* silcutil/silc_mutex_assert_locked
  *
  * SYNOPSIS
  *
@@ -148,7 +148,7 @@ void silc_mutex_unlock(SilcMutex mutex);
  ***/
 void silc_mutex_assert_locked(SilcMutex mutex);
 
-/****f* silcutil/SilcMutexAPI/silc_rwlock_alloc
+/****f* silcutil/silc_rwlock_alloc
  *
  * SYNOPSIS
  *
@@ -164,7 +164,7 @@ void silc_mutex_assert_locked(SilcMutex mutex);
  ***/
 SilcBool silc_rwlock_alloc(SilcRwLock *rwlock);
 
-/****f* silcutil/SilcRwLockAPI/silc_rwlock_free
+/****f* silcutil/silc_rwlock_free
  *
  * SYNOPSIS
  *
@@ -178,7 +178,7 @@ SilcBool silc_rwlock_alloc(SilcRwLock *rwlock);
  ***/
 void silc_rwlock_free(SilcRwLock rwlock);
 
-/****f* silcutil/SilcRwLockAPI/silc_rwlock_rdlock
+/****f* silcutil/silc_rwlock_rdlock
  *
  * SYNOPSIS
  *
@@ -196,7 +196,7 @@ void silc_rwlock_free(SilcRwLock rwlock);
  ***/
 void silc_rwlock_rdlock(SilcRwLock rwlock);
 
-/****f* silcutil/SilcRwLockAPI/silc_rwlock_wrlock
+/****f* silcutil/silc_rwlock_wrlock
  *
  * SYNOPSIS
  *
@@ -214,7 +214,7 @@ void silc_rwlock_rdlock(SilcRwLock rwlock);
  ***/
 void silc_rwlock_wrlock(SilcRwLock rwlock);
 
-/****f* silcutil/SilcRwLockAPI/silc_rwlock_unlock
+/****f* silcutil/silc_rwlock_unlock
  *
  * SYNOPSIS
  *
index b8db06f8fc4e382905045600648f0e5d2c88a964..7172338d53d41d1ddf2b0bdc0a2484601d8bcded 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 1997 - 2007 Pekka Riikonen
+  Copyright (C) 1997 - 2008 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
 
 */
 
-/****h* silcutil/SILC Net Interface
+/****h* silcutil/Network Interface
  *
  * DESCRIPTION
  *
- * SILC Net API provides various network routines for applications. It
- * can be used to create TCP/IP and UDP/IP connections and listeners.
- * Various utility functions for resolving various information is also
- * provided.
+ * SILC Net API provides various network routines for applications. It can
+ * be used to create TCP/IP and UDP/IP connections and listeners.  Various
+ * utility functions for resolving various information is also provided.
+ * The interface supports both IPv4 and IPv6.
+ *
+ * EXAMPLE
+ *
+ * // Create TCP connection to example.com at port 25
+ * silc_net_tcp_connect(NULL, "example.com", 25, schedule, connected_cb, ctx);
+ *
+ * // Create UDP listener on local interface 10.2.1.7 on port 500
+ * SilcStream udpstream;
+ *
+ * udpstream = silc_net_udp_connect("10.2.1.7", 500, NULL, 0, schedule);
+ * silc_stream_set_notifier(udpstream, schedule, receive_callback, ctx);
  *
  ***/
 
@@ -33,7 +44,7 @@
 
 /* Prototypes */
 
-/****s* silcutil/SilcNetAPI/SilcNetListener
+/****s* silcutil/SilcNetListener
  *
  * NAME
  *
@@ -48,7 +59,7 @@
  ***/
 typedef struct SilcNetListenerStruct *SilcNetListener;
 
-/****f* silcutil/SilcNetAPI/SilcNetCallback
+/****f* silcutil/SilcNetCallback
  *
  * SYNOPSIS
  *
@@ -73,7 +84,7 @@ typedef struct SilcNetListenerStruct *SilcNetListener;
 typedef void (*SilcNetCallback)(SilcResult status,
                                SilcStream stream, void *context);
 
-/****f* silcutil/SilcNetAPI/silc_net_tcp_create_listener
+/****f* silcutil/silc_net_tcp_create_listener
  *
  * SYNOPSIS
  *
@@ -109,7 +120,7 @@ silc_net_tcp_create_listener(const char **local_ip_addr,
                             SilcSchedule schedule,
                             SilcNetCallback callback, void *context);
 
-/****f* silcutil/SilcNetAPI/silc_net_tcp_create_listener2
+/****f* silcutil/silc_net_tcp_create_listener2
  *
  * SYNOPSIS
  *
@@ -149,11 +160,12 @@ silc_net_tcp_create_listener2(const char *local_ip_addr, int *ports,
                              SilcSchedule schedule,
                              SilcNetCallback callback, void *context);
 
-/****f* silcutil/SilcNetAPI/silc_net_listener_get_port
+/****f* silcutil/silc_net_listener_get_port
  *
  * SYNOPSIS
  *
- *    SilcUInt16 silc_net_listener_get_port(SilcNetListener listener);
+ *    SilcUInt16 *silc_net_listener_get_port(SilcNetListener listener,
+ *                                           SilcUInt32 *port_count);
  *
  * DESCRIPTION
  *
@@ -162,13 +174,13 @@ silc_net_tcp_create_listener2(const char *local_ip_addr, int *ports,
  *    Returns an array of ports of size of `port_count'.  The caller must
  *    free the array with silc_free.  There are as many ports in the array
  *    as there were IP addresses provided in silc_net_tcp_create_listener,
- *    as there were ports provided in silc_net_tcp_create_listener2.
+ *    or as there were ports provided in silc_net_tcp_create_listener2.
  *
  ***/
 SilcUInt16 *silc_net_listener_get_port(SilcNetListener listener,
                                       SilcUInt32 *port_count);
 
-/****f* silcutil/SilcNetAPI/silc_net_listener_get_ip
+/****f* silcutil/silc_net_listener_get_ip
  *
  * SYNOPSIS
  *
@@ -178,14 +190,14 @@ SilcUInt16 *silc_net_listener_get_port(SilcNetListener listener,
  * DESCRIPTION
  *
  *    Returns the IP's to where the `listener' is bound.  Returns an array
- *    of IP addresses of size of `port_count'.  The caller must free the
+ *    of IP addresses of size of `ip_count'.  The caller must free the
  *    array and its strings with silc_free.
  *
  ***/
 char **silc_net_listener_get_ip(SilcNetListener listener,
                                SilcUInt32 *ip_count);
 
-/****f* silcutil/SilcNetAPI/silc_net_listener_get_hostname
+/****f* silcutil/silc_net_listener_get_hostname
  *
  * SYNOPSIS
  *
@@ -195,14 +207,14 @@ char **silc_net_listener_get_ip(SilcNetListener listener,
  * DESCRIPTION
  *
  *    Returns the hostnames to where the `listener' is bound.  Returns an
- *    array of hostnames of size of `port_count'.  The caller must free the
- *    array and its strings with silc_free.
+ *    array of hostnames of size of `hostname_count'.  The caller must free
+ *    the array and its strings with silc_free.
  *
  ***/
 char **silc_net_listener_get_hostname(SilcNetListener listener,
                                      SilcUInt32 *hostname_count);
 
-/****f* silcutil/SilcNetAPI/silc_net_close_listener
+/****f* silcutil/silc_net_close_listener
  *
  * SYNOPSIS
  *
@@ -215,7 +227,7 @@ char **silc_net_listener_get_hostname(SilcNetListener listener,
  ***/
 void silc_net_close_listener(SilcNetListener listener);
 
-/****f* silcutil/SilcNetAPI/silc_net_tcp_connect
+/****f* silcutil/silc_net_tcp_connect
  *
  * SYNOPSIS
  *
@@ -251,7 +263,7 @@ SilcAsyncOperation silc_net_tcp_connect(const char *local_ip_addr,
                                        SilcNetCallback callback,
                                        void *context);
 
-/****f* silcutil/SilcNetAPI/silc_net_udp_connect
+/****f* silcutil/silc_net_udp_connect
  *
  * SYNOPSIS
  *
@@ -276,8 +288,8 @@ SilcAsyncOperation silc_net_tcp_connect(const char *local_ip_addr,
  *
  *    To receive packets the silc_stream_set_notifier must be called for the
  *    returned SilcStream.  The packets are always received in the notifier
- *    callback when the SILC_STREAM_CAN_READ is returned to the callback
- *    To read the packet use silc_stream_read if the remote address was
+ *    callback when the SILC_STREAM_CAN_READ is returned to the callback.
+ *    To read the packet use silc_stream_read if the `remote_ip_addr' was
  *    provided, and silc_net_udp_receive if it was not.
  *
  *    Supports IPv6 if the platform supports it.  If `schedule' is NULL this
@@ -305,7 +317,7 @@ SilcStream silc_net_udp_connect(const char *local_ip_addr, int local_port,
                                const char *remote_ip_addr, int remote_port,
                                SilcSchedule schedule);
 
-/****f* silcutil/SilcNetAPI/silc_net_udp_receive
+/****f* silcutil/silc_net_udp_receive
  *
  * SYNOPSIS
  *
@@ -321,13 +333,16 @@ SilcStream silc_net_udp_connect(const char *local_ip_addr, int local_port,
  *    pointer.  The packet data is returned into the `ret_data' buffer.
  *
  *    Returns the length of the packet, or -1 on error or 0 in case of EOF.
+ *    In case of error the silc_errno will indicate the error.  If the
+ *    error is SILC_ERR_WOULD_BLOCK data is not currently available from the
+ *    `stream'.
  *
  ***/
 int silc_net_udp_receive(SilcStream stream, char *remote_ip_addr,
                         SilcUInt32 remote_ip_addr_size, int *remote_port,
                         unsigned char *ret_data, SilcUInt32 data_size);
 
-/****f* silcutil/SilcNetAPI/silc_net_udp_send
+/****f* silcutil/silc_net_udp_send
  *
  * SYNOPSIS
  *
@@ -339,9 +354,11 @@ int silc_net_udp_receive(SilcStream stream, char *remote_ip_addr,
  *
  *    Sends an UDP packet to remote host `remote_ip_addr' on `remote_port'.
  *    This may be used with UDP streams that are not connected to any
- *    specific remote host.  With those stream silc_stream_write cannot be
- *    used.  In those cases, this function must be used.  This may also be
- *    used even if the stream is connected.
+ *    specific remote host.  With those streams silc_stream_write cannot be
+ *    used.  In those cases, this function must be used.  However, this may
+ *    also be used even if the stream is in connected state.
+ *
+ *    You can create the `stream' by calling silc_net_udp_connect.
  *
  *    Returns the amount of data written, -1 if data could not be written
  *    at this moment, or -2 if error occurred.  If -1 is returned the
@@ -353,7 +370,7 @@ int silc_net_udp_send(SilcStream stream,
                      const char *remote_ip_addr, int remote_port,
                      const unsigned char *data, SilcUInt32 data_len);
 
-/****f* silcutil/SilcNetAPI/silc_net_close_connection
+/****f* silcutil/silc_net_close_connection
  *
  * SYNOPSIS
  *
@@ -367,7 +384,7 @@ int silc_net_udp_send(SilcStream stream,
  ***/
 void silc_net_close_connection(int sock);
 
-/****f* silcutil/SilcNetAPI/silc_net_accept_connection
+/****f* silcutil/silc_net_accept_connection
  *
  * SYNOPSIS
  *
@@ -382,7 +399,7 @@ void silc_net_close_connection(int sock);
  ***/
 int silc_net_accept_connection(int sock);
 
-/****f* silcutil/SilcNetAPI/silc_net_set_socket_opt
+/****f* silcutil/silc_net_set_socket_opt
  *
  * SYNOPSIS
  *
@@ -398,7 +415,7 @@ int silc_net_accept_connection(int sock);
  ***/
 int silc_net_set_socket_opt(int sock, int level, int option, int on);
 
-/****f* silcutil/SilcNetAPI/silc_net_get_socket_opt
+/****f* silcutil/silc_net_get_socket_opt
  *
  * SYNOPSIS
  *
@@ -415,7 +432,7 @@ int silc_net_set_socket_opt(int sock, int level, int option, int on);
 int silc_net_get_socket_opt(int sock, int level, int option,
                            void *optval, int *opt_len);
 
-/****f* silcutil/SilcNetAPI/silc_net_set_socket_nonblock
+/****f* silcutil/silc_net_set_socket_nonblock
  *
  * SYNOPSIS
  *
@@ -428,7 +445,7 @@ int silc_net_get_socket_opt(int sock, int level, int option,
  ***/
 int silc_net_set_socket_nonblock(SilcSocket sock);
 
-/****f* silcutil/SilcNetAPI/silc_net_is_ip4
+/****f* silcutil/silc_net_is_ip4
  *
  * SYNOPSIS
  *
@@ -441,7 +458,7 @@ int silc_net_set_socket_nonblock(SilcSocket sock);
  ***/
 SilcBool silc_net_is_ip4(const char *addr);
 
-/****f* silcutil/SilcNetAPI/silc_net_is_ip6
+/****f* silcutil/silc_net_is_ip6
  *
  * SYNOPSIS
  *
@@ -454,7 +471,7 @@ SilcBool silc_net_is_ip4(const char *addr);
  ***/
 SilcBool silc_net_is_ip6(const char *addr);
 
-/****f* silcutil/SilcNetAPI/silc_net_is_ip
+/****f* silcutil/silc_net_is_ip
  *
  * SYNOPSIS
  *
@@ -468,7 +485,7 @@ SilcBool silc_net_is_ip6(const char *addr);
  ***/
 SilcBool silc_net_is_ip(const char *addr);
 
-/****f* silcutil/SilcNetAPI/silc_net_addr2bin
+/****f* silcutil/silc_net_addr2bin
  *
  * SYNOPSIS
  *
@@ -484,7 +501,7 @@ SilcBool silc_net_is_ip(const char *addr);
  ***/
 SilcBool silc_net_addr2bin(const char *addr, void *bin, SilcUInt32 bin_len);
 
-/****f* silcutil/SilcNetAPI/SilcNetResolveCallback
+/****f* silcutil/SilcNetResolveCallback
  *
  * SYNOPSIS
  *
@@ -500,7 +517,7 @@ SilcBool silc_net_addr2bin(const char *addr, void *bin, SilcUInt32 bin_len);
  ***/
 typedef void (*SilcNetResolveCallback)(const char *result, void *context);
 
-/****f* silcutil/SilcNetAPI/silc_net_gethostbyname
+/****f* silcutil/silc_net_gethostbyname
  *
  * SYNOPSIS
  *
@@ -521,7 +538,7 @@ typedef void (*SilcNetResolveCallback)(const char *result, void *context);
 SilcBool silc_net_gethostbyname(const char *name, SilcBool prefer_ipv6,
                                char *address, SilcUInt32 address_len);
 
-/****f* silcutil/SilcNetAPI/silc_net_gethostbyname_async
+/****f* silcutil/silc_net_gethostbyname_async
  *
  * SYNOPSIS
  *
@@ -550,7 +567,7 @@ void silc_net_gethostbyname_async(const char *name,
                                  SilcNetResolveCallback completion,
                                  void *context);
 
-/****f* silcutil/SilcNetAPI/silc_net_gethostbyaddr
+/****f* silcutil/silc_net_gethostbyaddr
  *
  * SYNOPSIS
  *
@@ -568,7 +585,7 @@ x * DESCRIPTION
 SilcBool silc_net_gethostbyaddr(const char *addr, char *name,
                                SilcUInt32 name_len);
 
-/****f* silcutil/SilcNetAPI/silc_net_gethostbyaddr_async
+/****f* silcutil/silc_net_gethostbyaddr_async
  *
  * SYNOPSIS
  *
@@ -591,7 +608,7 @@ void silc_net_gethostbyaddr_async(const char *addr,
                                  SilcNetResolveCallback completion,
                                  void *context);
 
-/****f* silcutil/SilcNetAPI/silc_net_check_host_by_sock
+/****f* silcutil/silc_net_check_host_by_sock
  *
  * SYNOPSIS
  *
@@ -607,7 +624,7 @@ void silc_net_gethostbyaddr_async(const char *addr,
 SilcBool silc_net_check_host_by_sock(SilcSocket sock, char **hostname,
                                     char **ip);
 
-/****f* silcutil/SilcNetAPI/silc_net_check_local_by_sock
+/****f* silcutil/silc_net_check_local_by_sock
  *
  * SYNOPSIS
  *
@@ -623,7 +640,7 @@ SilcBool silc_net_check_host_by_sock(SilcSocket sock, char **hostname,
 SilcBool silc_net_check_local_by_sock(SilcSocket sock, char **hostname,
                                      char **ip);
 
-/****f* silcutil/SilcNetAPI/silc_net_get_remote_port
+/****f* silcutil/silc_net_get_remote_port
  *
  * SYNOPSIS
  *
@@ -636,7 +653,7 @@ SilcBool silc_net_check_local_by_sock(SilcSocket sock, char **hostname,
  ***/
 SilcUInt16 silc_net_get_remote_port(SilcSocket sock);
 
-/****f* silcutil/SilcNetAPI/silc_net_get_local_port
+/****f* silcutil/silc_net_get_local_port
  *
  * SYNOPSIS
  *
@@ -649,7 +666,7 @@ SilcUInt16 silc_net_get_remote_port(SilcSocket sock);
  ***/
 SilcUInt16 silc_net_get_local_port(SilcSocket sock);
 
-/****f* silcutil/SilcNetAPI/silc_net_localhost
+/****f* silcutil/silc_net_localhost
  *
  * SYNOPSIS
  *
@@ -665,7 +682,7 @@ SilcUInt16 silc_net_get_local_port(SilcSocket sock);
  ***/
 char *silc_net_localhost(void);
 
-/****f* silcutil/SilcNetAPI/silc_net_localip
+/****f* silcutil/silc_net_localip
  *
  * SYNOPSIS
  *
index 8b5a66544f26fd3893bb2c3717110eabae1c6d94..451ea3c3ac3d3a5cbe2a2ffaa4793c1f7eb9802c 100644 (file)
@@ -17,7 +17,7 @@
 
 */
 
-/****h* silcutil/SILC Regular Expression Interface
+/****h* silcutil/Regex Interface
  *
  * DESCRIPTION
  *
  * // Free the compiled regular expression
  * silc_regex_free(&reg);
  *
+ * // Simple match
+ * if (!silc_regex("foobar", "foo.", NULL))
+ *   no_match;
+ *
+ * // Replace all foos with bar on all lines in the buffer
+ * silc_subst(buffer, "s/foo/bar/g");
+ *
  ***/
 
 #ifndef SILCREGEX_H
 #define SILCREGEX_H
 
-/****s* silcutil/SilcRegexAPI/SilcRegex
+/****s* silcutil/SilcRegex
  *
  * NAME
  *
@@ -122,7 +129,7 @@ typedef struct SilcRegexObject {
   char anchor;                /* anchor: 0=none 1=begline 2=begbuf */
 } *SilcRegex, SilcRegexStruct;
 
-/****s* silcutil/SilcRegexAPI/SilcRegexMatch
+/****s* silcutil/SilcRegexMatch
  *
  * NAME
  *
@@ -142,7 +149,7 @@ typedef struct SilcRegexMatchObject {
 } *SilcRegexMatch, SilcRegexMatchStruct;
 /***/
 
-/****d* silcutil/SilcRegexAPI/SilcRegexFlags
+/****d* silcutil/SilcRegexFlags
  *
  * NAME
  *
@@ -169,7 +176,7 @@ typedef enum {
 } SilcRegexFlags;
 /***/
 
-/****f* silcutil/SilcRegexAPI/silc_regex_compile
+/****f* silcutil/silc_regex_compile
  *
  * SYNOPSIS
  *
@@ -190,7 +197,7 @@ typedef enum {
 SilcBool silc_regex_compile(SilcRegex regexp, const char *regex,
                            SilcRegexFlags flags);
 
-/****f* silcutil/SilcRegexAPI/silc_regex_compile
+/****f* silcutil/silc_regex_match
  *
  * SYNOPSIS
  *
@@ -245,7 +252,7 @@ SilcBool silc_regex_match(SilcRegex regexp, const char *string,
                          SilcUInt32 string_len, SilcUInt32 num_match,
                          SilcRegexMatch match, SilcRegexFlags flags);
 
-/****f* silcutil/SilcRegexAPI/silc_regex_free
+/****f* silcutil/silc_regex_free
  *
  * SYNOPSIS
  *
@@ -260,7 +267,7 @@ SilcBool silc_regex_match(SilcRegex regexp, const char *string,
  ***/
 void silc_regex_free(SilcRegex regexp);
 
-/****f* silcutil/SilcRegexAPI/silc_regex
+/****f* silcutil/silc_regex
  *
  * SYNOPSIS
  *
@@ -305,7 +312,7 @@ void silc_regex_free(SilcRegex regexp);
 SilcBool silc_regex(const char *string, const char *regex,
                    SilcBuffer match, ...);
 
-/****f* silcutil/SilcRegexAPI/silc_regex_buffer
+/****f* silcutil/silc_regex_buffer
  *
  * SYNOPSIS
  *
@@ -323,7 +330,7 @@ SilcBool silc_regex(const char *string, const char *regex,
 SilcBool silc_regex_buffer(SilcBuffer buffer, const char *regex,
                           SilcBuffer match, ...);
 
-/****f* silcutil/SilcRegexAPI/silc_subst
+/****f* silcutil/silc_subst
  *
  * SYNOPSIS
  *
@@ -336,12 +343,12 @@ SilcBool silc_regex_buffer(SilcBuffer buffer, const char *regex,
  *    Sed (Stream Editor) style substitution interface.  The `subst' may
  *    be of following formats:
  *
- *    's/REGEXP/REPLACEMENT/FLAGS'
+ *     's/REGEXP/REPLACEMENT/FLAGS'
  *
  *    Matches regular expression REGEXP in each line in the buffer and
  *    substitutes the match with REPLACEMENT.
  *
- *    'ADDRs/REGEXP/REPLACEMENT/FLAGS'
+ *     'ADDRs/REGEXP/REPLACEMENT/FLAGS'
  *
  *    Selects lines in the buffer matching the address ADDR and matches the
  *    regular expression REGEXP in the line and substitutes the match with
@@ -349,14 +356,14 @@ SilcBool silc_regex_buffer(SilcBuffer buffer, const char *regex,
  *
  *    The ADDR may be of following format:
  *
- *    /REGEXP/       Matches only lines matching the regular expression
- *    NUMBER         Matches only the specified line number (1-n)
- *    $              Matches only the last line
+ *     /REGEXP/       Matches only lines matching the regular expression
+ *     NUMBER         Matches only the specified line number (1-n)
+ *     $              Matches only the last line
  *
  *    The FLAGS may be of following format:
  *
- *    no FLAGS       Finds first match in the line and replaces that
- *    g              Finds and replaces all matches in the line
+ *     no FLAGS       Finds first match in the line and replaces that
+ *     g              Finds and replaces all matches in the line
  *
  *    An '!' may precede the 's'.  In that case the ADDR is not matched.
  *
index 9736eed5706e5111585004221561df167940ef8c..1c8ad88661ecdd1d4cce17dcea27cdbf28461d36 100644 (file)
 
 */
 
+/****h* silcutil/Runtime Toolkit Interface
+ *
+ * DESCRIPTION
+ *
+ * The SILC Runtime Toolkit API is used to initialize and uninitialize the
+ * Runtime Toolkit.  The application should call silc_runtime_init at the
+ * very start of the application and the silc_runtime_uninit at the very end
+ * of the application before it is exited.
+ *
+ ***/
+
 #ifndef SILCRUNTIME_H
 #define SILCRUNTIME_H
 
@@ -202,6 +213,54 @@ extern "C" {
 #include <silcmime.h>
 #include <silcrand.h>
 
+/* Runtime Toolkit API */
+
+/****f* silcutil/silc_runtime_init
+ *
+ * SYNOPSIS
+ *
+ *    static inline void silc_runtime_init(void)
+ *
+ * DESCRIPTION
+ *
+ *    Initializes the Runtime Toolkit.  Application should call this as the
+ *    very first call to the Runtime Toolkit.  The function initializes some
+ *    of the Toolkit features.
+ *
+ ***/
+static inline
+void silc_runtime_init(void)
+{
+  /* For now we don't have much here.  Strictly speaking, calling this
+     currently isn't required.  But in the future we may have something that
+     really must be initialized at the very start.  Even the Tls doesn't
+     actually require initialization since any routine using Tls currently
+     takes care of that. */
+
+  /* Initialize Tls for this thread (probably main process thread). */
+  silc_thread_tls_init();
+}
+
+/****f* silcutil/silc_runtime_uninit
+ *
+ * SYNOPSIS
+ *
+ *    static inline void silc_runtime_uninit(void)
+ *
+ * DESCRIPTION
+ *
+ *    Uninitializes the Runtime Toolkit.  Application should call this as the
+ *    very last call to the Runtime Toolkit.  The function uninitializes and
+ *    frees all allocated resources.
+ *
+ ***/
+static inline
+void silc_runtime_uninit(void)
+{
+  /* Uninitialize the whole Tls system (not just one thread). */
+  silc_thread_tls_uninit();
+}
+
 #ifdef __cplusplus
 }
 #endif
index 9cb47540e54b7cd9f6aee6f8da5108385e253d6d..5afc14551f42902d81f1fb708c8fa4e52180a000 100644 (file)
@@ -17,7 +17,7 @@
 
 */
 
-/****h* silcutil/SILC Schedule Interface
+/****h* silcutil/Scheduler Interface
  *
  * DESCRIPTION
  *
  * the application's main loop that can handle incoming data, outgoing data,
  * timeouts and dispatch different kind of tasks.
  *
- * The SILC Scheduler supports file descriptor based tasks and timeout tasks.
- * File descriptor tasks are tasks that perform some operation over the
- * specified file descriptor. These include network connections, for example.
- * The timeout tasks are timeouts that are executed after the specified
- * timeout has elapsed.
+ * The SILC Scheduler supports file descriptor based tasks, timeout tasks and
+ * asynchronous event tasks.  File descriptor tasks are tasks that perform
+ * some operation over the specified file descriptor or socket.  The timeout
+ * tasks are timeouts that are executed after the specified timeout has
+ * elapsed.  Asynchronous event tasks are tasks that can be connected to
+ * and signalled to deliver messages and data to all connected entities.
  *
  * The SILC Scheduler is designed to be the sole main loop of the application
  * so that the application does not need any other main loop.  However,
  * that the scheduler does not block, and thus providing a possiblity that some
  * external main loop is run over the SILC Scheduler.
  *
- * Typical application first initializes the scheduler and then register
- * the very first tasks to the scheduler and then run the scheduler.  After
- * the scheduler's run function returns the application is considered to be
- * ended.
- *
  * On Windows systems the SILC Scheduler is too designed to work as the main
  * loop of the GUI application. It can handle all Windows messages and
  * it dispatches them from the scheduler, and thus makes it possible to
  * WSAEVENT handle objects created by Winsock2 routines and arbitrary
  * WIN32 HANDLE objects.
  *
- * The SILC Scheduler supports multi-threads as well. The actual scheduler
- * must be run in single-thread but other threads may register new tasks
- * and unregister old tasks.  However, it is enforced that the actual
- * task is always run in the main thread.  The scheduler is context based
- * which makes it possible to allocate several schedulers for one application.
- * Since the scheduler must be run in single-thread, a multi-threaded
- * application could be created by allocating own scheduler for each of the
- * worker threads.  Each scheduler in worker thread should be a child
- * scheduler created from the main thread's parent schedule.
+ * On Symbian OS the SILC Scheduler can work in cooperation with the Active
+ * Scheduler.  However, the Symbian OS Active Scheduler must be started
+ * before starting SILC Scheduler.
+ *
+ * The SILC Scheduler supports multi-threads.  Each thread can have their
+ * own scheduler.  Tasks registered to a scheduler are always executed in
+ * that same thread.  However, tasks may be added to and removed from any
+ * scheduler from any thread.  Each scheduler in worker thread should be
+ * a child scheduler created from the main thread's parent scheduler.
  *
  ***/
 
 #ifndef SILCSCHEDULE_H
 #define SILCSCHEDULE_H
 
-/****s* silcutil/SilcScheduleAPI/SilcSchedule
+/****s* silcutil/SilcSchedule
  *
  * NAME
  *
@@ -81,7 +77,7 @@
  ***/
 typedef struct SilcScheduleStruct *SilcSchedule;
 
-/****s* silcutil/SilcScheduleAPI/SilcTask
+/****s* silcutil/SilcTask
  *
  * NAME
  *
@@ -96,7 +92,7 @@ typedef struct SilcScheduleStruct *SilcSchedule;
  ***/
 typedef struct SilcTaskStruct *SilcTask;
 
-/****d* silcutil/SilcScheduleAPI/SilcTaskEvent
+/****d* silcutil/SilcTaskEvent
  *
  * NAME
  *
@@ -123,7 +119,7 @@ typedef enum {
 } SilcTaskEvent;
 /***/
 
-/****f* silcutil/SilcScheduleAPI/SilcTaskCallback
+/****f* silcutil/SilcTaskCallback
  *
  * SYNOPSIS
  *
@@ -159,7 +155,7 @@ typedef void (*SilcTaskCallback)(SilcSchedule schedule, void *app_context,
                                 SilcTaskEvent type, SilcUInt32 fd,
                                 void *context);
 
-/****f* silcutil/SilcScheduleAPI/SilcTaskEventCallback
+/****f* silcutil/SilcTaskEventCallback
  *
  * SYNOPSIS
  *
@@ -192,7 +188,7 @@ typedef SilcBool (*SilcTaskEventCallback)(SilcSchedule schedule,
                                          SilcTask task, void *context,
                                          va_list va);
 
-/****f* silcutil/SilcScheduleAPI/SilcTaskNotifyCb
+/****f* silcutil/SilcTaskNotifyCb
  *
  * SYNOPSIS
  *
@@ -237,7 +233,7 @@ typedef void (*SilcTaskNotifyCb)(SilcSchedule schedule,
 
 /* Macros */
 
-/****d* silcutil/SilcScheduleAPI/SILC_ALL_TASKS
+/****d* silcutil/SILC_ALL_TASKS
  *
  * NAME
  *
@@ -253,7 +249,7 @@ typedef void (*SilcTaskNotifyCb)(SilcSchedule schedule,
 #define SILC_ALL_TASKS ((SilcTask)1)
 /***/
 
-/****d* silcutil/SilcScheduleAPI/SILC_TASK_CALLBACK
+/****d* silcutil/SILC_TASK_CALLBACK
  *
  * NAME
  *
@@ -271,7 +267,7 @@ void func(SilcSchedule schedule, void *app_context, SilcTaskEvent type,     \
          SilcUInt32 fd, void *context)
 /***/
 
-/****d* silcutil/SilcScheduleAPI/SILC_TASK_EVENT_CALLBACK
+/****d* silcutil/SILC_TASK_EVENT_CALLBACK
  *
  * NAME
  *
@@ -294,7 +290,7 @@ SilcBool func(SilcSchedule schedule, void *app_context,                     \
 
 #include "silcschedule_i.h"
 
-/****f* silcutil/SilcScheduleAPI/silc_schedule_init
+/****f* silcutil/silc_schedule_init
  *
  * SYNOPSIS
  *
@@ -333,7 +329,7 @@ SilcBool func(SilcSchedule schedule, void *app_context,                     \
 SilcSchedule silc_schedule_init(int max_tasks, void *app_context,
                                SilcStack stack, SilcSchedule parent);
 
-/****f* silcutil/SilcScheduleAPI/silc_schedule_uninit
+/****f* silcutil/silc_schedule_uninit
  *
  * SYNOPSIS
  *
@@ -353,7 +349,7 @@ SilcSchedule silc_schedule_init(int max_tasks, void *app_context,
  ***/
 SilcBool silc_schedule_uninit(SilcSchedule schedule);
 
-/****f* silcutil/SilcScheduleAPI/silc_schedule_stop
+/****f* silcutil/silc_schedule_stop
  *
  * SYNOPSIS
  *
@@ -371,7 +367,7 @@ SilcBool silc_schedule_uninit(SilcSchedule schedule);
  ***/
 void silc_schedule_stop(SilcSchedule schedule);
 
-/****f* silcutil/SilcScheduleAPI/silc_schedule
+/****f* silcutil/silc_schedule
  *
  * SYNOPSIS
  *
@@ -395,7 +391,7 @@ void silc_schedule_stop(SilcSchedule schedule);
  ***/
 void silc_schedule(SilcSchedule schedule);
 
-/****f* silcutil/SilcScheduleAPI/silc_schedule_one
+/****f* silcutil/silc_schedule_one
  *
  * SYNOPSIS
  *
@@ -418,7 +414,7 @@ void silc_schedule(SilcSchedule schedule);
  ***/
 SilcBool silc_schedule_one(SilcSchedule schedule, int timeout_usecs);
 
-/****f* silcutil/SilcScheduleAPI/silc_schedule_wakeup
+/****f* silcutil/silc_schedule_wakeup
  *
  * SYNOPSIS
  *
@@ -435,7 +431,7 @@ SilcBool silc_schedule_one(SilcSchedule schedule, int timeout_usecs);
  ***/
 void silc_schedule_wakeup(SilcSchedule schedule);
 
-/****f* silcutil/SilcScheduleAPI/silc_schedule_get_parent
+/****f* silcutil/silc_schedule_get_parent
  *
  * SYNOPSIS
  *
@@ -448,7 +444,7 @@ void silc_schedule_wakeup(SilcSchedule schedule);
  ***/
 SilcSchedule silc_schedule_get_parent(SilcSchedule schedule);
 
-/****f* silcutil/SilcScheduleAPI/silc_schedule_get_context
+/****f* silcutil/silc_schedule_get_context
  *
  * SYNOPSIS
  *
@@ -464,7 +460,7 @@ SilcSchedule silc_schedule_get_parent(SilcSchedule schedule);
  ***/
 void *silc_schedule_get_context(SilcSchedule schedule);
 
-/****f* silcutil/SilcScheduleAPI/silc_schedule_get_stack
+/****f* silcutil/silc_schedule_get_stack
  *
  * SYNOPSIS
  *
@@ -480,7 +476,7 @@ void *silc_schedule_get_context(SilcSchedule schedule);
  ***/
 SilcStack silc_schedule_get_stack(SilcSchedule schedule);
 
-/****f* silcutil/SilcScheduleAPI/silc_schedule_set_notify
+/****f* silcutil/silc_schedule_set_notify
  *
  * SYNOPSIS
  *
@@ -496,7 +492,7 @@ SilcStack silc_schedule_get_stack(SilcSchedule schedule);
 void silc_schedule_set_notify(SilcSchedule schedule,
                              SilcTaskNotifyCb notify, void *context);
 
-/****f* silcutil/SilcScheduleAPI/silc_schedule_set_global
+/****f* silcutil/silc_schedule_set_global
  *
  * SYNOPSIS
  *
@@ -523,7 +519,7 @@ void silc_schedule_set_notify(SilcSchedule schedule,
  ***/
 void silc_schedule_set_global(SilcSchedule schedule);
 
-/****f* silcutil/SilcScheduleAPI/silc_schedule_get_global
+/****f* silcutil/silc_schedule_get_global
  *
  * SYNOPSIS
  *
@@ -537,7 +533,7 @@ void silc_schedule_set_global(SilcSchedule schedule);
  ***/
 SilcSchedule silc_schedule_get_global(void);
 
-/****f* silcutil/SilcScheduleAPI/silc_schedule_task_add_fd
+/****f* silcutil/silc_schedule_task_add_fd
  *
  * SYNOPSIS
  *
@@ -565,7 +561,7 @@ SilcSchedule silc_schedule_get_global(void);
 #define silc_schedule_task_add_fd(schedule, fd, callback, context)     \
   silc_schedule_task_add(schedule, fd, callback, context, 0, 0,        SILC_TASK_FD)
 
-/****f* silcutil/SilcScheduleAPI/silc_schedule_task_add_timeout
+/****f* silcutil/silc_schedule_task_add_timeout
  *
  * SYNOPSIS
  *
@@ -590,7 +586,7 @@ SilcSchedule silc_schedule_get_global(void);
   silc_schedule_task_add(schedule, 0, callback, context, s, u,         \
                          SILC_TASK_TIMEOUT)
 
-/****f* silcutil/SilcScheduleAPI/silc_schedule_task_add_signal
+/****f* silcutil/silc_schedule_task_add_signal
  *
  * SYNOPSIS
  *
@@ -622,7 +618,7 @@ SilcSchedule silc_schedule_get_global(void);
   silc_schedule_task_add(schedule, sig, callback, context, 0, 0,       \
                         SILC_TASK_SIGNAL)
 
-/****f* silcutil/SilcScheduleAPI/silc_schedule_task_add_event
+/****f* silcutil/silc_schedule_task_add_event
  *
  * SYNOPSIS
  *
@@ -653,14 +649,16 @@ SilcSchedule silc_schedule_get_global(void);
  *
  *    The variable argument list is used to describe the arguments of the
  *    event.  The variable arguments are a list of zero or more SilcParam
- *    values.  This function returns the event task context or NULL on error.
+ *    values.  The list must be ended with SILC_PARAM_END.  This function
+ *    returns the event task context or NULL on error.
  *
  * EXAMPLE
  *
  *    // Register 'connected' event
  *    silc_schedule_task_add_event(schedule, "connected",
  *                                 SILC_PARAM_UINT32,
- *                                 SILC_PARAM_BUFFER);
+ *                                 SILC_PARAM_BUFFER,
+ *                                 SILC_PARAM_END);
  *
  *    // Connect to 'connected' event
  *    silc_schedule_event_connect(schedule, "connected", NULL,
@@ -685,7 +683,7 @@ SilcSchedule silc_schedule_get_global(void);
 SilcTask silc_schedule_task_add_event(SilcSchedule schedule,
                                      const char *event, ...);
 
-/****f* silcutil/SilcScheduleAPI/silc_schedule_task_del
+/****f* silcutil/silc_schedule_task_del
  *
  * SYNOPSIS
  *
@@ -708,7 +706,7 @@ SilcTask silc_schedule_task_add_event(SilcSchedule schedule,
  ***/
 SilcBool silc_schedule_task_del(SilcSchedule schedule, SilcTask task);
 
-/****f* silcutil/SilcScheduleAPI/silc_schedule_task_del_by_fd
+/****f* silcutil/silc_schedule_task_del_by_fd
  *
  * SYNOPSIS
  *
@@ -730,7 +728,7 @@ SilcBool silc_schedule_task_del(SilcSchedule schedule, SilcTask task);
  ***/
 SilcBool silc_schedule_task_del_by_fd(SilcSchedule schedule, SilcUInt32 fd);
 
-/****f* silcutil/SilcScheduleAPI/silc_schedule_task_del_by_callback
+/****f* silcutil/silc_schedule_task_del_by_callback
  *
  * SYNOPSIS
  *
@@ -754,7 +752,7 @@ SilcBool silc_schedule_task_del_by_fd(SilcSchedule schedule, SilcUInt32 fd);
 SilcBool silc_schedule_task_del_by_callback(SilcSchedule schedule,
                                            SilcTaskCallback callback);
 
-/****f* silcutil/SilcScheduleAPI/silc_schedule_task_del_by_context
+/****f* silcutil/silc_schedule_task_del_by_context
  *
  * SYNOPSIS
  *
@@ -777,7 +775,7 @@ SilcBool silc_schedule_task_del_by_callback(SilcSchedule schedule,
 SilcBool silc_schedule_task_del_by_context(SilcSchedule schedule,
                                           void *context);
 
-/****f* silcutil/SilcScheduleAPI/silc_schedule_task_del_by_all
+/****f* silcutil/silc_schedule_task_del_by_all
  *
  * SYNOPSIS
  *
@@ -802,7 +800,7 @@ SilcBool silc_schedule_task_del_by_all(SilcSchedule schedule, int fd,
                                       SilcTaskCallback callback,
                                       void *context);
 
-/****f* silcutil/SilcScheduleAPI/silc_schedule_task_del_event
+/****f* silcutil/silc_schedule_task_del_event
  *
  * SYNOPSIS
  *
@@ -822,7 +820,7 @@ SilcBool silc_schedule_task_del_by_all(SilcSchedule schedule, int fd,
 SilcBool silc_schedule_task_del_event(SilcSchedule schedule,
                                      const char *event);
 
-/****f* silcutil/SilcScheduleAPI/silc_schedule_set_listen_fd
+/****f* silcutil/silc_schedule_set_listen_fd
  *
  * SYNOPSIS
  *
@@ -857,7 +855,7 @@ SilcBool silc_schedule_task_del_event(SilcSchedule schedule,
 SilcBool silc_schedule_set_listen_fd(SilcSchedule schedule, SilcUInt32 fd,
                                     SilcTaskEvent mask, SilcBool send_events);
 
-/****f* silcutil/SilcScheduleAPI/silc_schedule_get_fd_events
+/****f* silcutil/silc_schedule_get_fd_events
  *
  * SYNOPSIS
  *
@@ -876,7 +874,7 @@ SilcBool silc_schedule_set_listen_fd(SilcSchedule schedule, SilcUInt32 fd,
 SilcTaskEvent silc_schedule_get_fd_events(SilcSchedule schedule,
                                          SilcUInt32 fd);
 
-/****f* silcutil/SilcScheduleAPI/silc_schedule_unset_listen_fd
+/****f* silcutil/silc_schedule_unset_listen_fd
  *
  * SYNOPSIS
  *
@@ -894,7 +892,7 @@ SilcTaskEvent silc_schedule_get_fd_events(SilcSchedule schedule,
  ***/
 void silc_schedule_unset_listen_fd(SilcSchedule schedule, SilcUInt32 fd);
 
-/****f* silcutil/SilcScheduleAPI/silc_schedule_event_connect
+/****f* silcutil/silc_schedule_event_connect
  *
  * SYNOPSIS
  *
@@ -928,7 +926,7 @@ SilcBool silc_schedule_event_connect(SilcSchedule schedule,
                                     SilcTaskEventCallback callback,
                                     void *context);
 
-/****f* silcutil/SilcScheduleAPI/silc_schedule_event_disconnect
+/****f* silcutil/silc_schedule_event_disconnect
  *
  * SYNOPSIS
  *
@@ -952,7 +950,7 @@ SilcBool silc_schedule_event_disconnect(SilcSchedule schedule,
                                        SilcTaskEventCallback callback,
                                        void *context);
 
-/****f* silcutil/SilcScheduleAPI/silc_schedule_event_signal
+/****f* silcutil/silc_schedule_event_signal
  *
  * SYNOPSIS
  *
@@ -964,12 +962,15 @@ SilcBool silc_schedule_event_disconnect(SilcSchedule schedule,
  *
  *    Signals an event task.  The `event' or `task' must be non-NULL.  If
  *    `event' is non-NULL it is the name of the event to signal.  If the `task'
- *    is non-NULL it is the task to be signalled.  It is marginally faster
- *    to use the `task' pointer directly instead of `event' to send the signal.
+ *    is non-NULL it is the event task to be signalled.  It is marginally
+ *    faster to use the `task' pointer directly instead of `event' to send
+ *    the signal.
  *
  *    The variable arguments are the arguments to be sent in the signal to
  *    the connected entities.  The silc_schedule_task_add_event defines what
- *    arguments must be sent to each signal.
+ *    arguments must be sent to each signal.  The variable argument list
+ *    must not be ended with SILC_PARAM_END even though it is ended with that
+ *    in silc_schedule_task_add_event.
  *
  *    Signal delivery is synchronous; the signal is delivered inside this
  *    function.  If a receiver was originally in another thread, the signal
index abc1e751ab369e0d0a966c7b5c30e48183eb6131..fd89b72157cfe273b2370c633128aeaa687a2e6e 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 2007 Pekka Riikonen
+  Copyright (C) 2007 - 2008 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
@@ -17,7 +17,7 @@
 
 */
 
-/****h* silcutil/Snprintf
+/****h* silcutil/Snprintf Interface
  *
  * DESCRIPTION
  *
@@ -29,7 +29,7 @@
 #ifndef SILCSNPRINTF_H
 #define SILCSNPRINTF_H
 
-/****f* silcutil/SilcSnprintf/SilcSnprintfRender
+/****f* silcutil/SilcSnprintfRender
  *
  * SYNOPSIS
  *
@@ -57,7 +57,7 @@
  ***/
 typedef char *(*SilcSnprintfRender)(void *data);
 
-/****f* silcutil/SilcSnprintf/silc_snprintf
+/****f* silcutil/silc_snprintf
  *
  * SYNOPSIS
  *
@@ -76,7 +76,7 @@ typedef char *(*SilcSnprintfRender)(void *data);
  ***/
 int silc_snprintf(char *str, size_t count, const char *fmt, ...);
 
-/****f* silcutil/SilcSnprintf/silc_vsnprintf
+/****f* silcutil/silc_vsnprintf
  *
  * SYNOPSIS
  *
@@ -91,7 +91,7 @@ int silc_snprintf(char *str, size_t count, const char *fmt, ...);
  ***/
 int silc_vsnprintf(char *str, size_t count, const char *fmt, va_list args);
 
-/****f* silcutil/SilcSnprintf/silc_asprintf
+/****f* silcutil/silc_asprintf
  *
  * SYNOPSIS
  *
@@ -105,7 +105,7 @@ int silc_vsnprintf(char *str, size_t count, const char *fmt, va_list args);
  ***/
 int silc_asprintf(char **ptr, const char *format, ...);
 
-/****f* silcutil/SilcSnprintf/silc_vasprintf
+/****f* silcutil/silc_vasprintf
  *
  * SYNOPSIS
  *
index ad7ce71d18911925fd5a64ac666e00a073ee3379..c642796b60045d530a30f2bedb4b65dfd88f8a36 100644 (file)
@@ -17,7 +17,7 @@
 
 */
 
-/****h* silcutil/SILC Socket Stream Interface
+/****h* silcutil/Socket Stream Interface
  *
  * DESCRIPTION
  *
@@ -35,7 +35,7 @@
 #ifndef SILCSOCKETSTREAM_H
 #define SILCSOCKETSTREAM_H
 
-/****f* silcutil/SilcSocketStreamAPI/SilcSocketStreamCallback
+/****f* silcutil/SilcSocketStreamCallback
  *
  * SYNOPSIS
  *
@@ -62,7 +62,7 @@
 typedef void (*SilcSocketStreamCallback)(SilcResult status,
                                         SilcStream stream, void *context);
 
-/****f* silcutil/SilcSocketStreamAPI/silc_socket_tcp_stream_create
+/****f* silcutil/silc_socket_tcp_stream_create
  *
  * SYNOPSIS
  *
@@ -104,7 +104,7 @@ silc_socket_tcp_stream_create(SilcSocket sock, SilcBool lookup,
                              SilcSocketStreamCallback callback,
                              void *context);
 
-/****f* silcutil/SilcSocketStreamAPI/silc_socket_udp_stream_create
+/****f* silcutil/silc_socket_udp_stream_create
  *
  * SYNOPSIS
  *
@@ -146,7 +146,7 @@ SilcStream silc_socket_udp_stream_create(SilcSocket sock,
                                         SilcBool connected,
                                         SilcSchedule schedule);
 
-/****f* silcutil/SilcSocketStreamAPI/silc_socket_stream_is_udp
+/****f* silcutil/silc_socket_stream_is_udp
  *
  * SYNOPSIS
  *
@@ -165,7 +165,7 @@ SilcStream silc_socket_udp_stream_create(SilcSocket sock,
  ***/
 SilcBool silc_socket_stream_is_udp(SilcStream stream, SilcBool *connected);
 
-/****f* silcutil/SilcSocketStreamAPI/silc_socket_stream_get_info
+/****f* silcutil/silc_socket_stream_get_info
  *
  * SYNOPSIS
  *
@@ -185,7 +185,7 @@ SilcBool silc_socket_stream_get_info(SilcStream stream,
                                     SilcSocket *sock, const char **hostname,
                                     const char **ip, SilcUInt16 *port);
 
-/****f* silcutil/SilcSocketStreamAPI/silc_socket_stream_set_info
+/****f* silcutil/silc_socket_stream_set_info
  *
  * SYNOPSIS
  *
@@ -210,7 +210,7 @@ SilcBool silc_socket_stream_set_info(SilcStream stream,
                                     const char *hostname,
                                     const char *ip, SilcUInt16 port);
 
-/****f* silcutil/SilcSocketStreamAPI/silc_socket_stream_set_qos
+/****f* silcutil/silc_socket_stream_set_qos
  *
  * SYNOPSIS
  *
index 0a41e6ba2fa5e2f057aa7ccde70deb15870157d7..f978f1bc9e18097a3b9291a326944ac2fd82aeb7 100644 (file)
 
 */
 
-/****h* silcutil/SilcStack Interface
+/****h* silcutil/Memory Pool Interface
  *
  * DESCRIPTION
  *
- * Data stack interface which can be used to do fast allocations from
- * the stack.  Basically SilcStack is a pre-allocated memory pool system
- * which allows fast memory allocation for routines and applications that
- * frequently allocate small amounts of memory.  Other advantage of this
- * system is that there are no memory leaks, as long as the stack is
- * freed eventually.  Since the stack is usually allocated only once this
- * is not an issue.
+ * SilcStack is a pre-allocated memory pool system which allows fast memory
+ * allocation for routines and applications that frequently allocate small
+ * amounts of memory.  Other advantage of this system is that there are no
+ * memory leaks, as long as the stack is freed eventually.  Since the stack
+ * is usually allocated only once this is not an issue.
  *
  * SilcStack supports stack pushing and popping allowing to push the stack,
  * allocate memory and then pop it to free the allocated memory.  The freeing
  *
  * A basic set of utility functions are provided for application that wish
  * to use the SilcStack as their primary memory allocation source.  The
- * following functions support SilcStack:
+ * following functions (among many others) support SilcStack:
  *
  * silc_smalloc, silc_smalloc, silc_scalloc, silc_srealloc, silc_smemdup,
  * silc_sfree, silc_sstrdup, silc_buffer_salloc, silc_buffer_salloc_size,
  * silc_buffer_srealloc, silc_buffer_srealloc_size, silc_buffer_scopy,
  * silc_buffer_sclone, silc_buffer_sformat, silc_buffer_sformat_vp,
- * silc_buffer_sstrformat, silc_buffer_senlarge, silc_mp_sinit,
- * silc_dlist_sinit, silc_hash_table_alloc
+ * silc_buffer_sstrformat, silc_buffer_senlarge, silc_dlist_sinit,
+ * silc_hash_table_alloc
  *
  * The SilcStack is not thread-safe so that same context could be used for
  * allocations from multiple threads.  It is however safe to create and use
@@ -63,7 +61,7 @@
 #ifndef SILCSTACK_H
 #define SILCSTACK_H
 
-/****s* silcutil/SilcStackAPI/SilcStack
+/****s* silcutil/SilcStack
  *
  * NAME
  *
@@ -79,7 +77,7 @@
  ***/
 typedef struct SilcStackStruct *SilcStack;
 
-/****s* silcutil/SilcStackAPI/SilcStackFrame
+/****s* silcutil/SilcStackFrame
  *
  * NAME
  *
@@ -97,7 +95,7 @@ typedef struct SilcStackStruct *SilcStack;
  ***/
 typedef struct SilcStackFrameStruct SilcStackFrame;
 
-/****f* silcutil/SilcStackAPI/SilcStackOomHandler
+/****f* silcutil/SilcStackOomHandler
  *
  * SYNOPSIS
  *
@@ -113,7 +111,7 @@ typedef struct SilcStackFrameStruct SilcStackFrame;
  ***/
 typedef void (*SilcStackOomHandler)(SilcStack stack, void *context);
 
-/****f* silcutil/SilcStackAPI/silc_stack_alloc
+/****f* silcutil/silc_stack_alloc
  *
  * SYNOPSIS
  *
@@ -133,12 +131,12 @@ typedef void (*SilcStackOomHandler)(SilcStack stack, void *context);
  *    that, even though child allocates memory from the parent, the parent's
  *    stack is not consumed.
  *
- *    Returns NULL on error.
+ *    Returns NULL on error and sets silc_errno.
  *
  ***/
 SilcStack silc_stack_alloc(SilcUInt32 stack_size, SilcStack parent);
 
-/****f* silcutil/SilcStackAPI/silc_stack_free
+/****f* silcutil/silc_stack_free
  *
  * SYNOPSIS
  *
@@ -155,7 +153,7 @@ SilcStack silc_stack_alloc(SilcUInt32 stack_size, SilcStack parent);
  ***/
 void silc_stack_free(SilcStack stack);
 
-/****f* silcutil/SilcStackAPI/silc_stack_push
+/****f* silcutil/silc_stack_push
  *
  * SYNOPSIS
  *
@@ -215,7 +213,7 @@ void silc_stack_free(SilcStack stack);
  ***/
 SilcUInt32 silc_stack_push(SilcStack stack, SilcStackFrame *frame);
 
-/****f* silcutil/SilcStackAPI/silc_stack_pop
+/****f* silcutil/silc_stack_pop
  *
  * SYNOPSIS
  *
@@ -252,7 +250,7 @@ SilcUInt32 silc_stack_push(SilcStack stack, SilcStackFrame *frame);
  ***/
 SilcUInt32 silc_stack_pop(SilcStack stack);
 
-/****f* silcutil/SilcStackAPI/silc_stack_malloc
+/****f* silcutil/silc_stack_malloc
  *
  * SYNOPSIS
  *
@@ -275,7 +273,7 @@ SilcUInt32 silc_stack_pop(SilcStack stack);
  ***/
 void *silc_stack_malloc(SilcStack stack, SilcUInt32 size);
 
-/****f* silcutil/SilcStackAPI/silc_stack_realloc
+/****f* silcutil/silc_stack_realloc
  *
  * SYNOPSIS
  *
@@ -302,7 +300,7 @@ void *silc_stack_malloc(SilcStack stack, SilcUInt32 size);
 void *silc_stack_realloc(SilcStack stack, SilcUInt32 old_size,
                         void *ptr, SilcUInt32 size);
 
-/****f* silcutil/SilcStackAPI/silc_stack_set_oom_handler
+/****f* silcutil/silc_stack_set_oom_handler
  *
  * SYNOPSIS
  *
@@ -326,7 +324,7 @@ void silc_stack_set_oom_handler(SilcStack stack,
                                SilcStackOomHandler oom_handler,
                                void *context);
 
-/****f* silcutil/SilcStackAPI/silc_stack_set_alignment
+/****f* silcutil/silc_stack_set_alignment
  *
  * SYNOPSIS
  *
@@ -352,7 +350,7 @@ void silc_stack_set_oom_handler(SilcStack stack,
  ***/
 void silc_stack_set_alignment(SilcStack stack, SilcUInt32 alignment);
 
-/****f* silcutil/SilcStackAPI/silc_stack_get_alignment
+/****f* silcutil/silc_stack_get_alignment
  *
  * SYNOPSIS
  *
@@ -366,7 +364,7 @@ void silc_stack_set_alignment(SilcStack stack, SilcUInt32 alignment);
  ***/
 SilcUInt32 silc_stack_get_alignment(SilcStack stack);
 
-/****f* silcutil/SilcStackAPI/silc_stack_purge
+/****f* silcutil/silc_stack_purge
  *
  * SYNOPSIS
  *
@@ -385,7 +383,7 @@ SilcUInt32 silc_stack_get_alignment(SilcStack stack);
  ***/
 SilcBool silc_stack_purge(SilcStack stack);
 
-/****f* silcutil/SilcStackAPI/silc_stack_set_global
+/****f* silcutil/silc_stack_set_global
  *
  * SYNOPSIS
  *
@@ -407,7 +405,7 @@ SilcBool silc_stack_purge(SilcStack stack);
  ***/
 void silc_stack_set_global(SilcStack stack);
 
-/****f* silcutil/SilcStackAPI/silc_stack_get_global
+/****f* silcutil/silc_stack_get_global
  *
  * SYNOPSIS
  *
index d88efa9243a05e2e0182d64fb289cbdafeacce19..4440fa5dce8ade00314586cbb56ae41fca1b0826 100644 (file)
@@ -17,7 +17,7 @@
 
 */
 
-/****h* silcutil/SILC Stream Interface
+/****h* silcutil/Stream Interface
  *
  * DESCRIPTION
  *
@@ -26,8 +26,9 @@
  * other stream API derived from this API can use this same interface for
  * reading and writing.
  *
- * The SilcStream is an abstraction.  It can represent any stream, socket
- * stream, file descriptor stream, packet stream, etc.
+ * The SilcStream is an abstraction.  It can represent any stream; socket
+ * stream, file descriptor stream, packet stream, etc.  See examples in
+ * silcsocketstream.h and silcfdstream.h.
  *
  * Note that stream implementations usually are not thread-safe.  Always
  * verify whether a stream implementation is thread-safe by checking their
@@ -38,7 +39,7 @@
 #ifndef SILCSTREAM_H
 #define SILCSTREAM_H
 
-/****s* silcutil/SilcStreamAPI/SilcStream
+/****s* silcutil/SilcStream
  *
  * NAME
  *
@@ -54,7 +55,7 @@
  ***/
 typedef void *SilcStream;
 
-/****d* silcutil/SilcStreamAPI/SilcStreamStatus
+/****d* silcutil/SilcStreamStatus
  *
  * NAME
  *
@@ -74,7 +75,7 @@ typedef enum {
 } SilcStreamStatus;
 /***/
 
-/****f* silcutil/SilcStreamAPI/SilcStreamNotifier
+/****f* silcutil/SilcStreamNotifier
  *
  * SYNOPSIS
  *
@@ -94,7 +95,7 @@ typedef void (*SilcStreamNotifier)(SilcStream stream,
                                   SilcStreamStatus status,
                                   void *context);
 
-/****s* silcutil/SilcStreamAPI/SilcStreamOps
+/****s* silcutil/SilcStreamOps
  *
  * NAME
  *
@@ -120,7 +121,7 @@ typedef void (*SilcStreamNotifier)(SilcStream stream,
  *    } *SilcFooStream;
  *
  *    SilcFooStream foo;
- *    silc_stream_write(foo, data, data_len);
+ *    silc_stream_write((SilcStream)foo, data, data_len);
  *
  * SOURCE
  */
@@ -156,7 +157,7 @@ typedef struct {
 } SilcStreamOps;
 /***/
 
-/****f* silcutil/SilcStreamAPI/silc_stream_read
+/****f* silcutil/silc_stream_read
  *
  * SYNOPSIS
  *
@@ -178,7 +179,7 @@ typedef struct {
 int silc_stream_read(SilcStream stream, unsigned char *buf,
                     SilcUInt32 buf_len);
 
-/****f* silcutil/SilcStreamAPI/silc_stream_write
+/****f* silcutil/silc_stream_write
  *
  * SYNOPSIS
  *
@@ -200,7 +201,7 @@ int silc_stream_read(SilcStream stream, unsigned char *buf,
 int silc_stream_write(SilcStream stream, const unsigned char *data,
                      SilcUInt32 data_len);
 
-/****f* silcutil/SilcStreamAPI/silc_stream_close
+/****f* silcutil/silc_stream_close
  *
  * SYNOPSIS
  *
@@ -216,7 +217,7 @@ int silc_stream_write(SilcStream stream, const unsigned char *data,
  ***/
 SilcBool silc_stream_close(SilcStream stream);
 
-/****f* silcutil/SilcStreamAPI/silc_stream_destroy
+/****f* silcutil/silc_stream_destroy
  *
  * SYNOPSIS
  *
@@ -233,7 +234,7 @@ SilcBool silc_stream_close(SilcStream stream);
  ***/
 void silc_stream_destroy(SilcStream stream);
 
-/****f* silcutil/SilcStreamAPI/silc_stream_set_notifier
+/****f* silcutil/silc_stream_set_notifier
  *
  * SYNOPSIS
  *
@@ -261,7 +262,7 @@ void silc_stream_destroy(SilcStream stream);
 SilcBool silc_stream_set_notifier(SilcStream stream, SilcSchedule schedule,
                                  SilcStreamNotifier notifier, void *context);
 
-/****f* silcutil/SilcStreamAPI/silc_stream_get_schedule
+/****f* silcutil/silc_stream_get_schedule
  *
  * SYNOPSIS
  *
index 21bc331b48f21d125385a53fc1252b85c7b52f83..418dab7127b4c9da0d9a2eebbced5c5b8a765d9d 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 2004 - 2005 Pekka Riikonen
+  Copyright (C) 2004 - 2008 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
@@ -17,7 +17,7 @@
 
 */
 
-/****h* silcutil/SILC Stringprep
+/****h* silcutil/Stringprep Interface
  *
  * DESCRIPTION
  *
@@ -32,7 +32,7 @@
 #ifndef SILCSTRINGPREP_H
 #define SILCSTRINGPREP_H
 
-/****d* silcutil/SilcStringprep/SilcStringprepStatus
+/****d* silcutil/SilcStringprepStatus
  *
  * NAME
  *
@@ -60,7 +60,7 @@ typedef enum {
 } SilcStringprepStatus;
 /***/
 
-/****d* silcutil/SilcStringprep/SilcStringprepFlags
+/****d* silcutil/SilcStringprepFlags
  *
  * NAME
  *
@@ -85,7 +85,7 @@ typedef enum {
 #define SILC_IDENTIFIER_CH_PREP "silc-identifier-ch-prep"
 #define SILC_CASEFOLD_PREP "silc-casefold-prep"
 
-/****f* silcutil/SilcStringprep/silc_stringprep
+/****f* silcutil/silc_stringprep
  *
  * SYNOPSIS
  *
index 2caeb4c7f50b4eff9c1d4c6c140e3e58d80fd79f..a9f08fe031fb50705eea9218d3e686629eacfba9 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 2002 - 2007 Pekka Riikonen
+  Copyright (C) 2002 - 2008 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
@@ -17,7 +17,7 @@
 
 */
 
-/****h* silcutil/SILC String Utilities
+/****h* silcutil/String Utilities
  *
  * DESCRIPTION
  *
@@ -28,7 +28,7 @@
 #ifndef SILCSTRUTIL_H
 #define SILCSTRUTIL_H
 
-/****d* silcutil/SilcStrUtilAPI/SilcStringEncoding
+/****d* silcutil/SilcStringEncoding
  *
  * NAME
  *
@@ -65,7 +65,7 @@ typedef enum {
 } SilcStringEncoding;
 /***/
 
-/****f* silcutil/SilcStrStrUtilAPI/silc_strncat
+/****f* silcutil/silc_strncat
  *
  * SYNOPSIS
  *
@@ -82,7 +82,7 @@ typedef enum {
 char *silc_strncat(char *dest, SilcUInt32 dest_size,
                   const char *src, SilcUInt32 src_len);
 
-/****f* silcutil/SilcStrUtilAPI/silc_string_regexify
+/****f* silcutil/silc_string_regexify
  *
  * SYNOPSIS
  *
@@ -97,7 +97,7 @@ char *silc_strncat(char *dest, SilcUInt32 dest_size,
  ***/
 char *silc_string_regexify(const char *string);
 
-/****f* silcutil/SilcStrUtilAPI/silc_string_match
+/****f* silcutil/silc_string_match
  *
  * SYNOPSIS
  *
@@ -111,7 +111,7 @@ char *silc_string_regexify(const char *string);
  ***/
 int silc_string_match(const char *string1, const char *string2);
 
-/****f* silcutil/SilcStrUtilAPI/silc_string_compare
+/****f* silcutil/silc_string_compare
  *
  * SYNOPSIS
  *
@@ -125,7 +125,7 @@ int silc_string_match(const char *string1, const char *string2);
  ***/
 int silc_string_compare(char *string1, char *string2);
 
-/****f* silcutil/SilcStrUtilAPI/silc_string_split
+/****f* silcutil/silc_string_split
  *
  * SYNOPSIS
  *
index 5afc0a03201cced36b4b3cd48fd75fcb81c830b8..c16dbd95ad10061f604797f8c5ed8cd24077a28c 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 2001 - 2007 Pekka Riikonen
+  Copyright (C) 2001 - 2008 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
@@ -17,7 +17,7 @@
 
 */
 
-/****h* silcutil/SILC Thread Interface
+/****h* silcutil/Thread Interface
  *
  * DESCRIPTION
  *
@@ -42,7 +42,7 @@
 
 /* Prototypes */
 
-/****s* silcutil/SilcThreadAPI/SilcThread
+/****s* silcutil/SilcThread
  *
  * NAME
  *
@@ -58,7 +58,7 @@
  ***/
 typedef void *SilcThread;
 
-/****f* silcutil/SilcThreadAPI/SilcThreadStart
+/****f* silcutil/SilcThreadStart
  *
  * SYNOPSIS
  *
@@ -76,7 +76,7 @@ typedef void *SilcThread;
  ***/
 typedef void *(*SilcThreadStart)(void *context);
 
-/****f* silcutil/SilcThreadAPI/silc_thread_create
+/****f* silcutil/silc_thread_create
  *
  * SYNOPSIS
  *
@@ -109,7 +109,7 @@ typedef void *(*SilcThreadStart)(void *context);
 SilcThread silc_thread_create(SilcThreadStart start_func, void *context,
                              SilcBool waitable);
 
-/****f* silcutil/SilcThreadAPI/silc_thread_exit
+/****f* silcutil/silc_thread_exit
  *
  * SYNOPSIS
  *
@@ -126,7 +126,7 @@ SilcThread silc_thread_create(SilcThreadStart start_func, void *context,
  ***/
 void silc_thread_exit(void *exit_value);
 
-/****f* silcutil/SilcThreadAPI/silc_thread_self
+/****f* silcutil/silc_thread_self
  *
  * SYNOPSIS
  *
@@ -139,7 +139,7 @@ void silc_thread_exit(void *exit_value);
  ***/
 SilcThread silc_thread_self(void);
 
-/****f* silcutil/SilcThreadAPI/silc_thread_wait
+/****f* silcutil/silc_thread_wait
  *
  * SYNOPSIS
  *
@@ -157,7 +157,7 @@ SilcThread silc_thread_self(void);
  ***/
 SilcBool silc_thread_wait(SilcThread thread, void **exit_value);
 
-/****f* silcutil/SilcThreadAPI/silc_thread_yield
+/****f* silcutil/silc_thread_yield
  *
  * SYNOPSIS
  *
@@ -171,7 +171,7 @@ SilcBool silc_thread_wait(SilcThread thread, void **exit_value);
  ***/
 void silc_thread_yield(void);
 
-/****s* silcutil/SilcThreadAPI/SilcThreadPool
+/****s* silcutil/SilcThreadPool
  *
  * NAME
  *
@@ -187,7 +187,7 @@ void silc_thread_yield(void);
  ***/
 typedef struct SilcThreadPoolStruct *SilcThreadPool;
 
-/****f* silcutil/SilcThreadAPI/SilcThreadPoolFunc
+/****f* silcutil/SilcThreadPoolFunc
  *
  * SYNOPSIS
  *
@@ -204,7 +204,7 @@ typedef struct SilcThreadPoolStruct *SilcThreadPool;
  ***/
 typedef void (*SilcThreadPoolFunc)(SilcSchedule schedule, void *context);
 
-/****f* silcutil/SilcThreadAPI/silc_thread_pool_alloc
+/****f* silcutil/silc_thread_pool_alloc
  *
  * SYNOPSIS
  *
@@ -243,7 +243,7 @@ SilcThreadPool silc_thread_pool_alloc(SilcStack stack,
                                      SilcUInt32 max_threads,
                                      SilcBool start_min_threads);
 
-/****f* silcutil/SilcThreadAPI/silc_thread_pool_free
+/****f* silcutil/silc_thread_pool_free
  *
  * SYNOPSIS
  *
@@ -258,7 +258,7 @@ SilcThreadPool silc_thread_pool_alloc(SilcStack stack,
  ***/
 void silc_thread_pool_free(SilcThreadPool tp, SilcBool wait_unfinished);
 
-/****f* silcutil/SilcThreadAPI/silc_thread_pool_run
+/****f* silcutil/silc_thread_pool_run
  *
  * SYNOPSIS
  *
@@ -294,7 +294,7 @@ SilcBool silc_thread_pool_run(SilcThreadPool tp,
                              SilcTaskCallback completion,
                              void *completion_context);
 
-/****f* silcutil/SilcThreadAPI/silc_thread_pool_set_max_threads
+/****f* silcutil/silc_thread_pool_set_max_threads
  *
  * SYNOPSIS
  *
@@ -310,7 +310,7 @@ SilcBool silc_thread_pool_run(SilcThreadPool tp,
 void silc_thread_pool_set_max_threads(SilcThreadPool tp,
                                      SilcUInt32 max_threads);
 
-/****f* silcutil/SilcThreadAPI/silc_thread_pool_get_max_threads
+/****f* silcutil/silc_thread_pool_get_max_threads
  *
  * SYNOPSIS
  *
@@ -323,7 +323,7 @@ void silc_thread_pool_set_max_threads(SilcThreadPool tp,
  ***/
 SilcUInt32 silc_thread_pool_get_max_threads(SilcThreadPool tp);
 
-/****f* silcutil/SilcThreadAPI/silc_thread_pool_num_free_threads
+/****f* silcutil/silc_thread_pool_num_free_threads
  *
  * SYNOPSIS
  *
@@ -337,7 +337,7 @@ SilcUInt32 silc_thread_pool_get_max_threads(SilcThreadPool tp);
  ***/
 SilcUInt32 silc_thread_pool_num_free_threads(SilcThreadPool tp);
 
-/****f* silcutil/SilcThreadAPI/silc_thread_pool_purge
+/****f* silcutil/silc_thread_pool_purge
  *
  * SYNOPSIS
  *
@@ -352,7 +352,7 @@ SilcUInt32 silc_thread_pool_num_free_threads(SilcThreadPool tp);
  ***/
 void silc_thread_pool_purge(SilcThreadPool tp);
 
-/****f* silcutil/SilcThreadAPI/silc_thread_tls_set
+/****f* silcutil/silc_thread_tls_set
  *
  * SYNOPSIS
  *
@@ -370,7 +370,7 @@ void silc_thread_pool_purge(SilcThreadPool tp);
  ***/
 void silc_thread_tls_set(void *context);
 
-/****f* silcutil/SilcThreadAPI/silc_thread_tls_get
+/****f* silcutil/silc_thread_tls_get
  *
  * SYNOPSIS
  *
index c6355a89f9af2d4198ffb14cedd24f92db35c58b..87cf7445b9b2fe9ccb22d5a682ddca997c0064e5 100644 (file)
@@ -17,7 +17,7 @@
 
 */
 
-/****h* silcutil/SILC Thread Queue Interface
+/****h* silcutil/Thread Queue Interface
  *
  * DESCRIPTION
  *
@@ -48,7 +48,7 @@
 #ifndef SILCTHREADQUEUE_H
 #define SILCTHREADQUEUE_H
 
-/****s* silcutil/SilcThreadQueueAPI/SilcThreadQueue
+/****s* silcutil/SilcThreadQueue
  *
  * NAME
  *
@@ -62,7 +62,7 @@
  ***/
 typedef struct SilcThreadQueueStruct *SilcThreadQueue;
 
-/****f* silcutil/SilcThreadQueueAPI/silc_thread_queue_alloc
+/****f* silcutil/silc_thread_queue_alloc
  *
  * SYNOPSIS
  *
@@ -79,7 +79,7 @@ typedef struct SilcThreadQueueStruct *SilcThreadQueue;
  ***/
 SilcThreadQueue silc_thread_queue_alloc(void);
 
-/****f* silcutil/SilcThreadQueueAPI/silc_thread_queue_connect
+/****f* silcutil/silc_thread_queue_connect
  *
  * SYNOPSIS
  *
@@ -95,7 +95,7 @@ SilcThreadQueue silc_thread_queue_alloc(void);
  ***/
 void silc_thread_queue_connect(SilcThreadQueue queue);
 
-/****f* silcutil/SilcThreadQueueAPI/silc_thread_queue_disconnect
+/****f* silcutil/silc_thread_queue_disconnect
  *
  * SYNOPSIS
  *
@@ -112,7 +112,7 @@ void silc_thread_queue_connect(SilcThreadQueue queue);
  ***/
 void silc_thread_queue_disconnect(SilcThreadQueue queue);
 
-/****f* silcutil/SilcThreadQueueAPI/silc_thread_queue_push
+/****f* silcutil/silc_thread_queue_push
  *
  * SYNOPSIS
  *
@@ -126,7 +126,7 @@ void silc_thread_queue_disconnect(SilcThreadQueue queue);
  ***/
 void silc_thread_queue_push(SilcThreadQueue queue, void *data);
 
-/****f* silcutil/SilcThreadQueueAPI/silc_thread_queue_pop
+/****f* silcutil/silc_thread_queue_pop
  *
  * SYNOPSIS
  *
@@ -142,7 +142,7 @@ void silc_thread_queue_push(SilcThreadQueue queue, void *data);
  ***/
 void *silc_thread_queue_pop(SilcThreadQueue queue, SilcBool block);
 
-/****f* silcutil/SilcThreadQueueAPI/silc_thread_queue_timed_pop
+/****f* silcutil/silc_thread_queue_timed_pop
  *
  * SYNOPSIS
  *
@@ -159,7 +159,7 @@ void *silc_thread_queue_pop(SilcThreadQueue queue, SilcBool block);
 void *silc_thread_queue_timed_pop(SilcThreadQueue queue,
                                  int timeout_msec);
 
-/****f* silcutil/SilcThreadQueueAPI/silc_thread_queue_pop_list
+/****f* silcutil/silc_thread_queue_pop_list
  *
  * SYNOPSIS
  *
index e01e1ae701f92660debb212b10dae7a6195f7b86..a049cca469b0e3deca59981d539cfb373c78556a 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 2003 - 2007 Pekka Riikonen
+  Copyright (C) 2003 - 2008 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
@@ -17,7 +17,7 @@
 
 */
 
-/****h* silcutil/SILC Time Interface
+/****h* silcutil/Time Interface
  *
  * DESCRIPTION
  *
@@ -30,7 +30,7 @@
 #ifndef SILCTIME_H
 #define SILCTIME_H
 
-/****s* silcutil/SilcTimeAPI/SilcTime
+/****s* silcutil/SilcTime
  *
  * NAME
  *
@@ -43,7 +43,7 @@
  *
  * SOURCE
  *
- ***/
+ */
 typedef struct SilcTimeObject {
   unsigned int year       : 15;           /* Year,     0 - 32768 */
   unsigned int month      : 4;    /* Month,    1 - 12 */
@@ -59,7 +59,7 @@ typedef struct SilcTimeObject {
 } *SilcTime, SilcTimeStruct;
 /***/
 
-/****f* silcutil/SilcTimeAPI/silc_time
+/****f* silcutil/silc_time
  *
  * SYNOPSIS
  *
@@ -73,7 +73,7 @@ typedef struct SilcTimeObject {
  ***/
 SilcInt64 silc_time(void);
 
-/****f* silcutil/SilcTimeAPI/silc_time_msec
+/****f* silcutil/silc_time_msec
  *
  * SYNOPSIS
  *
@@ -87,7 +87,7 @@ SilcInt64 silc_time(void);
  ***/
 SilcInt64 silc_time_msec(void);
 
-/****f* silcutil/SilcTimeAPI/silc_time_usec
+/****f* silcutil/silc_time_usec
  *
  * SYNOPSIS
  *
@@ -101,7 +101,7 @@ SilcInt64 silc_time_msec(void);
  ***/
 SilcInt64 silc_time_usec(void);
 
-/****f* silcutil/SilcTimeAPI/silc_time_string
+/****f* silcutil/silc_time_string
  *
  * SYNOPSIS
  *
@@ -118,7 +118,7 @@ SilcInt64 silc_time_usec(void);
  ***/
 const char *silc_time_string(SilcInt64 time_val_sec);
 
-/****f* silcutil/SilcTimeAPI/silc_time_value
+/****f* silcutil/silc_time_value
  *
  * SYNOPSIS
  *
@@ -134,7 +134,7 @@ const char *silc_time_string(SilcInt64 time_val_sec);
  ***/
 SilcBool silc_time_value(SilcInt64 time_val_msec, SilcTime ret_time);
 
-/****f* silcutil/SilcTimeAPI/silc_timezone
+/****f* silcutil/silc_timezone
  *
  * SYNOPSIS
  *
@@ -153,7 +153,7 @@ SilcBool silc_time_value(SilcInt64 time_val_msec, SilcTime ret_time);
  ***/
 SilcBool silc_timezone(char *timezone, SilcUInt32 timezone_size);
 
-/****f* silcutil/SilcTimeAPI/silc_time_universal
+/****f* silcutil/silc_time_universal
  *
  * SYNOPSIS
  *
@@ -179,7 +179,7 @@ SilcBool silc_timezone(char *timezone, SilcUInt32 timezone_size);
  ***/
 SilcBool silc_time_universal(const char *universal_time, SilcTime ret_time);
 
-/****f* silcutil/SilcTimeAPI/silc_time_universal_string
+/****f* silcutil/silc_time_universal_string
  *
  * SYNOPSIS
  *
@@ -195,7 +195,7 @@ SilcBool silc_time_universal(const char *universal_time, SilcTime ret_time);
 SilcBool silc_time_universal_string(SilcTime time_val, char *ret_string,
                                    SilcUInt32 ret_string_size);
 
-/****f* silcutil/SilcTimeAPI/silc_time_generalized
+/****f* silcutil/silc_time_generalized
  *
  * SYNOPSIS
  *
@@ -226,7 +226,7 @@ SilcBool silc_time_universal_string(SilcTime time_val, char *ret_string,
 SilcBool
 silc_time_generalized(const char *generalized_time, SilcTime ret_time);
 
-/****f* silcutil/SilcTimeAPI/silc_time_generalized_string
+/****f* silcutil/silc_time_generalized_string
  *
  * SYNOPSIS
  *
@@ -243,7 +243,7 @@ silc_time_generalized(const char *generalized_time, SilcTime ret_time);
 SilcBool silc_time_generalized_string(SilcTime time_val, char *ret_string,
                                      SilcUInt32 ret_string_size);
 
-/****f* silcutil/SilcTimeAPI/silc_compare_timeval
+/****f* silcutil/silc_compare_timeval
  *
  * SYNOPSIS
  *
@@ -258,7 +258,7 @@ SilcBool silc_time_generalized_string(SilcTime time_val, char *ret_string,
  ***/
 int silc_compare_timeval(struct timeval *t1, struct timeval *t2);
 
-/****f* silcutil/SilcTimeAPI/silc_gettimeofday
+/****f* silcutil/silc_gettimeofday
  *
  * SYNOPSIS
  *
@@ -272,47 +272,4 @@ int silc_compare_timeval(struct timeval *t1, struct timeval *t2);
  ***/
 int silc_gettimeofday(struct timeval *p);
 
-/****f* silcutil/SilcTimeAPI/silc_usleep
- *
- * SYNOPSIS
- *
- *    void silc_usleep(unsigned long microseconds);
- *
- * DESCRIPTION
- *
- *    Delays the execution of process/thread for the specified amount of
- *    time, which is in microseconds.
- *
- * NOTES
- *
- *    The delay is only approximate and on some platforms the resolution is
- *    in fact milliseconds.
- *
- ***/
-static inline
-void silc_usleep(unsigned long microseconds)
-{
-#ifdef SILC_UNIX
-#ifdef HAVE_NANOSLEEP
-  struct timespec tv;
-  tv.tv_sec = 0;
-  tv.tv_nsec = microseconds * 1000;
-#endif /* HAVE_NANOSLEEP */
-#endif /* SILC_UNIX */
-
-#ifdef SILC_UNIX
-#ifdef HAVE_NANOSLEEP
-  nanosleep(&tv, NULL);
-#else
-  usleep(microseconds);
-#endif /* HAVE_NANOSLEEP */
-#endif /* SILC_UNIX */
-#ifdef SILC_WIN32
-  Sleep(microseconds / 1000);
-#endif /* SILC_WIN32 */
-#ifdef SILC_SYMBIAN
-  silc_symbian_usleep(microseconds);
-#endif /* SILC_SYMBIAN */
-}
-
 #endif /* SILCTIME_H */
index 30debf07d67a93f1995d583ea3123838eee3965e..bc908ee7f1b50aaba90f74b8cb0730236aa09941 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 2007 Pekka Riikonen
+  Copyright (C) 2007 - 2008 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
 
 */
 
-/****h* silcutil/SILC Timer Interface
+/****h* silcutil/Timer Interface
  *
  * DESCRIPTION
  *
  * SILC Timer interface provides a simple way to measure time intervals.
  * The SILC Timer works with microsecond resolution, depending on platform.
  *
+ * The interface also provides utility functions to get currenet CPU tick
+ * count and to delay process/thread execution.
+ *
  * EXAMPLE
  *
  * SilcTimerStruct timer;
@@ -38,7 +41,7 @@
 #ifndef SILCTIMER_H
 #define SILCTIMER_H
 
-/****s* silcutil/SilcTimerAPI/SilcTimer
+/****s* silcutil/SilcTimer
  *
  * NAME
  *
@@ -52,7 +55,7 @@
  ***/
 typedef struct SilcTimerObject *SilcTimer, SilcTimerStruct;
 
-/****f* silcutil/SilcTimerAPI/silc_timer_start
+/****f* silcutil/silc_timer_start
  *
  * SYNOPSIS
  *
@@ -75,7 +78,7 @@ typedef struct SilcTimerObject *SilcTimer, SilcTimerStruct;
  ***/
 void silc_timer_start(SilcTimer timer);
 
-/****f* silcutil/SilcTimerAPI/silc_timer_stop
+/****f* silcutil/silc_timer_stop
  *
  * SYNOPSIS
  *
@@ -89,7 +92,7 @@ void silc_timer_start(SilcTimer timer);
  ***/
 void silc_timer_stop(SilcTimer timer);
 
-/****f* silcutil/SilcTimerAPI/silc_timer_continue
+/****f* silcutil/silc_timer_continue
  *
  * SYNOPSIS
  *
@@ -102,7 +105,7 @@ void silc_timer_stop(SilcTimer timer);
  ***/
 void silc_timer_continue(SilcTimer timer);
 
-/****f* silcutil/SilcTimerAPI/silc_timer_value
+/****f* silcutil/silc_timer_value
  *
  * SYNOPSIS
  *
@@ -121,7 +124,7 @@ void silc_timer_value(SilcTimer timer,
                      SilcUInt64 *elapsed_time_seconds,
                      SilcUInt32 *elapsed_time_microseconds);
 
-/****f* silcutil/SilcTimerAPI/silc_timer_value_time
+/****f* silcutil/silc_timer_value_time
  *
  * SYNOPSIS
  *
@@ -137,7 +140,7 @@ void silc_timer_value(SilcTimer timer,
  ***/
 void silc_timer_value_time(SilcTimer timer, SilcTime ret_time);
 
-/****f* silcutil/SilcTimerAPI/silc_timer_start_time
+/****f* silcutil/silc_timer_start_time
  *
  * SYNOPSIS
  *
@@ -150,7 +153,7 @@ void silc_timer_value_time(SilcTimer timer, SilcTime ret_time);
  ***/
 void silc_timer_start_time(SilcTimer timer, SilcTime ret_start_time);
 
-/****f* silcutil/SilcTimerAPI/silc_timer_is_running
+/****f* silcutil/silc_timer_is_running
  *
  * SYNOPSIS
  *
@@ -165,7 +168,7 @@ SilcBool silc_timer_is_running(SilcTimer timer);
 
 #include "silctimer_i.h"
 
-/****f* silcutil/SilcTimerAPI/silc_timer_tick
+/****f* silcutil/silc_timer_tick
  *
  * SYNOPSIS
  *
@@ -179,7 +182,7 @@ SilcBool silc_timer_is_running(SilcTimer timer);
  *    tick count.  If the `adjust' is TRUE and the silc_timer_synchronize
  *    has been called the returned value is adjusted to be more accurate.
  *
- * EXAMPLES
+ * EXAMPLE
  *
  *    // Synchronize timer for more accurate CPU tick counts
  *    silc_timer_synchronize(&timer);
@@ -226,7 +229,7 @@ SilcUInt64 silc_timer_tick(SilcTimer timer, SilcBool adjust)
 #endif /* __GNUC__ || __ICC */
 }
 
-/****f* silcutil/SilcTimerAPI/silc_timer_synchronize
+/****f* silcutil/silc_timer_synchronize
  *
  * SYNOPSIS
  *
@@ -286,4 +289,47 @@ void silc_timer_synchronize(SilcTimer timer)
   timer->sync_tdiff += (int)(t2 - t1);
 }
 
+/****f* silcutil/silc_usleep
+ *
+ * SYNOPSIS
+ *
+ *    void silc_usleep(unsigned long microseconds);
+ *
+ * DESCRIPTION
+ *
+ *    Delays the execution of process/thread for the specified amount of
+ *    time, which is in microseconds.
+ *
+ * NOTES
+ *
+ *    The delay is only approximate and on some platforms the resolution is
+ *    in fact milliseconds.
+ *
+ ***/
+static inline
+void silc_usleep(unsigned long microseconds)
+{
+#ifdef SILC_UNIX
+#ifdef HAVE_NANOSLEEP
+  struct timespec tv;
+  tv.tv_sec = 0;
+  tv.tv_nsec = microseconds * 1000;
+#endif /* HAVE_NANOSLEEP */
+#endif /* SILC_UNIX */
+
+#ifdef SILC_UNIX
+#ifdef HAVE_NANOSLEEP
+  nanosleep(&tv, NULL);
+#else
+  usleep(microseconds);
+#endif /* HAVE_NANOSLEEP */
+#endif /* SILC_UNIX */
+#ifdef SILC_WIN32
+  Sleep(microseconds / 1000);
+#endif /* SILC_WIN32 */
+#ifdef SILC_SYMBIAN
+  silc_symbian_usleep(microseconds);
+#endif /* SILC_SYMBIAN */
+}
+
 #endif /* SILCTIMER_H */
index 8cbb20d0e77dd0bb5027460623341f3f13c04336..8a9c53bca431c6bea869c6aedbca4d2d3e1a3a2d 100644 (file)
@@ -17,7 +17,7 @@
 
 */
 
-/****h* silcutil/SILC Types
+/****h* silcutil/Types and Definitions
  *
  * DESCRIPTION
  *
@@ -44,9 +44,7 @@
 #error "size of the short must be 2 bytes"
 #endif
 
-/******************************* Public API *********************************/
-
-/****d* silcutil/SILCTypes/SilcBool
+/****d* silcutil/SilcBool
  *
  * NAME
  *
@@ -59,7 +57,7 @@
  ***/
 typedef unsigned char SilcBool;
 
-/****d* silcutil/SILCTypes/TRUE
+/****d* silcutil/TRUE
  *
  * NAME
  *
@@ -76,7 +74,7 @@ typedef unsigned char SilcBool;
 #endif
 /***/
 
-/****d* silcutil/SILCTypes/FALSE
+/****d* silcutil/FALSE
  *
  * NAME
  *
@@ -93,7 +91,7 @@ typedef unsigned char SilcBool;
 #endif
 /***/
 
-/****d* silcutil/SILCTypes/SilcUInt8
+/****d* silcutil/SilcUInt8
  *
  * NAME
  *
@@ -108,7 +106,7 @@ typedef unsigned char SilcBool;
 typedef unsigned char SilcUInt8;
 /***/
 
-/****d* silcutil/SILCTypes/SilcInt8
+/****d* silcutil/SilcInt8
  *
  * NAME
  *
@@ -123,7 +121,7 @@ typedef unsigned char SilcUInt8;
 typedef signed char SilcInt8;
 /***/
 
-/****d* silcutil/SILCTypes/SilcUInt16
+/****d* silcutil/SilcUInt16
  *
  * NAME
  *
@@ -138,7 +136,7 @@ typedef signed char SilcInt8;
 typedef unsigned short SilcUInt16;
 /***/
 
-/****d* silcutil/SILCTypes/SilcInt16
+/****d* silcutil/SilcInt16
  *
  * NAME
  *
@@ -153,7 +151,7 @@ typedef unsigned short SilcUInt16;
 typedef signed short SilcInt16;
 /***/
 
-/****d* silcutil/SILCTypes/SilcUInt32
+/****d* silcutil/SilcUInt32
  *
  * NAME
  *
@@ -183,7 +181,7 @@ typedef signed long long SilcInt32;
 #endif
 /***/
 
-/****d* silcutil/SILCTypes/SilcInt32
+/****d* silcutil/SilcInt32
  *
  * NAME
  *
@@ -195,7 +193,7 @@ typedef signed long long SilcInt32;
  *
  ***/
 
-/****d* silcutil/SILCTypes/SilcUInt64
+/****d* silcutil/SilcUInt64
  *
  * NAME
  *
@@ -227,7 +225,7 @@ typedef SilcInt32 SilcInt64;
 #endif
 /***/
 
-/****d* silcutil/SILCTypes/SilcInt64
+/****d* silcutil/SilcInt64
  *
  * NAME
  *
@@ -244,7 +242,7 @@ typedef SilcInt32 SilcInt64;
 typedef SilcUInt32 * void *;
 #endif
 
-/****d* silcutil/SILCTypes/SilcSocket
+/****d* silcutil/SilcSocket
  *
  * NAME
  *
@@ -268,7 +266,7 @@ typedef void * SilcSocket;
 #endif
 /***/
 
-/****d* silcutil/SILCTypes/SilcParam
+/****d* silcutil/SilcParam
  *
  * NAME
  *
@@ -334,7 +332,7 @@ typedef SilcUInt32 SilcParam;
                    | ((SilcUInt32)(SilcUInt8)(cp)[3])
 #endif /* (SILC_I486 || SILC_X86_64) && __GNUC__ */
 
-/****d* silcutil/SILCTypes/SILC_GET16_MSB
+/****d* silcutil/SILC_GET16_MSB
  *
  * NAME
  *
@@ -359,7 +357,7 @@ do {                                                        \
 #endif /* (SILC_I386 || SILC_X86_64) && __GNUC__ */
 /***/
 
-/****d* silcutil/SILCTypes/SILC_GET32_MSB
+/****d* silcutil/SILC_GET32_MSB
  *
  * NAME
  *
@@ -404,7 +402,7 @@ do {                                                                        \
     | ((SilcUInt32)(SilcUInt8)(cp)[3]);
 #endif /* (SILC_I486 || SILC_X86_64) && __GNUC__ */
 
-/****d* silcutil/SILCTypes/SILC_GET64_MSB
+/****d* silcutil/SILC_GET64_MSB
  *
  * NAME
  *
@@ -429,7 +427,7 @@ do {                                                                \
 #endif /* SILC_X86_64 && __GNUC__ */
 /***/
 
-/****d* silcutil/SILCTypes/SILC_GET16_LSB
+/****d* silcutil/SILC_GET16_LSB
  *
  * NAME
  *
@@ -452,7 +450,7 @@ do {                                                        \
 #endif /* SILC_I386 || SILC_X86_64 */
 /***/
 
-/****d* silcutil/SILCTypes/SILC_GET32_LSB
+/****d* silcutil/SILC_GET32_LSB
  *
  * NAME
  *
@@ -488,7 +486,7 @@ do {                                                        \
     | ((SilcUInt32)(SilcUInt8)(cp)[3] << 24)
 #endif /* SILC_I386 || SILC_X86_64 */
 
-/****d* silcutil/SILCTypes/SILC_PUT16_MSB
+/****d* silcutil/SILC_PUT16_MSB
  *
  * NAME
  *
@@ -513,7 +511,7 @@ do {                                                \
 #endif /* (SILC_I386 || SILC_X86_64) && __GNUC__ */
 /***/
 
-/****d* silcutil/SILCTypes/SILC_PUT32_MSB
+/****d* silcutil/SILC_PUT32_MSB
  *
  * NAME
  *
@@ -540,7 +538,7 @@ do {                                                \
 #endif /* (SILC_I486 || SILC_X86_64) && __GNUC__ */
 /***/
 
-/****d* silcutil/SILCTypes/SILC_PUT64_MSB
+/****d* silcutil/SILC_PUT64_MSB
  *
  * NAME
  *
@@ -565,7 +563,7 @@ do {                                                                \
 #endif /* SILC_X86_64 && __GNUC__ */
 /***/
 
-/****d* silcutil/SILCTypes/SILC_PUT16_LSB
+/****d* silcutil/SILC_PUT16_LSB
  *
  * NAME
  *
@@ -588,7 +586,7 @@ do  {                                               \
 #endif /* SILC_I386 || SILC_X86_64 */
 /***/
 
-/****d* silcutil/SILCTypes/SILC_PUT32_LSB
+/****d* silcutil/SILC_PUT32_LSB
  *
  * NAME
  *
@@ -613,7 +611,7 @@ do {                                                \
 #endif /* SILC_I386 || SILC_X86_64 */
 /***/
 
-/****d* silcutil/SILCTypes/SILC_SWAB_16
+/****d* silcutil/SILC_SWAB_16
  *
  * NAME
  *
@@ -640,7 +638,7 @@ do {                                                \
 #endif /* (SILC_I386 || SILC_X86_64) && __GNUC__ */
 /***/
 
-/****d* silcutil/SILCTypes/SILC_SWAB_32
+/****d* silcutil/SILC_SWAB_32
  *
  * NAME
  *
@@ -669,7 +667,7 @@ do {                                                \
 #endif /* (SILC_I486 || SILC_X86_64) && __GNUC__ */
 /***/
 
-/****d* silcutil/SILCTypes/SILC_PTR_TO_32
+/****d* silcutil/SILC_PTR_TO_32
  *
  * NAME
  *
@@ -691,7 +689,7 @@ do {                                                \
 #endif
 /***/
 
-/****d* silcutil/SILCTypes/SILC_PTR_TO_64
+/****d* silcutil/SILC_PTR_TO_64
  *
  * NAME
  *
@@ -712,7 +710,7 @@ do {                                                \
 #endif
 /***/
 
-/****d* silcutil/SILCTypes/SILC_32_TO_PTR
+/****d* silcutil/SILC_32_TO_PTR
  *
  * NAME
  *
@@ -733,7 +731,7 @@ do {                                                \
 #endif
 /***/
 
-/****d* silcutil/SILCTypes/SILC_64_TO_PTR
+/****d* silcutil/SILC_64_TO_PTR
  *
  * NAME
  *
@@ -755,7 +753,58 @@ do {                                               \
 #endif
 /***/
 
-/****d* silcutil/SILCTypes/silc_rol
+/****d* silcutil/SILC_ASSERT
+ *
+ * NAME
+ *
+ *    #define SILC_ASSERT(experssion)
+ *
+ * DESCRIPTION
+ *
+ *    Assert macro that prints error message to stderr and calls abort()
+ *    if the `expression' is false (ie. compares equal to zero).  If
+ *    SILC_DEBUG is not defined this macro has no effect.
+ *
+ * SOURCE
+ */
+#if defined(SILC_DEBUG)
+#define SILC_ASSERT(expr) assert((expr));
+#else
+#define SILC_ASSERT(expr) do { } while(0)
+#endif /* SILC_DEBUG */
+/***/
+
+/****d* silcutil/SILC_VERIFY
+ *
+ * NAME
+ *
+ *    #define SILC_VERIFY(experssion)
+ *
+ * DESCRIPTION
+ *
+ *    Verification macro that prints error message to stderr and calls
+ *    abort() if the `expression' is false (ie. compares equal to zero)
+ *    on debug builds (SILC_DEBUG defined), and prints error message to
+ *    stderr on release builds (SILC_DEBUG undefined) but does not abort().
+ *    This macro is always compiled even if debugging (SILC_DEBUG) is not
+ *    defined.
+ *
+ * SOURCE
+ */
+#if defined(SILC_DEBUG)
+#define SILC_VERIFY(expr) assert((expr));
+#else
+#define SILC_VERIFY(expr)                                              \
+  if (silc_unlikely(!(expr))) {                                                \
+    SILC_LOG_ERROR(("SILC_VERIFY %s:%s:%d",                            \
+                   __FILE__, __FUNCTION__, __LINE__));                 \
+    silc_set_errno_reason_nofail(SILC_ERR_ASSERT, "SILC_VERIFY %s:%s:%d", \
+                                __FILE__, __FUNCTION__, __LINE__);     \
+  }
+#endif /* SILC_DEBUG */
+/***/
+
+/****d* silcutil/silc_rol
  *
  * NAME
  *
@@ -779,7 +828,7 @@ static inline SilcUInt32 silc_rol(SilcUInt32 val, int num)
 #endif /* (SILC_I486 || SILC_X86_64) && __GNUC__ */
 }
 
-/****d* silcutil/SILCTypes/silc_ror
+/****d* silcutil/silc_ror
  *
  * NAME
  *
@@ -803,7 +852,7 @@ static inline SilcUInt32 silc_ror(SilcUInt32 val, int num)
 #endif /* (SILC_I486 || SILC_X86_64) && __GNUC__ */
 }
 
-/****d* silcutil/SILCTypes/silc_rol64
+/****d* silcutil/silc_rol64
  *
  * NAME
  *
@@ -827,7 +876,7 @@ static inline SilcUInt64 silc_rol64(SilcUInt64 val, int num)
 #endif /* SILC_X86_64 && __GNUC__ */
 }
 
-/****d* silcutil/SILCTypes/silc_ror64
+/****d* silcutil/silc_ror64
  *
  * NAME
  *
@@ -851,7 +900,7 @@ static inline SilcUInt64 silc_ror64(SilcUInt64 val, int num)
 #endif /* SILC_X86_64 && __GNUC__ */
 }
 
-/****d* silcutil/SILCTypes/silc_offsetof
+/****d* silcutil/silc_offsetof
  *
  * NAME
  *
@@ -864,7 +913,7 @@ static inline SilcUInt64 silc_ror64(SilcUInt64 val, int num)
  ***/
 #define silc_offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
 
-/****d* silcutil/SILCTypes/silc_attribute
+/****d* silcutil/silc_attribute
  *
  * NAME
  *
@@ -887,7 +936,7 @@ static inline SilcUInt64 silc_ror64(SilcUInt64 val, int num)
 #define silc_attribute(attrlist)
 #endif /* __GNUC__ */
 
-/****d* silcutil/SILCTypes/silc_likely
+/****d* silcutil/silc_likely
  *
  * NAME
  *
@@ -902,7 +951,7 @@ static inline SilcUInt64 silc_ror64(SilcUInt64 val, int num)
  *
  ***/
 
-/****d* silcutil/SILCTypes/silc_unlikely
+/****d* silcutil/silc_unlikely
  *
  * NAME
  *
@@ -928,7 +977,7 @@ static inline SilcUInt64 silc_ror64(SilcUInt64 val, int num)
    reading or writing if you think that the data will be needed soon after
    prefetching. */
 
-/****d* silcutil/SILCTypes/silc_prefetch
+/****d* silcutil/silc_prefetch
  *
  * NAME
  *
@@ -960,7 +1009,7 @@ void silc_prefetch(void *addr, int rw, int locality)
 #endif /* __GNUC__ */
 }
 
-/****d* silcutil/SILCTypes/silc_prefetch_block
+/****d* silcutil/silc_prefetch_block
  *
  * NAME
  *
index 1f6fe4de224567ce6612745b85247d1cdfe79b0d..47e951bcc0d9565a5c2ff493092b51ecdc6f62de 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 2004 - 2007 Pekka Riikonen
+  Copyright (C) 2004 - 2008 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
@@ -17,7 +17,7 @@
 
 */
 
-/****h* silcutil/SILC UTF-8 Interface
+/****h* silcutil/UTF-8 Interface
  *
  * DESCRIPTION
  *
@@ -30,7 +30,7 @@
 #ifndef SILCUTF8_H
 #define SILCUTF8_H
 
-/****f* silcutil/SilcUTF8API/silc_utf8_encode
+/****f* silcutil/silc_utf8_encode
  *
  * SYNOPSIS
  *
@@ -51,7 +51,7 @@ SilcUInt32 silc_utf8_encode(const unsigned char *bin, SilcUInt32 bin_len,
                            SilcStringEncoding bin_encoding,
                            unsigned char *utf8, SilcUInt32 utf8_size);
 
-/****f* silcutil/SilcStrUtilAPI/silc_utf8_decode
+/****f* silcutil/silc_utf8_decode
  *
  * SYNOPSIS
  *
@@ -74,7 +74,7 @@ SilcUInt32 silc_utf8_decode(const unsigned char *utf8, SilcUInt32 utf8_len,
                            SilcStringEncoding bin_encoding,
                            unsigned char *bin, SilcUInt32 bin_size);
 
-/****f* silcutil/SilcStrUtilAPI/silc_utf8_c2w
+/****f* silcutil/silc_utf8_c2w
  *
  * SYNOPSIS
  *
@@ -98,7 +98,7 @@ SilcUInt32 silc_utf8_decode(const unsigned char *utf8, SilcUInt32 utf8_len,
 SilcUInt32 silc_utf8_c2w(const unsigned char *utf8, SilcUInt32 utf8_len,
                         SilcUInt16 *utf8_wide, SilcUInt32 utf8_wide_size);
 
-/****f* silcutil/SilcStrUtilAPI/silc_utf8_w2c
+/****f* silcutil/silc_utf8_w2c
  *
  * SYNOPSIS
  *
@@ -119,7 +119,7 @@ SilcUInt32 silc_utf8_c2w(const unsigned char *utf8, SilcUInt32 utf8_len,
 SilcUInt32 silc_utf8_w2c(const SilcUInt16 *wide_str, SilcUInt32 wide_str_len,
                         unsigned char *utf8, SilcUInt32 utf8_size);
 
-/****f* silcutil/SilcStrUtilAPI/silc_utf8_encoded_len
+/****f* silcutil/silc_utf8_encoded_len
  *
  * SYNOPSIS
  *
@@ -137,7 +137,7 @@ SilcUInt32 silc_utf8_w2c(const SilcUInt16 *wide_str, SilcUInt32 wide_str_len,
 SilcUInt32 silc_utf8_encoded_len(const unsigned char *bin, SilcUInt32 bin_len,
                                 SilcStringEncoding bin_encoding);
 
-/****f* silcutil/SilcStrUtilAPI/silc_utf8_decoded_len
+/****f* silcutil/silc_utf8_decoded_len
  *
  * SYNOPSIS
  *
@@ -155,7 +155,7 @@ SilcUInt32 silc_utf8_encoded_len(const unsigned char *bin, SilcUInt32 bin_len,
 SilcUInt32 silc_utf8_decoded_len(const unsigned char *bin, SilcUInt32 bin_len,
                                 SilcStringEncoding bin_encoding);
 
-/****f* silcutil/SilcStrUtilAPI/silc_utf8_valid
+/****f* silcutil/silc_utf8_valid
  *
  * SYNOPSIS
  *
@@ -169,7 +169,7 @@ SilcUInt32 silc_utf8_decoded_len(const unsigned char *bin, SilcUInt32 bin_len,
  ***/
 SilcBool silc_utf8_valid(const unsigned char *utf8, SilcUInt32 utf8_len);
 
-/****f* silcutil/SilcStrUtilAPI/silc_utf8_strcasecmp
+/****f* silcutil/silc_utf8_strcasecmp
  *
  * SYNOPSIS
  *
@@ -188,7 +188,7 @@ SilcBool silc_utf8_valid(const unsigned char *utf8, SilcUInt32 utf8_len);
  ***/
 SilcBool silc_utf8_strcasecmp(const char *s1, const char *s2);
 
-/****f* silcutil/SilcStrUtilAPI/silc_utf8_strncasecmp
+/****f* silcutil/silc_utf8_strncasecmp
  *
  * SYNOPSIS
  *
index 726c67f4f455c6161d0ac3d20ce4573d03196aef..14e6adf53a59724c28a2f4af4f05c1dbf8cd74fe 100644 (file)
@@ -17,7 +17,7 @@
 
 */
 
-/****h* silcutil/SILC Utilities
+/****h* silcutil/Misc Utilities
  *
  * DESCRIPTION
  *
@@ -28,7 +28,7 @@
 #ifndef SILCUTIL_H
 #define SILCUTIL_H
 
-/****f* silcutil/SilcUtilAPI/silc_gets
+/****f* silcutil/silc_gets
  *
  * SYNOPSIS
  *
@@ -44,7 +44,7 @@
  ***/
 int silc_gets(char *dest, int destlen, const char *src, int srclen, int begin);
 
-/****f* silcutil/SilcUtilAPI/silc_to_upper
+/****f* silcutil/silc_to_upper
  *
  * SYNOPSIS
  *
@@ -58,7 +58,7 @@ int silc_gets(char *dest, int destlen, const char *src, int srclen, int begin);
  ***/
 SilcBool silc_to_upper(const char *string, char *dest, SilcUInt32 dest_size);
 
-/****f* silcutil/SilcUtilAPI/silc_to_lower
+/****f* silcutil/silc_to_lower
  *
  * SYNOPSIS
  *
@@ -72,7 +72,7 @@ SilcBool silc_to_upper(const char *string, char *dest, SilcUInt32 dest_size);
  ***/
 SilcBool silc_to_lower(const char *string, char *dest, SilcUInt32 dest_size);
 
-/****f* silcutil/SilcUtilAPI/silc_parse_userfqdn
+/****f* silcutil/silc_parse_userfqdn
  *
  * SYNOPSIS
  *
@@ -91,7 +91,7 @@ int silc_parse_userfqdn(const char *string,
                        char *user, SilcUInt32 user_size,
                        char *fqdn, SilcUInt32 fqdn_size);
 
-/****f* silcutil/SilcUtilAPI/silc_parse_command_line
+/****f* silcutil/silc_parse_command_line
  *
  * SYNOPSIS
  *
@@ -117,7 +117,7 @@ void silc_parse_command_line(unsigned char *buffer,
                             SilcUInt32 *parsed_num,
                             SilcUInt32 max_args);
 
-/****f* silcutil/SilcUtilAPI/silc_format
+/****f* silcutil/silc_format
  *
  * SYNOPSIS
  *
@@ -131,7 +131,7 @@ void silc_parse_command_line(unsigned char *buffer,
  ***/
 char *silc_format(char *fmt, ...);
 
-/****f* silcutil/SilcUtilAPI/silc_fingerprint
+/****f* silcutil/silc_fingerprint
  *
  * SYNOPSIS
  *
@@ -147,7 +147,7 @@ char *silc_format(char *fmt, ...);
  ***/
 char *silc_fingerprint(const unsigned char *data, SilcUInt32 data_len);
 
-/****f* silcutil/SilcUtilAPI/silc_string_is_ascii
+/****f* silcutil/silc_string_is_ascii
  *
  * SYNOPSIS
  *
@@ -161,7 +161,7 @@ char *silc_fingerprint(const unsigned char *data, SilcUInt32 data_len);
  ***/
 SilcBool silc_string_is_ascii(const unsigned char *data, SilcUInt32 data_len);
 
-/****f* silcutil/SilcUtilAPI/silc_get_input
+/****f* silcutil/silc_get_input
  *
  * SYNOPSIS
  *
@@ -176,7 +176,7 @@ char *silc_get_input(const char *prompt, SilcBool echo_off);
 
 /* System dependant prototypes */
 
-/****f* silcutil/SilcUtilAPI/silc_get_username
+/****f* silcutil/silc_get_username
  *
  * SYNOPSIS
  *
@@ -193,7 +193,7 @@ char *silc_get_input(const char *prompt, SilcBool echo_off);
  ***/
 char *silc_get_username();
 
-/****f* silcutil/SilcUtilAPI/silc_get_real_name
+/****f* silcutil/silc_get_real_name
  *
  * SYNOPSIS
  *
@@ -209,7 +209,7 @@ char *silc_get_username();
  ***/
 char *silc_get_real_name();
 
-/****f* silcutil/SilcUtilAPI/silc_va_copy
+/****f* silcutil/silc_va_copy
  *
  * SYNOPSIS
  *
@@ -233,7 +233,7 @@ char *silc_get_real_name();
 #define silc_va_copy(dest, src) dest = src;
 #endif
 
-/****f* silcutil/SilcUtilAPI/silc_hexdump
+/****f* silcutil/silc_hexdump
  *
  * SYNOPSIS
  *
@@ -249,7 +249,7 @@ char *silc_get_real_name();
 void silc_hexdump(const unsigned char *data, SilcUInt32 data_len,
                  FILE *output);
 
-/****f* silcutil/SilcUtilAPI/silc_hex2data
+/****f* silcutil/silc_hex2data
  *
  * SYNOPSIS
  *
@@ -265,7 +265,7 @@ void silc_hexdump(const unsigned char *data, SilcUInt32 data_len,
 SilcBool silc_hex2data(const char *hex, unsigned char *data,
                       SilcUInt32 data_size, SilcUInt32 *ret_data_len);
 
-/****f* silcutil/SilcUtilAPI/silc_data2hex
+/****f* silcutil/silc_data2hex
  *
  * SYNOPSIS
  *
diff --git a/lib/silcutil/symbian/.gitignore b/lib/silcutil/symbian/.gitignore
deleted file mode 100644 (file)
index a501f92..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-Makefile
-*.in
-*.am
-*.o
-*.lo
-*.la
-*.a
-*.pc
index c665b3d339632fb6655a6b0484f2e726c1e1def3..3667825c3a2145aba76f297b71972ecd378498a9 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 2006 - 2007 Pekka Riikonen
+  Copyright (C) 2006 - 2008 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
@@ -17,7 +17,7 @@
 
 */
 
-#include "silc.h"
+#include "silcruntime.h"
 #include "silcsymbiansocketstream.h"
 
 /************************ Static utility functions **************************/
index 631a0a9b1abb68d8c51d94ecba5d1ec641097a4f..8f1cd5cfc368b3bbbb567d49de703082bdee48f6 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 2007 Pekka Riikonen
+  Copyright (C) 2007 - 2008 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
@@ -17,7 +17,7 @@
 
 */
 
-#include "silc.h"
+#include "silcruntime.h"
 #include <e32base.h>
 
 /* The SILC Scheduler for Symbian handles only timeout tasks.  Fd tasks are
index b2362784d370746515bb6a6ce3d28abbdee303d1..343076c5251aa03992d9e8267a649d21177eba4e 100644 (file)
@@ -5,7 +5,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 2006 - 2007 Pekka Riikonen
+  Copyright (C) 2006 - 2008 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
@@ -25,7 +25,7 @@
    socket, which is done automatically by the Active Scheduler in blocking
    mode. */
 
-#include "silc.h"
+#include "silcruntime.h"
 #include "silcsymbiansocketstream.h"
 
 /***************************** Socket Classes *******************************/
index 691ec677d4f4b386bd9a01ea625c3fc5dbbc1c08..9b56425a26fafc0d39607a7bdeea6920e3891931 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 2006 - 2007 Pekka Riikonen
+  Copyright (C) 2006 - 2008 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
@@ -17,7 +17,7 @@
 
 */
 
-#include "silc.h"
+#include "silcruntime.h"
 #include <e32std.h>
 #include <e32svr.h>
 
index 6ca7e728dac1c47e837834731a993d4c8cc530e4..138b55f4e6d49138b07b7f0b7bccc6da5df93c0d 100644 (file)
@@ -7,6 +7,7 @@ int main(int argc, char **argv)
   SilcBool success = FALSE;
   unsigned char *vbuf, *vbuf2;
   unsigned char init[20];
+  SilcUInt32 gint, *gintptr;
 
   if (argc > 1 && !strcmp(argv[1], "-d")) {
     silc_log_debug(TRUE);
@@ -15,6 +16,18 @@ int main(int argc, char **argv)
     silc_log_set_debug_string("*global*");
   }
 
+  SILC_LOG_DEBUG(("Set global var"));
+  gint = 100;
+  if (!silc_global_set_var("gint", 4, &gint, FALSE))
+    goto err;
+
+  SILC_LOG_DEBUG(("Retrieve var"));
+  gintptr = silc_global_get_var("gint", FALSE);
+  if (!gintptr)
+    goto err;
+  if (*gintptr != 100)
+    goto err;
+
   SILC_LOG_DEBUG(("Set global var"));
   if (!silc_global_set_var("vbuf", 10, NULL, FALSE))
     goto err;
diff --git a/lib/silcutil/unix/.gitignore b/lib/silcutil/unix/.gitignore
deleted file mode 100644 (file)
index a501f92..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-Makefile
-*.in
-*.am
-*.o
-*.lo
-*.la
-*.a
-*.pc
diff --git a/lib/silcutil/win32/.gitignore b/lib/silcutil/win32/.gitignore
deleted file mode 100644 (file)
index a501f92..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-Makefile
-*.in
-*.am
-*.o
-*.lo
-*.la
-*.a
-*.pc
index 0501ab82d12b62873471491773133528edfc6164..ee8f10d3500c6f5eb6c145a75c988ef9c353a2a4 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 1997 - 2007 Pekka Riikonen
+  Copyright (C) 1997 - 2008 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
@@ -16,9 +16,8 @@
   GNU General Public License for more details.
 
 */
-/* $Id$ */
 
-#include "silc.h"
+#include "silcruntime.h"
 
 /************************** Types and definitions ***************************/
 
index 0a0505228121172d4ecffd86fe58c0b7d5b91cfd..93b7fc64fb38caa248db1c765cd939acc5b5d50c 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 2001 - 2007 Pekka Riikonen
+  Copyright (C) 2001 - 2008 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
@@ -16,9 +16,8 @@
   GNU General Public License for more details.
 
 */
-/* $Id$ */
 
-#include "silc.h"
+#include "silcruntime.h"
 
 const SilcScheduleOps schedule_ops;
 
index 035c161809a13457d8afe2c4597448893cfef871..dd53a14c4363b4c865813d3038c3d6bac1635fb8 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 2007 Pekka Riikonen
+  Copyright (C) 2007 - 2008 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
@@ -17,7 +17,7 @@
 
 */
 
-#include "silc.h"
+#include "silcruntime.h"
 
 /************************ Static utility functions **************************/
 
index 0148a8e02b19e7f40cb7d752bdd8a9486685daf4..da2ebae5264f7bca67f4ab770bc85a88b3147048 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 2001 - 2007 Pekka Riikonen
+  Copyright (C) 2001 - 2008 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
@@ -16,9 +16,8 @@
   GNU General Public License for more details.
 
 */
-/* $Id$ */
 
-#include "silc.h"
+#include "silcruntime.h"
 
 #define FILETIME_1970 0x019db1ded53e8000
 const BYTE DWLEN = sizeof(DWORD) * 8;
diff --git a/lib/srt.pc.in b/lib/srt.pc.in
new file mode 100644 (file)
index 0000000..69620a5
--- /dev/null
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: @PACKAGE@
+Description: SILC Runtime Toolkit
+Version: @VERSION@
+Libs: -L${libdir} -lsrt @LIBS@
+Cflags: -I${includedir}
index ea620ba88ca591efd56cef6a895c82f8c2b52b45..ddfabba9f5f5038eb39342dd8f1f41bd192f475e 100644 (file)
@@ -1,44 +1,44 @@
-Summary: SILC Toolkit
-Name: silc-toolkit
+Summary: SILC Runtime Toolkit
+Name: srt
 Version: SILC_VERSION
 Release: SILC_RELEASE
 License: GPL/BSD dual licensed
 Group: System Environment/Libraries
 URL: http://silcnet.org/
-Source0: silc-toolkit-%{version}.tar.gz
+Source0: srt-%{version}.tar.gz
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
 BuildRequires: pkgconfig
-Obsoletes: libsilc
-Obsoletes: libsilc-devel
-Obsoletes: libsilc-doc
-Provides: libsilc
-Provides: libsilc-devel
-Provides: libsilc-doc
 Epoch: 0
 
 %description
-SILC Toolkit providing SILC Protocol Core Library, SILC Client Library,
-runtime library and many other libraries.  SILC Toolkit enables SILC
-application development.  SILC (Secure Internet Live Conferencing) is a
-secure conferencing protocol.
+SILC Runtime Toolkit provides a full featured runtime library for
+applications.  It provides the application's main loop, threads, locks,
+file utilities, file streams, socket streams, TCP and UDP network routines,
+a finite state machine, lists, a hash table, UTF-8 routines and other string
+utilities, and many other utility routines.  The library works on multiple
+platforms.
 
 %package devel
 Group: Development/Libraries
-Summary: SILC Toolkit providing headers, libraries and documentation
-Requires: silc-toolkit = %{epoch}:%{version}-%{release}
+Summary: SILC Runtime Toolkit providing headers, libraries and documentation
+Requires: srt = %{epoch}:%{version}-%{release}
 Requires: pkgconfig
 
 %description devel
-The SILC Toolkit development libraries, headers and documentation.  SILC
-Toolkit enables SILC application development.
+SILC Runtime Toolkit development libraries, headers and documentation.
+SILC Runtime Toolkit provides a full featured runtime library for
+applications.  It provides the application's main loop, threads, locks,
+file utilities, file streams, socket streams, TCP and UDP network routines,
+a finite state machine, lists, a hash table, UTF-8 routines and other string
+utilities, and many other utility routines.  The library works on multiple
+platforms.
 
 %prep
-%setup -q -n silc-toolkit-%{version}
+%setup -q -n srt-%{version}
 
 %build
 %configure --libdir=%{_libdir} \
-           --includedir=%{_includedir}/silc \
-           --with-simdir=%{_libdir}/silc/modules \
+           --includedir=%{_includedir}/srt \
            --docdir=%{_docdir}/%{name}-%{version}
 make -j4
 
@@ -46,7 +46,6 @@ make -j4
 rm -rf $RPM_BUILD_ROOT
 make DESTDIR=$RPM_BUILD_ROOT install
 chmod 0755 ${RPM_BUILD_ROOT}%{_libdir}/lib*
-chmod 0755 ${RPM_BUILD_ROOT}%{_libdir}/silc/modules/*.so
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -57,51 +56,20 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(0755, root, root, 0755)
-%{_libdir}/libsilc-1.1.so*
-%{_libdir}/libsilcclient-1.1.so*
-%dir %_libdir/silc
-%dir %_libdir/silc/modules
-%{_libdir}/silc/modules/*.so
+%{_libdir}/libsrt-1.2.so*
+%dir %_libdir/srt
 %defattr(0644, root, root, 0755)
 %doc CHANGES COPYING GPL BSD
 
 %files devel
 %defattr(0644, root, root, 0755)
-%doc CHANGES COPYING GPL BSD doc/toolkit
-%{_libdir}/libsilc.so
-%{_libdir}/libsilc.*a
-%{_libdir}/libsilcclient.so
-%{_libdir}/libsilcclient.*a
-%{_libdir}/pkgconfig/silc.pc
-%{_libdir}/pkgconfig/silcclient.pc
-%dir %_includedir/silc
-%{_includedir}/silc/*.h
+%doc CHANGES COPYING GPL BSD doc/runtime
+%{_libdir}/libsrt.so
+%{_libdir}/libsrt.*a
+%{_libdir}/pkgconfig/srt.pc
+%dir %_includedir/srt
+%{_includedir}/srt/*.h
 
 %changelog
-* Wed May 30 2007 Pekka Riikonen <priikone@silcnet.org>
-- Rewrote .spec for SILC Toolkit 1.1.  Obsoletes libsilc.  Renamed to
-  silc-toolkit.
-
-* Tue Sep 1 2004 Toni Willberg <toniw@iki.fi>
-- 0.9.12-0.fdr.6 - Had to remove smp_mflags because build fails with them
-  (Michael Schwendt)
-
-* Tue Aug 31 2004 Toni Willberg <toniw@iki.fi>
-- 0.9.12-0.fdr.5 - corrections to lib and include path (from Michael Schwendt)
-
-* Tue Aug 31 2004 Toni Willberg <toniw@iki.fi>
-- 0.9.12-0.fdr.4 - post/postun /sbin/ldconfig
-  (Patch 823 from Stu Tomlinson)
-
-* Tue Aug 31 2004 Toni Willberg <toniw@iki.fi>
-- 0.9.12-0.fdr.3 - Move libs to %{_libdir} and add a silc.pc
-  (Patch 815 from Stu Tomlinson)
-
-* Tue Aug 17 2004 Toni Willberg <toniw@iki.fi>
-- fix so permissions and hardcoded paths (patch from Michael Schwendt)
-
-* Mon Jul 5 2004 Toni Willberg <toniw@iki.fi>
-- Fixed various errors
-
-* Sun Jul 4 2004 Toni Willberg <toniw@iki.fi>
+* Sun Jan 27 2008 Pekka Riikonen <priikone@silcnet.org>
 - Initial version for Fedora
index 26d56ef49ad0dedeebcda50c7e3f830286575a9b..5f4949c9297cfeab2bab722ad21370c13fbeacd2 100644 (file)
@@ -21,8 +21,7 @@ AUTOMAKE_OPTIONS = 1.0 no-dependencies foreign
 SUBDIRS =
 
 EXTRA_DIST =                                   \
-       silcdefs.h silc.dsw copy_dll            \
-       tests all.dsp clean_dist.pl README      \
-       libsilc_static
+       silcdefs.h *.dsw copy_dll               \
+       tests *.dsp clean_dist.pl README
 
 include $(top_srcdir)/Makefile.defines.in
index 658f9c229f08913cbf43dac64b73e4a9d6f3e60a..8cb80c60166d4714db73e53b8dbb9d84b1f1d36e 100644 (file)
@@ -1,12 +1,10 @@
-Compiling SILC Toolkit for Win32
-================================
+Compiling SILC Runtime Toolkit for Win32
+========================================
 
-- The MSVC++ 6.0 is required to compile the SILC Toolkit.
+- The MSVC++ 6.0 or newer is required to compile the SILC Runtime Toolkit.
 
-- Load the silc.dsw workspace file and build the libsilc and
-  libsilcclient libraries.  Both Debug and Release versions can
-  be compiled.
+- Load the srt.dsw workspace file and build all versions of the Toolkit.
 
-- The include/ directory includes all include files from the
-  SILC Toolkit.  Use that directory as your include source for
-  SILC include files when you are programming new application.
+- The include/ directory includes all include files from the SILC Runtime
+  Toolkit.  Use that directory as your include source for when programming 
+  new application.
similarity index 100%
rename from win32/silc.dsw
rename to win32/srt.dsw