20 lines
498 B
C
20 lines
498 B
C
#ifndef CIETER_DYNARRAY
|
|
#define CIETER_DYNARRAY
|
|
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
|
|
typedef struct dyn_array CieterDynArray;
|
|
|
|
CieterDynArray *cieter_dynarray_init(size_t initial_capacity);
|
|
void cieter_dynarray_add(CieterDynArray *da, const char * s);
|
|
void cieter_dynarray_free(CieterDynArray *da);
|
|
|
|
/**
|
|
* Convert a DynArray into an array by freeing all its surrounding components
|
|
* and returning the underlying array pointer.
|
|
*/
|
|
char **cieter_dynarray_convert(CieterDynArray *da);
|
|
|
|
#endif
|