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.h

25 lines
1.0 KiB

#ifndef __SECTIONARRAY_H
#define __SECTIONARRAY_H
#include "types.h"
#include <proto/containerkit.h>
#include <containerkit/array.h>
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