#ifndef __SECTIONARRAY_H #define __SECTIONARRAY_H #include "types.h" #include #include SectionArray SectionArrayNew(VOID); VOID SectionArrayAppend(SectionArray array, SECTIONPTR value); VOID SectionArrayFree(SectionArray array, BOOL freeSections); SECTIONPTR* SectionArrayValues(SectionArray array); #define SectionArrayForEach(array, block) do {SECTIONPTR *afe_123_p = (*(SECTIONPTR **)array); SECTIONPTR aSection = *afe_123_p; int afe_123_c = (((ULONG *)array)[1]);\ for (; afe_123_c--; aSection = *(++afe_123_p)) block} while (0); VariableArray VariableArrayNew(VOID); VOID VariableArrayAppend(VariableArray array, VARIABLEPTR value); VOID VariableArrayFree(VariableArray array, BOOL freeVars); VARIABLEPTR* VariableArrayValues(VariableArray array); #define VariableArrayForEach(array, block) do {VARIABLEPTR *afe_123_p = (*(VARIABLEPTR **)array); SECTIONPTR aVariable = *afe_123_p; int afe_123_c = (((ULONG *)array)[1]);\ for (; afe_123_c--; aVariable = *(++afe_123_p)) block} while (0); #endif