fdoc

subroutineunit_and_fileprivate

subroutine unit_and_file(site, id, b)

Write the unit that holds entity id, and its file, as links.

Arguments

NameTypeIntentAttributesDescription
sitetype(site_t)in

the site

idintegerin

the entity

btype(buffer_t)inout

the HTML

Calls

Called by

Source

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

    unit = site%p%list%box(id)%e%parent
    if (unit <= 0) return
    if (site%p%list%box(unit)%e%kind == E_SUBMODULE) call add(b, 'submodule ')
    call link_to(site, unit, site%p%list%box(unit)%e%name, b)
    associate (file => site%p%list%box(id)%e%file)
        if (file > 0) then
            call add(b, ' (')
            call link_to(site, file, display_name(site%p%list%box(file)%e), b)
            call add(b, ')')
        end if
    end associate
end subroutine unit_and_file