diff options
-rw-r--r-- | history.f90 | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/history.f90 b/history.f90 index fc178e0..e56cc89 100644 --- a/history.f90 +++ b/history.f90 @@ -40,8 +40,11 @@ contains last_location => null() else last_location => first_location + do while(associated(last_location%next)) + last_location => last_location%next + end do end if @@ -66,15 +69,21 @@ contains else last => last_location(first_location) - allocate(last%next) - last => last%next - last%next => null() - last%url = url + if(trim(last%url) /= trim(url)) then + + allocate(last%next) + last => last%next + last%next => null() + last%url = url + + end if end if head => first_location - + + Print *, "=> "//trim(url) + end function add_location subroutine back_location(first_location, url) |