qse/ase/lsp/array.h

36 lines
775 B
C
Raw Normal View History

2005-02-04 15:39:11 +00:00
/*
2005-09-18 08:10:50 +00:00
* $Id: array.h,v 1.5 2005-09-18 08:10:50 bacon Exp $
2005-02-04 15:39:11 +00:00
*/
2005-05-28 13:34:26 +00:00
#ifndef _XP_LSP_ARRAY_H_
#define _XP_LSP_ARRAY_H_
2005-02-04 15:39:11 +00:00
2005-02-04 16:00:37 +00:00
#include <xp/types.h>
2005-02-04 15:39:11 +00:00
2005-09-18 08:10:50 +00:00
struct xp_lsp_array_t
2005-05-28 13:34:26 +00:00
{
2005-02-04 15:39:11 +00:00
void** buffer;
xp_size_t size;
xp_size_t capacity;
};
2005-09-18 08:10:50 +00:00
typedef struct xp_lsp_array_t xp_lsp_array_t;
2005-02-04 15:39:11 +00:00
#ifdef __cplusplus
extern "C" {
#endif
2005-09-18 08:10:50 +00:00
xp_lsp_array_t* xp_lsp_array_new (xp_size_t capacity);
void xp_lsp_array_free (xp_lsp_array_t* array);
int xp_lsp_array_add_item (xp_lsp_array_t* array, void* item);
int xp_lsp_array_insert (xp_lsp_array_t* array, xp_size_t index, void* value);
void xp_lsp_array_delete (xp_lsp_array_t* array, xp_size_t index);
void xp_lsp_array_clear (xp_lsp_array_t* array);
void** xp_lsp_array_yield (xp_lsp_array_t* array, xp_size_t capacity);
2005-02-04 15:39:11 +00:00
#ifdef __cplusplus
}
#endif
#endif