|
|
|
@ -192,12 +192,16 @@ VOID LineDump(LINEPTR abstractLine) |
|
|
|
|
else if( line->variable == NULL && line->section != NULL ) |
|
|
|
|
{ |
|
|
|
|
struct Section* section = (struct Section*)LineGetSection(abstractLine); |
|
|
|
|
CONST_STRPTR canonical = NULL; |
|
|
|
|
Printf("(new section %s", section->primary); |
|
|
|
|
if( section->secondary ) |
|
|
|
|
{ |
|
|
|
|
Printf("[%s]", section->secondary); |
|
|
|
|
} |
|
|
|
|
Printf(")\n"); |
|
|
|
|
canonical = SectionCanonicalName(section); |
|
|
|
|
Printf("...((%s))...\n", canonical); |
|
|
|
|
FreeVec((STRPTR)canonical); |
|
|
|
|
} |
|
|
|
|
else
|
|
|
|
|
{ |
|
|
|
@ -350,6 +354,31 @@ VOID SectionFree(SECTIONPTR abstractSection) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
CONST_STRPTR SectionCanonicalName(SECTIONPTR abstractSection) |
|
|
|
|
{ |
|
|
|
|
struct Section* section = (struct Section*)abstractSection; |
|
|
|
|
STRPTR result = NULL; |
|
|
|
|
if(section != NULL) |
|
|
|
|
{ |
|
|
|
|
ULONG primaryLength = 0; |
|
|
|
|
ULONG secondaryLength = 0; |
|
|
|
|
if(section->primary != NULL) |
|
|
|
|
{ |
|
|
|
|
primaryLength = strlen(section->primary); |
|
|
|
|
} |
|
|
|
|
if(section->secondary != NULL) |
|
|
|
|
{ |
|
|
|
|
secondaryLength = strlen(section->secondary); |
|
|
|
|
} |
|
|
|
|
result = AllocVec(primaryLength+1+secondaryLength+1, MEMF_CLEAR); |
|
|
|
|
CopyMem(section->primary, result, primaryLength); |
|
|
|
|
result[primaryLength] = '.'; |
|
|
|
|
CopyMem(section->secondary, result+primaryLength+1, secondaryLength);
|
|
|
|
|
} |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
VARIABLEPTR VariableCreate(CONST_STRPTR key, CONST_STRPTR rawValue) |
|
|
|
|
{ |
|
|
|
|
struct Variable* result = NULL; |
|
|
|
|