about summary refs log tree commit diff stats
path: root/src/local
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-09-15 18:41:20 +0200
committerbptato <nincsnevem662@gmail.com>2024-09-15 19:13:08 +0200
commitb7ac2954a90e44fd727c770c47e8f9706b40004f (patch)
treec058565a825d89d1364067fd1c54718e8830db0d /src/local
parent9f453ca3997528252eb28268e38480f58fbce4f6 (diff)
downloadchawan-b7ac2954a90e44fd727c770c47e8f9706b40004f.tar.gz
loader: refactor/move around some procs
Module boundaries didn't make much sense here either. Specifically:

* loader/cgi was originally just one of the many "real" protocols
  supported by loader, so it was in a separate module (like the other
  ones). Now it's mostly an "internal" protocol, and it was getting
  cumbersome to pass all required loader state to loadCGI.
* The loader interface has grown quite large, but there is no need for
  (or advantage in) putting it in the same module as the implementation.

Now CGI is handled by loader, and the interface is in the new module
"loaderiface".
Diffstat (limited to 'src/local')
-rw-r--r--src/local/client.nim3
-rw-r--r--src/local/container.nim5
-rw-r--r--src/local/pager.nim5
3 files changed, 8 insertions, 5 deletions
diff --git a/src/local/client.nim b/src/local/client.nim
index b8e131f8..bf276aa3 100644
--- a/src/local/client.nim
+++ b/src/local/client.nim
@@ -28,8 +28,9 @@ import js/intl
 import js/jsmodule
 import js/timeout
 import loader/headers
-import loader/loader
+import loader/loaderiface
 import loader/request
+import loader/response
 import local/container
 import local/lineedit
 import local/pager
diff --git a/src/local/container.nim b/src/local/container.nim
index c6907982..6310c8d6 100644
--- a/src/local/container.nim
+++ b/src/local/container.nim
@@ -7,18 +7,19 @@ import std/tables
 import chagashi/charset
 import config/config
 import config/mimetypes
-import types/bitmap
 import io/dynstream
 import io/promise
 import io/serversocket
 import layout/renderdocument
 import loader/headers
-import loader/loader
+import loader/loaderiface
 import loader/request
+import loader/response
 import monoucha/javascript
 import monoucha/jsregex
 import monoucha/jstypes
 import server/buffer
+import types/bitmap
 import types/blob
 import types/cell
 import types/color
diff --git a/src/local/pager.nim b/src/local/pager.nim
index 8b449f24..48241e4c 100644
--- a/src/local/pager.nim
+++ b/src/local/pager.nim
@@ -12,7 +12,6 @@ import chagashi/charset
 import config/chapath
 import config/config
 import config/mailcap
-import types/bitmap
 import io/bufreader
 import io/dynstream
 import io/promise
@@ -23,8 +22,9 @@ import js/timeout
 import layout/renderdocument
 import loader/connecterror
 import loader/headers
-import loader/loader
+import loader/loaderiface
 import loader/request
+import loader/response
 import local/container
 import local/lineedit
 import local/term
@@ -39,6 +39,7 @@ import monoucha/quickjs
 import monoucha/tojs
 import server/buffer
 import server/forkserver
+import types/bitmap
 import types/blob
 import types/cell
 import types/color