Skip to content

Commit e4bdc04

Browse files
committed
Fix overall_progress in fpm_backend_output
1 parent eacc168 commit e4bdc04

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/fpm_backend_output.f90

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ subroutine output_status_compiling(progress, queue_index)
7676

7777
character(:), allocatable :: target_name
7878
character(100) :: output_string
79-
character(100) :: overall_progress
79+
character(7) :: overall_progress
8080

8181
associate(target=>progress%target_queue(queue_index)%ptr)
8282

@@ -86,12 +86,12 @@ subroutine output_status_compiling(progress, queue_index)
8686
target_name = basename(target%output_file)
8787
end if
8888

89-
write(overall_progress,'(A,I4,A)') '[',100*progress%n_complete/progress%n_target,'%]'
89+
write(overall_progress,'(A,I3,A)') '[',100*progress%n_complete/progress%n_target,'%] '
9090

9191
if (progress%plain_mode) then ! Plain output
9292

9393
!$omp critical
94-
write(*,'(A8,A30)') trim(overall_progress),target_name
94+
write(*,'(A7,A30)') overall_progress,target_name
9595
!$omp end critical
9696

9797
else ! Pretty output
@@ -100,7 +100,7 @@ subroutine output_status_compiling(progress, queue_index)
100100

101101
call progress%console%write_line(trim(output_string),progress%output_lines(queue_index))
102102

103-
call progress%console%write_line(trim(overall_progress)//'Compiling...',advance=.false.)
103+
call progress%console%write_line(overall_progress//'Compiling...',advance=.false.)
104104

105105
end if
106106

@@ -119,7 +119,7 @@ subroutine output_status_complete(progress, queue_index, build_stat)
119119

120120
character(:), allocatable :: target_name
121121
character(100) :: output_string
122-
character(100) :: overall_progress
122+
character(7) :: overall_progress
123123

124124
!$omp critical
125125
progress%n_complete = progress%n_complete + 1
@@ -139,19 +139,19 @@ subroutine output_status_complete(progress, queue_index, build_stat)
139139
write(output_string,'(A,T40,A,A)') target_name,COLOR_RED//'failed.'//COLOR_RESET
140140
end if
141141

142-
write(overall_progress,'(A,I4,A)') '[',100*progress%n_complete/progress%n_target,'%] '
142+
write(overall_progress,'(A,I3,A)') '[',100*progress%n_complete/progress%n_target,'%] '
143143

144144
if (progress%plain_mode) then ! Plain output
145145

146146
!$omp critical
147-
write(*,'(A8,A30,A7)') trim(overall_progress),target_name, 'done.'
147+
write(*,'(A7,A30,A7)') overall_progress,target_name, 'done.'
148148
!$omp end critical
149149

150150
else ! Pretty output
151151

152152
call progress%console%update_line(progress%output_lines(queue_index),trim(output_string))
153153

154-
call progress%console%write_line(trim(overall_progress)//'Compiling...',advance=.false.)
154+
call progress%console%write_line(overall_progress//'Compiling...',advance=.false.)
155155

156156
end if
157157

0 commit comments

Comments
 (0)