fdoc

subroutinecalls_sectionprivate

subroutine calls_section(site, id, heading, b)

Write what a procedure calls.

Arguments

NameTypeIntentAttributesDescription
sitetype(site_t)in

the site

idintegerin

the procedure

headinglogicalin

true to write the heading too

btype(buffer_t)inout

the HTML

Calls

Called by

Source

Show the code
subroutine calls_section(site, id, heading, b)
    type(site_t), intent(in) :: site        !! the site
    integer, intent(in) :: id               !! the procedure
    logical, intent(in) :: heading          !! true to write the heading too
    type(buffer_t), intent(inout) :: b      !! the HTML
    integer :: k

    associate (e => site%p%list%box(id)%e)
        if (.not. allocated(e%call_ids)) return
        if (size(e%call_ids) == 0) return
        if (heading) call add(b, '<h2 id="calls">Calls</h2>'//achar(10))
        call add(b, '<ul class="chips">')
        do k = 1, size(e%call_ids)
            call add(b, '<li>')
            call link_to(site, e%call_ids(k), site%p%list%box(e%call_ids(k))%e%name, b)
            call add(b, '</li>')
        end do
        call add(b, '</ul>'//achar(10))
    end associate
end subroutine calls_section