Merge branch 'develop' into refactor

This commit is contained in:
Paul Romano 2013-07-28 22:26:03 -04:00
commit a7833087ad
2 changed files with 13 additions and 7 deletions

View file

@ -255,7 +255,6 @@ neat:
# Rules
#===============================================================================
.SUFFIXES: .F90 .o
.PHONY: all xml-fortran install uninstall clean neat distclean
%.o: %.F90

View file

@ -185,10 +185,11 @@ contains
integer, optional :: level ! verbosity level
integer :: i_start ! starting position
integer :: i_end ! ending position
integer :: line_wrap ! length of line
integer :: length ! length of message
integer :: i_start ! starting position
integer :: i_end ! ending position
integer :: line_wrap ! length of line
integer :: length ! length of message
integer :: last_space ! index of last space (relative to start)
! Set length of line
line_wrap = 80
@ -209,11 +210,17 @@ contains
else
! Determine last space in current line
i_end = i_start + index(message(i_start+1:i_start+line_wrap), &
last_space = index(message(i_start+1:i_start+line_wrap), &
' ', BACK=.true.)
if (last_space == 0) then
i_end = min(length + 1, i_start+line_wrap) - 1
write(ou, fmt='(1X,A)') message(i_start+1:i_end)
else
i_end = i_start + last_space
write(ou, fmt='(1X,A)') message(i_start+1:i_end-1)
end if
! Write up to last space
write(ou, fmt='(1X,A)') message(i_start+1:i_end-1)
! Advance starting position
i_start = i_end