fdoc

subroutineunit_bodyprivate

subroutine unit_body(site, id, b)

Write what is specific to a module, submodule, program or block data unit.

Arguments

NameTypeIntentAttributesDescription
sitetype(site_t)in

the site

idintegerin

the unit

btype(buffer_t)inout

the HTML

Calls

Source

Show the code
subroutine unit_body(site, id, b)
    type(site_t), intent(in) :: site        !! the site
    integer, intent(in) :: id               !! the unit
    type(buffer_t), intent(inout) :: b      !! the HTML
    integer :: k

    associate (e => site%p%list%box(id)%e)
        if (e%kind == E_SUBMODULE) then
            call add(b, '<div class="meta"><span>submodule of ')
            call link_to(site, e%ancestor_id, e%more%ancestor, b)
            call add(b, '</span></div>'//achar(10))
        end if
        call uses_section(site, id, b)
        if (allocated(e%more%descendants)) then
            call add(b, '<h2 id="submodules">Submodules</h2>'//achar(10)//'<ul class="chips">')
            do k = 1, size(e%more%descendants)
                call add(b, '<li>')
                call link_to(site, e%more%descendants(k), site%p%list%box(e%more%descendants(k))%e%name, b)
                call add(b, '</li>')
            end do
            call add(b, '</ul>'//achar(10))
        end if
        if (e%kind == E_PROGRAM) call calls_section(site, id, b)
    end associate
end subroutine unit_body

Graphs

Calls

Called by