aboutsummaryrefslogtreecommitdiff
path: root/files.f90
diff options
context:
space:
mode:
Diffstat (limited to 'files.f90')
-rw-r--r--files.f9019
1 files changed, 19 insertions, 0 deletions
diff --git a/files.f90 b/files.f90
index b9f6d5a..9da1ae8 100644
--- a/files.f90
+++ b/files.f90
@@ -48,6 +48,21 @@ contains
end function is_file_end_marker
+ subroutine skip_line(unit_number)
+ implicit none
+
+ integer, intent(in)::unit_number
+
+ character::c
+ integer::iostatus
+
+ read(unit_number, '(A1)', advance='no', iostat=iostatus) c
+ do while(c /= CHAR(10) .AND. iostatus == 0)
+ read(unit_number, '(A1)', advance='no', iostat=iostatus) c
+ end do
+
+ end subroutine skip_line
+
subroutine read_line_text(unit_number, res, iostatus)
implicit none
@@ -166,6 +181,10 @@ contains
allocate(first_line)
+ ! Skip the first line - it has the status code
+ rewind(unit_number)
+ call skip_line(unit_number)
+
call read_line_text(unit_number, first_line%text, iostatus)
first_line%next => null()