1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2 /*======================================================================
4 CREATOR: Damon Chaplin 07 March 2001
7 $Id: icalarray.h,v 1.5 2008-01-15 23:17:40 dothebart Exp $
10 (C) COPYRIGHT 2001, Ximian, Inc.
12 This program is free software; you can redistribute it and/or modify
13 it under the terms of either:
15 The LGPL as published by the Free Software Foundation, version
16 2.1, available at: http://www.fsf.org/copyleft/lesser.html
20 The Mozilla Public License Version 1.0. You may obtain a copy of
21 the License at http://www.mozilla.org/MPL/
24 ======================================================================*/
32 * @brief An array of arbitrarily-sized elements which grows
33 * dynamically as elements are added.
36 typedef struct _icalarray icalarray;
38 unsigned int element_size;
39 unsigned int increment_size;
40 unsigned int num_elements;
41 unsigned int space_allocated;
47 icalarray *icalarray_new (int element_size,
49 icalarray *icalarray_copy (icalarray *array);
50 void icalarray_free (icalarray *array);
52 void icalarray_append (icalarray *array,
54 void icalarray_remove_element_at (icalarray *array,
57 void *icalarray_element_at (icalarray *array,
60 void icalarray_sort (icalarray *array,
61 int (*compare) (const void *, const void *));
64 #endif /* ICALARRAY_H */