subroutinelogo_nameprivate
subroutine logo_name(s, name)
The name in the site of the file of the logo setting: logo, with its extension, or '' if there
is no such file.
Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
| s | type(settings_t) | in | the settings | |
| name | character(len=:) | out | allocatable | the name |
Calls
Source
Show the code
subroutine logo_name(s, name)
type(settings_t), intent(in) :: s !! the settings
character(len=:), allocatable, intent(out) :: name !! the name
logical :: found
integer :: at
name = ''
if (.not. allocated(s%logo)) return
!$omp critical (file_io)
inquire (file=s%logo, exist=found)
!$omp end critical (file_io)
if (.not. found) return
at = max(index(s%logo, '.', back=.true.), last_separator(s%logo) + 1)
name = 'logo'//s%logo(at:)
if (index(name, '.') == 0) name = 'logo'
end subroutine logo_name