aboutsummaryrefslogtreecommitdiff
path: root/files.f90
diff options
context:
space:
mode:
authorJeffrey Armstrong <jeff@approximatrix.com>2020-05-27 16:20:20 -0400
committerJeffrey Armstrong <jeff@approximatrix.com>2020-05-27 16:20:20 -0400
commitbeb210f16f2e351470f90b771ff95d9f18e95073 (patch)
tree91b56041e41391c27930f62bc274a35d66941577 /files.f90
parent8088abdfae2f18520b9135221885479ae37a5dae (diff)
downloadLR-87-beb210f16f2e351470f90b771ff95d9f18e95073.tar.gz
LR-87-beb210f16f2e351470f90b771ff95d9f18e95073.zip
Fixed handling of status code in renderers. Added a desired_url variable to maintain a current_url when a failure occurs.
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()