This commit is contained in:
2008-08-06 07:30:10 +00:00
parent 961c493986
commit 5cc0d3bc1f
2 changed files with 76 additions and 0 deletions

48
ase/include/ase/cmn/sll.h Normal file
View File

@ -0,0 +1,48 @@
/*
* $Id: map.h 223 2008-06-26 06:44:41Z baconevi $
*
* {License}
*/
#ifndef _ASE_CMN_SLL_H_
#define _ASE_CMN_SLL_H_
#include <ase/types.h>
#include <ase/macros.h>
/*
* Singly Linked List
*/
typedef struct ase_sll_t ase_sll_t;
struct ase_sll_t
{
/* map owner. passed to freeval and sameval as the first argument */
void* owner;
ase_sll_node_t* head;
ase_sll_node_t* tail;
ase_size_t size;
/* the mmgr pointed at by mmgr should be valid
* while the list is alive as the contents are
* not replicated */
ase_mmgr_t* mmgr;
};
#ifdef __cplusplus
extern "C" {
#endif
ase_sll_t* ase_sll_open (ase_mmgr_t* mmgr);
void ase_sll_close (ase_sll_t* sll);
void ase_sll_clear (ase_sll_t* sll);
ase_size_t ase_sll_getsize (ase_sll_t* sll);
#ifdef __cplusplus
}
#endif
#endif