Generator/RB_Generate_Sections [ Functions ]

FUNCTION

Creates the documentation for all headers found in all source files. The order in which they are generated depends on the header hierarchy. First the top level header's documentation is generated then, the documentation for all it's childern, then the next top level header's documentation is generated. This is a recursive proces. The idea is to create something like:

     1. Parentheader1
     1.1 Child1
     1.2 Child2
     1.2.1 Child's child1
     2. Parentheader2

etc

SYNOPSIS

void RB_Generate_Sections(
    FILE *document_file,
    struct RB_Document *document )

INPUTS

SOURCE

{
    unsigned long       i;
    int                 depth = 1;
    struct RB_header   *header;

    depth = document->first_section_level;

    RB_Say( "Generating Sections\n", SAY_INFO );
    for ( i = 0; i < document->no_headers; ++i )
    {
        header = ( document->headers )[i];
        if ( header->parent )
        {
            /* This will be in one of the subsections */
        }
        else
        {
            RB_Generate_Section( document_file, header, document, depth );
        }
    }
}