|
|
|
@ -212,6 +212,27 @@ SECTIONPTR SectionStoreSectionAt(SECTIONSTOREPTR abstractSectionStore, ULONG ind |
|
|
|
|
return result;
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
StringArray SectionStoreSubsectionsForSection(SECTIONSTOREPTR abstractSectionStore, CONST_STRPTR primarySection) |
|
|
|
|
{ |
|
|
|
|
struct SectionStore* store = (struct SectionStore*)abstractSectionStore; |
|
|
|
|
StringArray result = StringArrayNew(); |
|
|
|
|
ULONG index = 0; |
|
|
|
|
|
|
|
|
|
for( index = 0; index < SizeOfArray(store->array); index++) |
|
|
|
|
{ |
|
|
|
|
SECTIONPTR section = SectionArrayValues(store->array)[index]; |
|
|
|
|
if( SectionHasName(section, primarySection) ) |
|
|
|
|
{ |
|
|
|
|
CONST_STRPTR secondary = SectionGetRawSubsectionName(section); |
|
|
|
|
if( secondary != NULL && strlen(secondary) > 0 ) |
|
|
|
|
{ |
|
|
|
|
StringArrayAppendAndRetain(result, secondary); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
SECTIONPTR SectionStoreFindOrCreateSection(SECTIONSTOREPTR sectionStore, CONST_STRPTR compoundKey) |
|
|
|
|
{ |
|
|
|
|
// now get the section
|
|
|
|
|