diff options
Diffstat (limited to 'main.F90')
-rw-r--r-- | main.F90 | 24 |
1 files changed, 17 insertions, 7 deletions
@@ -22,6 +22,7 @@ implicit none logical::populated integer::return_code + character(256)::return_type integer, parameter::io = 100 @@ -77,7 +78,7 @@ implicit none call r%report_status("Requesting "//trim(current_url)) - return_code = request_url(current_url, io) + return_code = request_url(current_url, io, return_type) populated = .true. call update_status(r, current_url, return_code) @@ -103,12 +104,21 @@ implicit none locations_visited => add_location(locations_visited, current_url) - first_line => load_unit(io, file_type_gemini) - loaded = .true. - call r%new_page() - call r%report_status("Performing Layout") - call layout_lines(first_line, r) - + if(r%type_supported(return_type)) then + + first_line => load_unit(io, file_type_gemini) + loaded = .true. + call r%new_page() + call r%report_status("Performing Layout") + call layout_lines(first_line, r) + + else + + call r%draw_error("Cannot display file of type "//return_type) + call back_location(locations_visited, current_url) + + end if + end if do while(loaded .and. running) |