diff options
author | Jeffrey Armstrong <jeff@approximatrix.com> | 2020-05-06 17:42:40 -0400 |
---|---|---|
committer | Jeffrey Armstrong <jeff@approximatrix.com> | 2020-05-06 17:42:40 -0400 |
commit | 09a2a56e22ce36238dce94f927f1909b63493960 (patch) | |
tree | 2a1f9c7c5287553bf29b67d86661eaede5783eb5 /main.F90 | |
parent | 9c957c4a0964ee1f5b0ff582543b9f526978c47e (diff) | |
download | LR-87-09a2a56e22ce36238dce94f927f1909b63493960.tar.gz LR-87-09a2a56e22ce36238dce94f927f1909b63493960.zip |
File type is now returned for evaluation. Initial routines for saving implemented but unused.
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) |