subroutineread_sourceprivate
subroutine read_source(s, path, raw, text)
Read source file path, warning if that fails.
Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
| s | type(settings_t) | in | the settings | |
| path | character(len=*) | in | the file | |
| raw | character(len=:) | out | allocatable | the file as it is |
| text | character(len=:) | out | allocatable | the text to parse |
Calls
Source
Show the code
subroutine read_source(s, path, raw, text)
type(settings_t), intent(in) :: s !! the settings
character(len=*), intent(in) :: path !! the file
character(len=:), allocatable, intent(out) :: raw !! the file as it is
character(len=:), allocatable, intent(out) :: text !! the text to parse
character(len=:), allocatable :: msg
integer :: ios
call load_source(s, path, raw, text, ios, msg)
if (ios /= 0) then
call warn('could not read '//path//': '//msg)
text = ''
raw = ''
end if
end subroutine read_source