fpm_backend_console Module

Build Backend Console

This module provides a lightweight implementation for printing to the console and updating previously-printed console lines. It used by fpm_backend_output for pretty-printing build status and progress.



Contents


Variables

Type Visibility Attributes Name Initial
character(len=*), public, parameter :: COLOR_GREEN = ESC//"[32m"

Escape code for green foreground color

character(len=*), public, parameter :: COLOR_RED = ESC//"[31m"

Escape code for red foreground color

character(len=*), public, parameter :: COLOR_RESET = ESC//"[0m"

Escape code to reset foreground color

character(len=*), public, parameter :: COLOR_YELLOW = ESC//"[93m"

Escape code for yellow foreground color

character(len=*), public, parameter :: LINE_RESET = ESC//"[2K"//ESC//"[1G"

Escape code for erasing current line


Derived Types

type, public ::  console_t

Console object

Components

Type Visibility Attributes Name Initial
integer, public :: n_line = 1

Number of lines printed

Type-Bound Procedures

procedure , public , :: update_line => console_update_line Subroutine

Update a previously-written console line

procedure , public , :: write_line => console_write_line Subroutine

Write a single line to the console