encap_list_prev man page on DragonFly

Man page or keyword search:  
man Server   44335 pages
apropos Keyword Search (all sections)
Output format
DragonFly logo
[printable version]

encap_list_new(3)		C Library Calls		     encap_list_new(3)

NAME
       encap_list_new,	 encap_list_free,   encap_list_next,  encap_list_prev,
       encap_list_add,	encap_list_del,	  encap_list_search,   encap_list_dup,
       encap_list_merge, encap_list_add_str - linked list routines

SYNOPSIS
       #include <encap.h>

       encap_list_t *encap_list_new(int flags, int (*cmpfunc)());
       void encap_list_free(encap_list_t *l, void (*freefunc)());
       int encap_list_add_str(encap_list_t *l, char *str, char *delim);
       int encap_list_add(encap_list_t *l, void *data);
       void encap_list_del(encap_list_t *l, encap_node_t **n);
       int  encap_list_search(encap_list_t  *l,	 encap_node_t **n, void *data,
       int (*matchfunc)());
       int encap_list_next(encap_list_t *l, encap_node_t **n);
       int encap_list_prev(encap_list_t *l, encap_node_t **n);
       encap_list_t *encap_list_dup(encap_list_t *l);
       encap_list_t    *encap_list_merge(int	(*cmpfunc)(),	 int	flags,
       encap_list_t *list1, encap_list_t *list2);

DESCRIPTION
       The  encap_list_new()  function creates a new list.  The flags argument
       must be one of the following values:

       LIST_USERFUNC
	      The cmpfunc argument points to a	user-supplied  function	 which
	      determines the ordering of the list.

       LIST_STACK
	      Use the list as a stack.	New elements are added to the front of
	      the list.

       LIST_QUEUE
	      Use the list as a queue.	New elements are added to the  end  of
	      the list.

       The  encap_list_free()  function deallocates all memory associated with
       the list l.  If freefunc is not NULL, it is called to free memory asso‐
       ciated with each node in the list.

       The  encap_list_add()  function	adds the element pointed to by data to
       the list l.  The position of the new element will be determined by  the
       flags passed to encap_list_new() when the list was created.

       The  encap_list_add_str()  function  tokenizes the string str using the
       delimiter characters in the string delim.   The	resulting  tokens  are
       added to list l using encap_list_add().

       The  encap_list_search() function searches for an element which matches
       data using the matching function matchfunc.  If matchfunc  is  NULL,  a
       default	matching function designed for ASCII strings is used.  Search‐
       ing begins from the node pointed to by n.

       The encap_list_del() function removes the entry pointed to  by  n  from
       the list pointed to by l.

       The encap_list_dup() function creates a copy of the list l using dynam‐
       ically allocated memory.

       The encap_list_merge() function creates a new list with flags and  cmp‐
       func,  in  the same way as encap_list_new().  It then adds all elements
       from list1 and list2 using encap_list_add().

RETURN VALUE
       The encap_list_new(), encap_list_dup(),	and  encap_list_merge()	 func‐
       tions return a pointer to the new list structure, or NULL on error.

       The encap_list_next(), encap_list_prev(), and encap_list_search() func‐
       tions return 1 when valid data is returned, or 0 otherwise.

       The encap_list_add() and encap_list_add_str()  functions	 return	 0  on
       success, or -1 on error.

SEE ALSO
       encap_hash_new(3)

University of Illinois		   Jan 2000		     encap_list_new(3)
[top]

List of man pages available for DragonFly

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net