Skip to content

Commit

Permalink
fprettify
Browse files Browse the repository at this point in the history
  • Loading branch information
wpbonelli committed Dec 12, 2023
1 parent 733aada commit 60558f1
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 32 deletions.
40 changes: 20 additions & 20 deletions src/Utilities/Message.f90
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,12 @@ subroutine print_message(this, title, name, iunit)
! -- write each message
do i = 1, isize
if (iu > 0) &
call write_message_counter(&
iunit=iu, &
text=this%messages(i), &
icount=i, &
iwidth=iwidth)
call write_message_counter(&
call write_message_counter( &
iunit=iu, &
text=this%messages(i), &
icount=i, &
iwidth=iwidth)
call write_message_counter( &
text=this%messages(i), &
icount=i, &
iwidth=iwidth)
Expand Down Expand Up @@ -274,9 +274,9 @@ end subroutine write_message
!! counter is passed in subsequent lines are indented.
!<
subroutine write_message_counter(text, iunit, icount, iwidth, &
skipbefore, skipafter)
skipbefore, skipafter)
! -- dummy

character(len=*), intent(in) :: text !< message to be written
integer(I4B), intent(in), optional :: iunit !< the unit number to which the message is written
integer(I4B), intent(in), optional :: icount !< counter to prepended to the message
Expand Down Expand Up @@ -367,12 +367,12 @@ subroutine write_message_counter(text, iunit, icount, iwidth, &
line = amessage(j + 1:i)
end if
call write_message(text=line, iunit=iu, &
fmt=fmt_first, &
skipbefore=isb)
fmt=fmt_first, &
skipbefore=isb)
else
line = adjustl(amessage(j + 1:i))
call write_message(text=line, iunit=iu, &
fmt=fmt_cont)
fmt=fmt_cont)
end if
j = i
go to 5
Expand All @@ -385,12 +385,12 @@ subroutine write_message_counter(text, iunit, icount, iwidth, &
line = amessage(j + 1:jend)
end if
call write_message(text=line, iunit=iu, &
fmt=fmt_first, &
skipbefore=isb)
fmt=fmt_first, &
skipbefore=isb)
else
line = amessage(j + 1:jend)
call write_message(text=line, iunit=iu, &
fmt=fmt_cont)
fmt=fmt_cont)
end if
j = jend
go to 5
Expand All @@ -405,12 +405,12 @@ subroutine write_message_counter(text, iunit, icount, iwidth, &
line = amessage(j + 1:jend)
end if
call write_message(text=line, iunit=iu, &
fmt=fmt_first, &
skipbefore=isb, skipafter=isa)
else
line = amessage(j + 1:jend)
call write_message(text=line, iunit=iu, fmt=fmt_cont, &
skipafter=isa)
fmt=fmt_first, &
skipbefore=isb, skipafter=isa)
else
line = amessage(j + 1:jend)
call write_message(text=line, iunit=iu, fmt=fmt_cont, &
skipafter=isa)
end if
end subroutine write_message_counter

Expand Down
6 changes: 3 additions & 3 deletions src/Utilities/Sim.f90
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ subroutine deprecation_warning(cblock, cvar, cver, endmsg, iunit)
!
! -- store warning
call sim_warnings%store_message(message)

end subroutine deprecation_warning

!> @brief Store note
Expand Down Expand Up @@ -345,7 +345,7 @@ subroutine print_final_message(stopmess, ioutlocal)
! -- print the accumulated messages
if (isim_level >= VALL) then
call sim_notes%print_message('NOTES:', 'note(s)', &
iunit=iout)
iunit=iout)
call sim_warnings%print_message('WARNING REPORT:', 'warning(s)', &
iunit=iout)
end if
Expand Down Expand Up @@ -458,7 +458,7 @@ subroutine initial_message()
!
if (simulation_mode == 'PARALLEL') then
call write_message('(MODFLOW runs in '//trim(simulation_mode)//' mode)', &
skipafter=1)
skipafter=1)
end if
!
end subroutine initial_message
Expand Down
26 changes: 17 additions & 9 deletions src/Utilities/version.f90
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ module VersionModule
use DefinedMacros, only: is_extended, using_petsc, using_netcdf
use ConstantsModule, only: LENBIGLINE, LENHUGELINE, DZERO
use SimVariablesModule, only: istdout
use MessageModule, only: write_message, write_message_centered, write_message_counter
use MessageModule, only: write_message, write_message_centered, &
write_message_counter
use CompilerVersion, only: get_compiler, get_compile_options
implicit none
public
Expand Down Expand Up @@ -116,26 +117,33 @@ subroutine write_listfile_header(iout, cmodel_type, write_sys_command, &
end if
!
! -- Write title to iout
call write_message_centered(text=cheader, linelen=iheader_width, iunit=iout)
call write_message_centered(text=MFTITLE, linelen=iheader_width, iunit=iout)
call write_message_centered(text=cheader, linelen=iheader_width, &
iunit=iout)
call write_message_centered(text=MFTITLE, linelen=iheader_width, &
iunit=iout)
!
! -- Write model type to list file
if (present(cmodel_type)) then
call write_message_centered(text=cmodel_type, linelen=iheader_width, iunit=iout)
call write_message_centered(text=cmodel_type, linelen=iheader_width, &
iunit=iout)
end if
!
! -- Write version
call write_message_centered(text='VERSION '//VERSION, linelen=iheader_width, iunit=iout)
call write_message_centered(text='VERSION '//VERSION, &
linelen=iheader_width, iunit=iout)
!
! -- Write if develop mode
if (IDEVELOPMODE == 1) then
call write_message_centered(text='***DEVELOP MODE***', linelen=iheader_width, iunit=iout)
call write_message_centered(text='***DEVELOP MODE***', &
linelen=iheader_width, iunit=iout)
end if
!
! -- Write compiler version
call get_compiler(compiler)
call write_message_centered(text=' ', linelen=iheader_width, iunit=iout)
call write_message_centered(text=trim(adjustl(compiler)), linelen=iheader_width, iunit=iout)
call write_message_centered(text=' ', linelen=iheader_width, &
iunit=iout)
call write_message_centered(text=trim(adjustl(compiler)), &
linelen=iheader_width, iunit=iout)
!
! -- Write disclaimer
write (iout, FMTDISCLAIMER)
Expand Down Expand Up @@ -168,7 +176,7 @@ subroutine write_listfile_header(iout, cmodel_type, write_sys_command, &
call write_kindinfo(iout)
end if
write (iout, *)

end subroutine write_listfile_header

!> @ brief Write program license
Expand Down

0 comments on commit 60558f1

Please sign in to comment.