fdoc

subroutineread_sourceprivate

subroutine read_source(s, path, raw, text)

Read source file path, warning if that fails.

Arguments

NameTypeIntentAttributesDescription
stype(settings_t)in

the settings

pathcharacter(len=*)in

the file

rawcharacter(len=:)outallocatable

the file as it is

textcharacter(len=:)outallocatable

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

Graphs

Calls

Called by