diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-11-07 12:41:01 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-11-07 12:41:01 +0200 |
commit | 64b9848f878ccd75aae75bf4d8d3f8a364f28ddc (patch) | |
tree | bc56660823e5dd2658fe4ef7535086011dd717c4 /src/gmdocument.c | |
parent | f309d604a720a9442c2249d3a738f746d1503b47 (diff) |
Treat Gopher as an unsupported protocol
Diffstat (limited to 'src/gmdocument.c')
-rw-r--r-- | src/gmdocument.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gmdocument.c b/src/gmdocument.c index 50733252..4e8b5ace 100644 --- a/src/gmdocument.c +++ b/src/gmdocument.c | |||
@@ -235,12 +235,14 @@ static void clearLinks_GmDocument_(iGmDocument *d) { | |||
235 | clear_PtrArray(&d->links); | 235 | clear_PtrArray(&d->links); |
236 | } | 236 | } |
237 | 237 | ||
238 | #if 0 | ||
238 | static iBool isGopher_GmDocument_(const iGmDocument *d) { | 239 | static iBool isGopher_GmDocument_(const iGmDocument *d) { |
239 | return equalCase_Rangecc(urlScheme_String(&d->url), "gopher"); | 240 | return equalCase_Rangecc(urlScheme_String(&d->url), "gopher"); |
240 | } | 241 | } |
242 | #endif | ||
241 | 243 | ||
242 | static void doLayout_GmDocument_(iGmDocument *d) { | 244 | static void doLayout_GmDocument_(iGmDocument *d) { |
243 | const iBool isGemini = !isGopher_GmDocument_(d); | 245 | const iBool isGemini = iTrue; // !isGopher_GmDocument_(d); |
244 | /* TODO: Collect these parameters into a GmTheme. */ | 246 | /* TODO: Collect these parameters into a GmTheme. */ |
245 | const int fonts[max_GmLineType] = { | 247 | const int fonts[max_GmLineType] = { |
246 | isGemini ? paragraph_FontId : preformatted_FontId, | 248 | isGemini ? paragraph_FontId : preformatted_FontId, |
@@ -1081,7 +1083,7 @@ static void normalize_GmDocument(iGmDocument *d) { | |||
1081 | iRangecc src = range_String(&d->source); | 1083 | iRangecc src = range_String(&d->source); |
1082 | iRangecc line = iNullRange; | 1084 | iRangecc line = iNullRange; |
1083 | iBool isPreformat = iFalse; | 1085 | iBool isPreformat = iFalse; |
1084 | if (d->format == plainText_GmDocumentFormat || isGopher_GmDocument_(d)) { | 1086 | if (d->format == plainText_GmDocumentFormat) { // || isGopher_GmDocument_(d)) { |
1085 | isPreformat = iTrue; /* Cannot be turned off. */ | 1087 | isPreformat = iTrue; /* Cannot be turned off. */ |
1086 | } | 1088 | } |
1087 | const int preTabWidth = 4; /* TODO: user-configurable parameter */ | 1089 | const int preTabWidth = 4; /* TODO: user-configurable parameter */ |