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.
The implementation for updating previous lines relies on no other output
going to stdout
/stderr
except through the console_t
object provided.
All write statements to stdout
are enclosed within OpenMP critical
regions
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 |
Console object
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | public | :: | n_line | = | 1 |
Number of lines printed |
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 |