Skip to content

Commit

Permalink
Fix zero width, license length, and other improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
gha3mi committed Feb 16, 2024
1 parent 1ba4872 commit a262a43
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions src/colormaps_info.f90
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
! SOFTWARE.
!-------------------------------------------------------------------------------
! Contributed by gha3mi: 2023-11-05
! Last modification: gha3mi 2024-01-06, vmagnin 2024-02-16
! Last modification: gha3mi 2024-02-16, vmagnin 2024-02-16
!-------------------------------------------------------------------------------

module forcolormap_info
Expand Down Expand Up @@ -142,8 +142,8 @@ impure subroutine write_info(this, verbose, file_name)
'a,','a', len_trim(this%colorbar),',',23-len_trim(this%colorbar)+2,'x',',',&
'a,','a', len_trim(this%package),',',25-len_trim(this%package)+2,'x',',',&
'a,','a', len_trim(this%author),',',15-len_trim(this%author)+2,'x',',',&
'a,','a', len_trim(this%license),',',18-len_trim(this%license)+2,'x',',',&
'a,','a', len_trim(this%url),',',42-len_trim(this%url)+2,'x',',a',&
'a,','a', len_trim(this%license),',',33-len_trim(this%license)+2,'x',',',&
'a,','a', max(1, len_trim(this%url)),',',42-max(1, len_trim(this%url))+2,'x',',a',&
')'
open (newunit=nunit, file=trim(file_name), access='append', status='unknown', action='write')
write (nunit,format_table)&
Expand Down Expand Up @@ -181,8 +181,8 @@ impure subroutine write_info(this, verbose, file_name)
'a', len_trim(this%colorbar),',',23-len_trim(this%colorbar)+2,'x',',',&
'a', len_trim(this%package),',',25-len_trim(this%package)+2,'x',',',&
'a', len_trim(this%author),',',15-len_trim(this%author)+2,'x',',',&
'a', len_trim(this%license),',',18-len_trim(this%license)+2,'x',',',&
'a', len_trim(this%url),',',42-len_trim(this%url)+2,'x',&
'a', len_trim(this%license),',',33-len_trim(this%license)+2,'x',',',&
'a', max(1, len_trim(this%url)),',',42-max(1, len_trim(this%url))+2,'x',&
')'
print (format_table),&
this%name,&
Expand Down Expand Up @@ -318,16 +318,17 @@ impure subroutine write(this, verbose, name, family, gradient, palette, author,
if (present(file_name)) then
open(newunit=nunit, file=trim(file_name), access='append', status='unknown', action='write')
write(nunit,'(a)')'' ! Print empty line
write(nunit,'(g0,8x,g0,6x,g0,12x,g0,7x,g0,1x,g0,17x,g0,20x,g0,11x,g0,13x,g0)') &
write(nunit,'(g0,8x,g0,6x,g0,12x,g0,7x,g0,1x,g0,17x,g0,20x,g0,11x,g0,28x,g0)') &
'|Name', '|Family', '|Gradient', '|Palette', '|Levels', '|Colorbar', '|Package', '|Author', '|Licence', '|URL|'
write(nunit,'(a)') '|---|---|---|---|---|---|---|---|---|---|'
close(nunit)
else
print*,'' ! Print empty line
print '(g0,8x,g0,6x,g0,12x,g0,7x,g0,1x,g0,17x,g0,20x,g0,11x,g0,13x,g0)', &
print '(g0,8x,g0,6x,g0,12x,g0,7x,g0,1x,g0,17x,g0,20x,g0,11x,g0,28x,g0)', &
'Name', 'Family', 'Gradient', 'Palette', 'Levels', 'Colorbar', 'Package', 'Author', 'Licence', 'URL'
print'(a)', '**********************************************************************************************&
&*******************************************************************************************'
print'(a)', '*****************************************************************************************&
&*****************************************************************************************************&
&**********************'
end if
end if

Expand Down

0 comments on commit a262a43

Please sign in to comment.