fdoc

modulefdoc_input

Finding, reading and preprocessing source files.

Uses

Graphs

Uses

Used by

Variables

NameTypeAttributesDefaultDescription
MAX_INCLUDE_DEPTHintegerprivateparameter32

Functions

extension_ofpureprivate

pure character(len=merge(0,len(path)-index(path,'.',back=.true.),index(path,'.',back=.true.)==0)) function extension_of(path) result(ext)

The extension of path, without the dot, or ''.

glob_matchesprivate

logical function glob_matches(pattern, path) result(matches)

True if path matches exclusion pattern, like Python's fnmatch: a * crosses /. A pattern that is not absolute may match the end of the path.

include_nameprivate

logical function include_name(line, name)

True if line is an include line, returning the file it names.

locateprivate

character(len=:) function locate(search, directory, name) result(path)

The path of include file name, or '' if it is not found.

needs_fypp

logical function needs_fypp(s, path)

True if path goes through Fypp, which is Python, so that fdoc_fypp takes its place.

preprocessor_commandprivate

character(len=:) function preprocessor_command(s, path) result(command)

The preprocessor command for path. FORD's default of pcpp is Python, so it is replaced.

runs_command

logical function runs_command(s, path)

True if reading path runs an external preprocessor.

Subroutines

expand_includesrecursive

recursive subroutine expand_includes(search, directory, text, depth)

Replace include lines in text by the files they name, found in directory or search.

find_sources

subroutine find_sources(s, files)

The source files of the project, sorted, without those excluded. Fixed-form files are left out with a warning, as they are not supported yet.

fypp_sourceprivate

subroutine fypp_source(s, path, text)

Replace text by the output of Fypp for path, or keep it if that fails.

load_source

subroutine load_source(s, path, raw, text, stat, errmsg)

Read source file path, preprocessing it if its extension calls for that. Unless that runs an external command, this can be called from parallel code.

preprocessprivate

subroutine preprocess(s, path, text)

Replace text by the output of the preprocessor for path, or keep it if that fails.