aboutsummaryrefslogtreecommitdiff
path: root/main.F90
diff options
context:
space:
mode:
authorJeffrey Armstrong <jeff@approximatrix.com>2020-05-06 17:42:40 -0400
committerJeffrey Armstrong <jeff@approximatrix.com>2020-05-06 17:42:40 -0400
commit09a2a56e22ce36238dce94f927f1909b63493960 (patch)
tree2a1f9c7c5287553bf29b67d86661eaede5783eb5 /main.F90
parent9c957c4a0964ee1f5b0ff582543b9f526978c47e (diff)
downloadLR-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.F9024
1 files changed, 17 insertions, 7 deletions
diff --git a/main.F90 b/main.F90
index 7b2319d..13ff29a 100644
--- a/main.F90
+++ b/main.F90
@@ -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)