fdoc

subroutinelist_columnsprivate

subroutine list_columns(site, which, id, b)

Write the columns of a list page between the name and the description.

Arguments

NameTypeIntentAttributesDescription
sitetype(site_t)in

the site

whichintegerin

the list

idintegerin

the entity

btype(buffer_t)inout

the HTML

Calls

Source

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

    associate (e => site%p%list%box(id)%e)
        select case (which)
        case (LIST_MODULES, LIST_PROGRAMS, LIST_BLOCKDATA)
            call location(e%file)
        case (LIST_PROCEDURES)
            call location(e%parent)
            call add(b, '<td>')
            select case (e%kind)
            case (E_SUBROUTINE, E_FUNCTION)
                if (e%iface /= IFACE_NONE) then
                    call badge('interface', b)
                else
                    call badge(merge('function  ', 'subroutine', e%kind == E_FUNCTION), b)
                end if
            case (E_INTERFACE)
                call badge('interface', b)
            case default
                call badge('procedure', b)
            end select
            call procedure_badges(e, b)
            call add(b, '</td>')
        case (LIST_ABSINT, LIST_NAMELISTS)
            call location(e%parent)
        case (LIST_TYPES)
            call location(e%parent)
            call add(b, '<td class="link">')
            if (allocated(e%more%extends)) call link_to(site, e%extends_id, e%more%extends, b)
            call add(b, '</td>')
        end select
    end associate

contains

    !> Write a column linking to entity `where`.
    subroutine location(where)
        integer, intent(in) :: where    !! the entity

        call add(b, '<td class="link">')
        if (where > 0) call link_to(site, where, display_name(site%p%list%box(where)%e), b)
        call add(b, '</td>')
    end subroutine location

end subroutine list_columns

Graphs

Calls

Called by