fdoc

subroutinebinding_descriptionprivate

subroutine binding_description(site, id, b)

Write the documentation of binding id, or else the summary of the one procedure it binds to.

Arguments

NameTypeIntentAttributesDescription
sitetype(site_t)in

the site

idintegerin

the binding

btype(buffer_t)inout

the HTML

Calls

Called by

Source

Show the code
subroutine binding_description(site, id, b)
    type(site_t), intent(in) :: site        !! the site
    integer, intent(in) :: id               !! the binding
    type(buffer_t), intent(inout) :: b      !! the HTML
    integer :: target

    associate (t => site%p%list%box(id)%e)
        if (allocated(t%html)) then
            if (len(t%html) > 0) then
                call add(b, t%html)
                return
            end if
        end if
        if (t%generic .or. t%deferred .or. .not. allocated(t%more%binding_ids)) return
        if (size(t%more%binding_ids) /= 1) return
        target = t%more%binding_ids(1)
        if (target == 0) return
        if (.not. is_shown(site%p%list, target)) return
        if (allocated(site%p%list%box(target)%e%summary)) call add(b, site%p%list%box(target)%e%summary)
    end associate
end subroutine binding_description