| Procedure | Location | Procedure Type | Description |
|---|---|---|---|
| absolute_path | ffmt_fs | Function |
|
| add | ffmt_lexer | Subroutine | Append a token, maintaining the line count and the glue state for split tokens. |
| analyze_structure | ffmt_structure | Subroutine | Classify every statement and compute its depth: the number of constructs enclosing it, and
how many of those are program units and procedures, so callers can choose not to indent
their bodies.
An opening statement is at the depth outside its construct, the statements inside are one
deeper, and middle ( |
| apply_setting | ffmt_settings | Subroutine | Apply one setting to |
| break_point | ffmt_linebreak | Function | The token after which to split tokens |
| builder_append | ffmt_strings | Subroutine | Append |
| builder_get | ffmt_strings | Function | The string built so far. |
| builder_length | ffmt_strings | Function | Length of the string built so far. |
| byte_at | ffmt_fs | Function | The byte at |
| c_closedir | ffmt_fs | Interface | |
| c_getcwd | ffmt_fs | Interface | |
| c_opendir | ffmt_fs | Interface | |
| c_readdir | ffmt_fs | Interface | |
| c_string | ffmt_fs | Function |
|
| canonical_relational | ffmt_relational | Function | The symbol spelling of a lowercase relational operator; other text is returned unchanged. |
| child | ffmt_walk | Function |
|
| classify_statement | ffmt_constructs | Function | Classify a code statement. |
| closed_construct | ffmt_constructs | Function | The construct that |
| closes | ffmt_structure | Function | True if an |
| code_signature | ffmt_format | Function | The code tokens of |
| code_tokens | ffmt_statements | Function | Indices of the code tokens of a statement: no blanks, line breaks, comments, continuation
markers, preprocessor lines or |
| collect_files | ffmt_walk | Subroutine | The files under directory |
| comment_column | ffmt_layout | Function | Output column for the comment-only line with comment token |
| comment_gaps | ffmt_whitespace | Subroutine | Ask for |
| comment_kind | ffmt_lexer | Function | Comment sub-kind (one of the CM_* constants) of a comment. |
| compute_case | ffmt_case | Function | The letter case wanted for each token. |
| compute_gaps | ffmt_whitespace | Function | The gap wanted before each token ( |
| conditional_kind | ffmt_structure | Function | Kind of a preprocessor line (lowercase text): |
| config_for | ffmt_cli | Subroutine | The configuration that applies in directory |
| construct_label | ffmt_constructs | Function | Name of a construct for messages ( |
| continuation_target | ffmt_layout | Function | Column for the code of a continuation line: the first item after the innermost open
bracket; outside brackets, the first item after an assignment, a |
| convert_relational | ffmt_relational | Function |
|
| current_directory | ffmt_fs | Function | The current working directory, or |
| default_exclude | ffmt_walk | Function | Hidden files and directories, and fpm's build directory. |
| default_extensions | ffmt_walk | Function | Extensions of free-form Fortran files. |
| detokenize | ffmt_tokens | Function | Join the text of all tokens. |
| digits_end | ffmt_lexer | Function | Last digit of the run starting at |
| directive | ffmt_directives | Function | Formatter directive (one of the DIR_* constants) of a comment token. |
| directory_files | ffmt_cli | Subroutine | The Fortran files under |
| dotop_at | ffmt_lexer | Function | True if a dot operator such as |
| dotop_end | ffmt_lexer | Function | Last byte of the dot operator at |
| emit_blank | ffmt_layout | Subroutine | A blank line: only its line break (and a byte order mark) is kept. |
| emit_body | ffmt_layout | Subroutine | Tokens |
| emit_comment_line | ffmt_layout | Subroutine | A comment line, re-indented to |
| emit_continuation | ffmt_layout | Subroutine | A continuation line whose first non-blank token is |
| emit_fypp_line | ffmt_layout | Subroutine | A preprocessor line: a fypp directive ( |
| emit_range | ffmt_layout | Subroutine | Append tokens unchanged. |
| emit_statement | ffmt_layout | Subroutine | A code statement, with its continuation lines and the comment, blank and preprocessor lines
between them. The first line is indented to |
| empty | ffmt_config | Subroutine | A configuration with nothing set. |
| ends_with | ffmt_cli | Function | True if string |
| ends_with_continuation | ffmt_statements | Function | True if the last token of the line before any comment is a continuation |
| entry_name | ffmt_fs | Function | The NUL-terminated name in the directory entry at |
| expand_keyword | ffmt_constructs | Function | Split a keyword that may be written as one word ( |
| find_config | ffmt_config | Subroutine | The configuration for files in directory |
| find_layout | ffmt_fs | Subroutine | Find the offset of |
| find_semicolon | ffmt_statements | Function | A |
| first_non_blank | ffmt_layout | Function | First token in |
| first_piece_width | ffmt_layout | Function | Width of tokens |
| fitting_column | ffmt_layout | Function | The first of the |
| folded_length | ffmt_format | Function | How much of a token's text, from its start, Fortran reads ignoring case: all of a name, an operator or a number (exponent letters and kinds), the kind prefix of a string, and none of anything else. |
| format_pass | ffmt_format | Subroutine | One pass of the formatter: structure, whitespace, case and layout. |
| format_text | ffmt_format | Subroutine | Format |
| fypp_depths | ffmt_structure | Function | The number of fypp blocks around each item of |
| fypp_inline_end | ffmt_lexer | Function | Last byte of inline fypp ( |
| fypp_kind | ffmt_structure | Function | Kind of a preprocessor line (lowercase text) as a fypp block directive: one of the FY_* constants. |
| glob_to_regex | ffmt_walk | Function | A regular expression (for a full match) equivalent to the glob pattern |
| hash | ffmt_diff | Function | FNV-1a hash. |
| input_column | ffmt_layout | Function | Column of token |
| int_width | ffmt_strings | Function | Number of characters of |
| is_absolute | ffmt_fs | Function | True if |
| is_blank | ffmt_lexer | Function | True for a blank or tab. |
| is_chevron | ffmt_tokens | Function | True if token |
| is_code_char | ffmt_lexer | Function | A character that can be part of a code token (not a blank, line break or comment). |
| is_digit | ffmt_lexer | Function | True for |
| is_directory | ffmt_fs | Function | True if |
| is_letter | ffmt_lexer | Function | True for an ASCII letter. |
| is_name_char | ffmt_lexer | Function | Characters allowed after the first letter of a name ( |
| is_preproc_start | ffmt_lexer | Function | True if a preprocessor line starts at |
| is_quote | ffmt_lexer | Function | True for |
| is_use_statement | ffmt_use_sort | Function | True if statement |
| is_word | ffmt_whitespace | Function | Tokens that would run together with a following word: names, numbers and BOZ literals. |
| join_path | ffmt_fs | Function |
|
| kind_part | ffmt_case | Subroutine | Where the kind is in the text of a token of kind |
| label_width | ffmt_constructs | Function | Length of the text of |
| last_nonblank | ffmt_lexer | Function | Last non-blank byte in |
| layout | ffmt_layout | Function | The formatted text of |
| lcs | ffmt_diff | Subroutine | Append the edits that turn |
| lcs_lengths | ffmt_diff | Function |
|
| lex_number | ffmt_lexer | Subroutine | Integer or real literal starting at |
| limit_diagnostics | ffmt_format | Function | Warnings for input beyond the limits of the Fortran 2023 standard (6.3.2.1): lines longer than 10,000 characters, and statements of more than 1,000,000 characters (counted without comments and line breaks). |
| line_end | ffmt_lexer | Function | Index of the last byte before the line break at or after |
| line_end_token | ffmt_statements | Function | Index of the line break that ends the line containing token |
| line_ids | ffmt_diff | Subroutine | Number the distinct lines, so that equal lines have equal numbers. |
| line_kind | ffmt_statements | Function | Kind of the line |
| line_pieces | ffmt_layout | Subroutine | The pieces of output for tokens |
| line_width | ffmt_layout | Function | Width of tokens |
| list_directory | ffmt_fs | Subroutine | The entries of directory |
| load_config | ffmt_config | Subroutine | Read the configuration in file |
| long_code_lines | ffmt_linebreak | Function | Line numbers of code lines whose code (without a trailing comment) is longer than |
| longest_code | ffmt_format | Function | An upper bound of the width of the longest code line of |
| longest_line | ffmt_format | Function | Width of the longest line of |
| lower_char | ffmt_strings | Function |
|
| lowercase | ffmt_strings | Function |
|
| make_lowercase | ffmt_strings | Subroutine | Turn |
| middle_fits | ffmt_structure | Function | True if a middle statement of construct |
| module_key | ffmt_use_sort | Function | Sort key of a |
| name_end | ffmt_lexer | Function | Last byte of the name starting at |
| names_case | ffmt_case | Subroutine | Mark the intrinsic procedures, the constants of the intrinsic modules and the kinds named in one code statement. |
| only_blanks_to_eol | ffmt_lexer | Function | True if there are only blanks from |
| only_items | ffmt_use_sort | Function | Positions in |
| operator_end | ffmt_lexer | Function | Last byte of a two- or one-character operator at |
| options_for | ffmt_cli | Subroutine | The options for a file in directory |
| parent_directory | ffmt_fs | Function | The directory containing |
| parse_args | ffmt_cli | Subroutine | Parse command-line arguments (without the program name). |
| parse_source | ffmt_source | Subroutine | Read |
| peek | ffmt_lexer | Function | Character at |
| preproc_end | ffmt_lexer | Function | Last byte of a preprocessor line at |
| priority | ffmt_linebreak | Function | How good a place the end of a token with this text is for a line break (1 is best). |
| process_file | ffmt_cli | Function | Format file |
| process_stdin | ffmt_cli | Function | Format standard input to standard output (or report it with |
| process_text | ffmt_cli | Function | Format |
| protected_items | ffmt_directives | Function | True for each item that must be written exactly as it is: statements with a |
| push | ffmt_statements | Subroutine | Append item |
| push | ffmt_tokens | Subroutine | Append token |
| put | ffmt_layout | Subroutine | Append |
| range_text | ffmt_diff | Function |
|
| read_file | ffmt_io | Subroutine | All bytes of file |
| read_label | ffmt_constructs | Subroutine | Set |
| read_stdin | ffmt_io | Subroutine | All of standard input. Lines are read as text, so each line ends with a line feed, except a last line without one; carriage returns of CRLF line endings are kept as part of the line. |
| relayout | ffmt_format | Function |
|
| run | ffmt_cli | Function | Format the paths of |
| same_code | ffmt_format | Function | True if |
| same_token | ffmt_format | Function | True if code token |
| set | ffmt_constructs | Subroutine | Set the role and construct of |
| set_view | ffmt_statements | Subroutine | Make |
| set_views | ffmt_source | Subroutine | Make |
| sort_entries | ffmt_walk | Subroutine | Sort by name (insertion sort: directories are small). |
| sort_only_list | ffmt_use_sort | Subroutine | Replace |
| sort_use | ffmt_use_sort | Function |
|
| sorted_order | ffmt_use_sort | Function | The order in which |
| split_lines | ffmt_diff | Function | The lines of |
| split_long_lines | ffmt_linebreak | Function |
|
| split_statements | ffmt_statements | Subroutine | Group |
| stack_push | ffmt_structure | Subroutine | Open construct |
| stack_restore | ffmt_structure | Subroutine | Replace the open constructs by |
| stack_snapshot | ffmt_structure | Function | The open constructs, outermost first. |
| stands_alone | ffmt_linebreak | Function | True if statement |
| statement_case | ffmt_case | Subroutine | Mark the keywords of one code statement with |
| statement_gaps | ffmt_whitespace | Subroutine | Set the gaps wanted before the tokens of one code statement. |
| statement_view | ffmt_statements | Function | The view of code statement |
| statement_views | ffmt_source | Function | The view of each item of |
| string_end | ffmt_lexer | Function | Last byte of a string literal whose opening quote is at |
| to_case | ffmt_layout | Function |
|
| to_s | ffmt_strings | Function | Integer to string, without padding. Digits are built by hand: an internal |
| token_lower | ffmt_tokens | Function | Token text in lowercase (ASCII). |
| token_text | ffmt_tokens | Function | Token text, as it appears in the source. |
| tokenize | ffmt_lexer | Subroutine | Split |
| too_long | ffmt_format | Function | True if a code line of |
| trim_blanks | ffmt_layout | Function |
|
| unified_diff | ffmt_diff | Function | The changes from |
| usage | ffmt_cli | Function | The |
| utf8_width | ffmt_strings | Function | Number of characters (code points) in UTF-8 |
| view_closing | ffmt_statements | Function | Index of the |
| view_is | ffmt_statements | Function | True if the lowercase text of code token |
| view_kind_of | ffmt_statements | Function | Kind ( |
| view_word | ffmt_statements | Function | Lowercase text of code token |
| whole_lines | ffmt_use_sort | Function | True if |
| write_file | ffmt_io | Subroutine | Replace the contents of file |