#include "sectionarray.h" #include #include #define SIZE_APTR 2 SectionArray SectionArrayNew(VOID) { return NewArray(SIZE_APTR); } VOID SectionArrayAppend(SectionArray array, SECTIONPTR value) { AppendToArray(SECTIONPTR, array, value); } VOID SectionArrayFree(SectionArray array, BOOL freeSections) { if( array != NULL ) { if( freeSections == TRUE ) { SectionArrayForEach(array, SectionFree(aSection);); } DeleteArray(array); } } SECTIONPTR* SectionArrayValues(SectionArray array) { return ArrayValues(SECTIONPTR, array); } VariableArray VariableArrayNew(VOID) { return NewArray(SIZE_APTR); } VOID VariableArrayAppend(VariableArray array, VARIABLEPTR value) { AppendToArray(VARIABLEPTR, array, value); } VOID VariableArrayFree(VariableArray array, BOOL freeVars) { if( array != NULL ) { if( freeVars == TRUE ) { VariableArrayForEach(array, VariableFree(aVariable);); } DeleteArray(array); } } VARIABLEPTR* VariableArrayValues(VariableArray array) { return ArrayValues(VARIABLEPTR, array); }