summaryrefslogtreecommitdiff
path: root/doc/cha-library.texi
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2011-06-28 14:10:11 +0300
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2011-07-23 14:10:59 +0200
commite9dd3e14c75769e326331ee9d8a83f3e604dc215 (patch)
tree5db04e88a2f0082abbe5e6b7122b42aa712ce52c /doc/cha-library.texi
parent6f292254cd91e4c6a2e489e327b106d766d933a7 (diff)
downloadgnutls-e9dd3e14c75769e326331ee9d8a83f3e604dc215.tar.gz
updated function listing.
Diffstat (limited to 'doc/cha-library.texi')
-rw-r--r--doc/cha-library.texi30
1 files changed, 11 insertions, 19 deletions
diff --git a/doc/cha-library.texi b/doc/cha-library.texi
index 74865237fa..4568acb0c9 100644
--- a/doc/cha-library.texi
+++ b/doc/cha-library.texi
@@ -159,24 +159,27 @@ operating system provided locks (i.e. @code{pthreads} on GNU/Linux and
the function @funcref{gnutls_global_set_mutex} before calling @funcref{gnutls_global_init}.
Setting manually mutexes is recommended
only to applications that have full control of the underlying libraries. If this
-is not the case, the use of the operating system defaults is suggested.
+is not the case, the use of the operating system defaults is recommended. Examples
+are shown below.
-There are helper macros to help you properly initialize the libraries.
-Examples are shown in the following paragraphs.
-
-@subsection Native threads
@example
#include <gnutls.h>
+/* Native threads
+ */
+
int main()
@{
gnutls_global_init();
@}
@end example
-@subsection Other thread packages
@example
+#include <gnutls.h>
+
+/* Other thread packages
+ */
int main()
@{
@@ -198,23 +201,12 @@ An example of this type of functions are the push and pull callbacks
which are used to specify the functions that will retrieve and send
data to the transport layer.
-@itemize
-
-@item @funcref{gnutls_transport_set_push_function}
-
-@item @funcref{gnutls_transport_set_pull_function}
-
-@end itemize
+@showfuncB{gnutls_transport_set_push_function,gnutls_transport_set_pull_function}
Other callback functions may require more complicated input and data
to be allocated. Such an example is
@funcref{gnutls_srp_set_server_credentials_function}.
All callbacks should allocate and free memory using the functions shown below.
-@itemize
-
-@item @funcref{gnutls_malloc}
-
-@item @funcref{gnutls_free}
+@showfuncB{gnutls_malloc,gnutls_free}
-@end itemize