You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
configreader/containers/sectionarray.c

28 lines
515 B

#include "sectionarray.h"
#include <proto/exec.h>
#include <string.h>
Array SectionArrayNew(VOID)
{
#define SIZE_STRPTR 2
return NewArray(SIZE_STRPTR);
}
VOID SectionArrayAppend(SectionArray array, SECTIONPTR value)
{
AppendToArray(CONST_STRPTR, array, value);
}
VOID SectionArrayFree(SectionArray array)
{
if( array != NULL )
{
SectionArrayForEach(array, SectionFree(aSection););
DeleteArray(array);
}
}
SECTIONPTR* SectionArrayValues(SectionArray array)
{
return ArrayValues(SECTIONPTR, array);
}