X-Git-Url: http://git.silcnet.org/gitweb/?p=silc.git;a=blobdiff_plain;f=lib%2Fsilcutil%2Fsilclist.h;h=66efd22fa7dd8667df1280a8ccff30a06e0464bc;hp=81ea3638bd8a468c9a4501c9eb55c1e353c9932c;hb=30b8fb532138b2d9b523d3c069724e78fb72f8e3;hpb=2ce87b35c8d2512a67ba6d1159fd5ecafeb67b6f diff --git a/lib/silcutil/silclist.h b/lib/silcutil/silclist.h index 81ea3638..66efd22f 100644 --- a/lib/silcutil/silclist.h +++ b/lib/silcutil/silclist.h @@ -21,12 +21,25 @@ * * DESCRIPTION * - * Implementation of the SilcList interface. This interface provides - * simple linked list. This interface does not allocate any memory. + * Generic list interface that can turn any structure with list pointers + * into a SilcList. The interface can provide both singly and doubly linked + * lists. The interface does not allocate any memory. * * SILC List is not thread-safe. If the same list context must be used * in multithreaded environment concurrency control must be employed. * + * EXAMPLE + * + * struct EntryStruct { + * char *dummy; + * struct EntryStruct *next; // The list member pointer + * }; + * + * SilcList list; + * + * // Initialize list + * silc_list_init(list, struct EntryStruct, next); + * ***/ #ifndef SILCLIST_H