aboutsummaryrefslogtreecommitdiff
path: root/layout.f90
diff options
context:
space:
mode:
Diffstat (limited to 'layout.f90')
-rw-r--r--layout.f9025
1 files changed, 25 insertions, 0 deletions
diff --git a/layout.f90 b/layout.f90
index 1c7d8cb..9a3797b 100644
--- a/layout.f90
+++ b/layout.f90
@@ -53,4 +53,29 @@ contains
end subroutine layout_lines
+ subroutine free_lines(first_line)
+ implicit none
+
+ type(line), intent(inout), pointer::first_line
+
+ type(line), pointer::walker, past
+
+ walker => first_line
+
+ do while(associated(walker))
+ if(allocated(walker%text)) then
+ deallocate(walker%text)
+ end if
+
+ past => walker
+ walker => walker%next
+
+ deallocate(past)
+
+ end do
+
+ first_line => null()
+
+ end subroutine free_lines
+
end module layout \ No newline at end of file