subroutinefile_bodyprivate
subroutine file_body(site, id, b)
Write what is specific to a source file.
Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
| site | type(site_t) | in | the site | |
| id | integer | in | the file | |
| b | type(buffer_t) | inout | the HTML |
Calls
Source
Show the code
subroutine file_body(site, id, b)
type(site_t), intent(in) :: site !! the site
integer, intent(in) :: id !! the file
type(buffer_t), intent(inout) :: b !! the HTML
integer, allocatable :: units(:)
integer :: k
associate (e => site%p%list%box(id)%e)
allocate (units(0))
do k = 1, size(e%children)
associate (c => site%p%list%box(e%children(k))%e)
select case (c%kind)
case (E_MODULE, E_SUBMODULE, E_PROGRAM, E_BLOCKDATA, E_SUBROUTINE, E_FUNCTION)
call push_int(units, e%children(k))
end select
end associate
end do
call summary_section(site, 'Contents', units, b)
if (site%s%incl_src .and. allocated(e%source_text)) then
call add(b, '<h2 id="source">Source</h2>'//achar(10)//'<pre class="source"><code>')
call highlight_fortran(e%source_text, b, .true.)
call add(b, '</code></pre>'//achar(10))
end if
end associate
end subroutine file_body