summaryrefslogtreecommitdiff
path: root/src/gopher.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2022-01-29 18:00:01 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2022-01-29 18:00:01 +0200
commit07804493ac17ff430302c7940f44b7525c0620e8 (patch)
tree885db4fd4576ef65df77d4d47a3ae354efdba01e /src/gopher.c
parent8d46b523f2948992343a9491a12dcec73f109c87 (diff)
Hierarchical navigation with Gopher and Titan
With Gopher, ensure that the item type changes to 1, and with Titan, change to normal Gemini.
Diffstat (limited to 'src/gopher.c')
-rw-r--r--src/gopher.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gopher.c b/src/gopher.c
index 008a7743..0e34fe6a 100644
--- a/src/gopher.c
+++ b/src/gopher.c
@@ -299,3 +299,13 @@ iBool processResponse_Gopher(iGopher *d, const iBlock *data) {
299 } 299 }
300 return changed; 300 return changed;
301} 301}
302
303void setUrlItemType_Gopher(iString *url, char itemType) {
304 iUrl parts;
305 init_Url(&parts, url);
306 if (equalCase_Rangecc(parts.scheme, "gopher")) {
307 if (parts.path.start && size_Range(&parts.path) >= 2) {
308 ((char *) parts.path.start)[1] = itemType;
309 }
310 }
311}