subroutinewrite_call_forms
subroutine write_call_forms(list, name, specifics, b, shown)
Write the call forms of generic name, if it has more than one specific procedure. shown says
whether anything was written.
Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
| list | type(entity_list_t) | in | the entities | |
| name | character(len=*) | in | the generic | |
| specifics | integer | in | dimension(:) | its specific procedures |
| b | type(buffer_t) | inout | the HTML | |
| shown | logical | out | whether anything was written |
Calls
Source
Show the code
subroutine write_call_forms(list, name, specifics, b, shown)
type(entity_list_t), intent(in) :: list !! the entities
character(len=*), intent(in) :: name !! the generic
integer, intent(in) :: specifics(:) !! its specific procedures
type(buffer_t), intent(inout) :: b !! the HTML
logical, intent(out) :: shown !! whether anything was written
type(string_t), allocatable :: keys(:)
integer, allocatable :: form_of(:)
logical, allocatable :: usable(:)
character(len=:), allocatable :: key
integer :: k, j, forms
shown = .false.
allocate (keys(size(specifics)), form_of(size(specifics)), usable(size(specifics)))
do k = 1, size(specifics)
usable(k) = allocated(list%box(specifics(k))%e%more%arg_ids)
end do
if (count(usable) < 2) return
shown = .true.
forms = 0
form_of = 0
do k = 1, size(specifics)
if (.not. usable(k)) cycle
call form_key(list, specifics(k), key)
do j = 1, forms
if (keys(j)%s == key) form_of(k) = j
end do
if (form_of(k) == 0) then
forms = forms + 1
keys(forms)%s = key
form_of(k) = forms
end if
end do
call add(b, '<h2 id="call-forms">Call forms</h2>'//achar(10))
do j = 1, forms
call write_form(list, name, pack(specifics, form_of == j), b)
end do
end subroutine write_call_forms