Generator/RB_Generate_SingleDoc [ Functions ]
FUNCTION
Create documentation by creating a single file for all individual source file that were scanned.
This function is called when the option --singledoc is used. Based on whether the option --sections is used this function then calls RB_Generate_Sections or RB_Generate_Part
SYNOPSIS
void RB_Generate_SingleDoc( struct RB_Document *document )
INPUTS
document -- pointer to the RB_Document structure.
SOURCE
{ FILE *document_file; struct RB_Part *i_part; RB_Document_Collect_Headers( document ); if ( document->actions.do_nosort ) { /* Nothing */ } else { RB_Document_Sort_Headers( document ); } RB_Document_Link_Headers( document ); RB_Fill_Header_Filename( document ); RB_Name_Headers( document->headers, document->no_headers ); RB_Sort_Items( document->headers, document->no_headers ); RB_CollectLinks( document, document->headers, document->no_headers ); for ( i_part = document->parts; i_part != NULL; i_part = i_part->next ) { RB_Set_FullDocname( i_part->filename, document->singledoc_name ); } if ( output_mode == HTML ) { RB_Create_CSS( document ); } document_file = RB_Open_SingleDocumentation( document ); assert( document->parts->filename->name ); RB_Generate_Doc_Start( document, document_file, document->srcroot->name, document->singledoc_name, 1, document->singledoc_name, document->charset ); if ( ( document->actions.do_toc ) && document->no_headers ) { RB_Generate_TOC_2( document_file, document->headers, document->no_headers, NULL, document->parts->filename->name ); } if ( document->actions.do_sections ) { RB_Generate_Sections( document_file, document ); } else { for ( i_part = document->parts; i_part != NULL; i_part = i_part->next ) { RB_Generate_Part( document_file, document, i_part ); } } RB_Generate_Doc_End( document_file, "singledoc", document->srcroot->name ); fclose( document_file ); RB_Free_Links( ); }