subroutinedrawprivate
subroutine draw()
Draw the bar of the current stage.
Calls
Source
Show the code
subroutine draw()
character(len=64) :: numbers
integer :: filled, unfilled, percent, k
write (output_unit, '(a)', advance='no') achar(13)//ESC//'[2K '//label
if (total > 0) then
call bar_text(done, total, BAR_WIDTH, filled, unfilled, percent)
if (colour) write (output_unit, '(a)', advance='no') ESC//'[36m'
do k = 1, filled
write (output_unit, '(a)', advance='no') FULL
end do
if (colour) write (output_unit, '(a)', advance='no') ESC//'[2m'
do k = 1, unfilled
write (output_unit, '(a)', advance='no') EMPTY
end do
if (colour) write (output_unit, '(a)', advance='no') ESC//'[0m'
write (numbers, '(1x,i3,a,2x,i0,a,i0)') percent, '%', min(done, total), '/', total
write (output_unit, '(a)', advance='no') trim(numbers)
end if
flush (output_unit)
drawn = .true.
end subroutine draw