aboutsummaryrefslogtreecommitdiff
path: root/main.F90
diff options
context:
space:
mode:
authorJeffrey Armstrong <jeff@approximatrix.com>2020-05-14 09:55:47 -0400
committerJeffrey Armstrong <jeff@approximatrix.com>2020-05-14 09:55:47 -0400
commitd53076ec22c34822c314264f664532883c87083b (patch)
tree2ab110d61c237872b1d5d8682acf26548794c59d /main.F90
parentac37668c0765703a2d76edac0d1d8b8f55be4e56 (diff)
downloadLR-87-d53076ec22c34822c314264f664532883c87083b.zip
LR-87-d53076ec22c34822c314264f664532883c87083b.tar.gz
Initial commit of an AppGraphics renderer that actually works, though it doesn't scroll or allow url entry.
Diffstat (limited to 'main.F90')
-rw-r--r--main.F9022
1 files changed, 19 insertions, 3 deletions
diff --git a/main.F90 b/main.F90
index 8fff5de..16da056 100644
--- a/main.F90
+++ b/main.F90
@@ -23,8 +23,12 @@
program gemini
use request
+#ifdef WINDOWS_GUI
+use ag_render, only: appgraphics_renderer
+#else
use dumb_render
-!use ag_render, only: appgraphics_renderer
+#endif
+
use render
use gemini_protocol
@@ -41,9 +45,13 @@ implicit none
character(256)::initial_site
character(1024)::current_url, input
type(connection)::conn
- type(dumb_renderer)::r
- !type(appgraphics_renderer)::r
+#ifdef WINDOWS_GUI
+ type(appgraphics_renderer)::r
+#else
+ type(dumb_renderer)::r
+#endif
+
logical::running
logical::loaded
logical::populated
@@ -201,27 +209,35 @@ contains
case (STATUS_LOCALFAIL)
call r%report_status("Network failure loading "//trim(url))
+ call r%report_displayed_page("...")
case (STATUS_INPUT)
call r%report_status("Ok (input)")
+ call r%report_displayed_page(url)
case (STATUS_SUCCESS)
call r%report_status("Ok")
+ call r%report_displayed_page(url)
case (STATUS_REDIRECT)
call r%report_status("Ok (redirect)")
+ call r%report_displayed_page(url)
case (STATUS_TEMPFAIL)
call r%report_status("Server reports temporary failure")
+ call r%report_displayed_page("...")
case (STATUS_PERMFAIL)
call r%report_status("Server reports permanent failure")
+ call r%report_displayed_page("...")
case (STATUS_CERTREQ)
call r%report_status("Server requesting certificate (unsupported)")
+ call r%report_displayed_page("...")
case (STATUS_BADRESPONSE)
call r%report_status("Bad response code from server")
+ call r%report_displayed_page("...")
end select