summaryrefslogtreecommitdiff
path: root/src/gopher.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-03-16 18:41:23 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-03-16 18:41:40 +0200
commit5d3567bd26ad1031e4ec08ccd2c36f5f1f646ca7 (patch)
tree9692acb12cd2d7fd0dd5731c67f52352c5ca9504 /src/gopher.c
parent00d5ccfaa333d01f87fe06aefb4c8a58263261f8 (diff)
Gopher: Parse the 'h' line type
IssueID #208
Diffstat (limited to 'src/gopher.c')
-rw-r--r--src/gopher.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gopher.c b/src/gopher.c
index cb1079b9..7099d5bc 100644
--- a/src/gopher.c
+++ b/src/gopher.c
@@ -121,6 +121,19 @@ static iBool convertSource_Gopher_(iGopher *d) {
121 iEndCollect(); 121 iEndCollect();
122 break; 122 break;
123 } 123 }
124 case 'h': {
125 iBeginCollect();
126 setPre_Gopher_(d, iFalse);
127 if (startsWith_Rangecc(path, "URL:")) {
128 format_String(buf,
129 "=> %s %s\n",
130 cstr_Rangecc((iRangecc){ path.start + 4, path.end }),
131 cstr_Rangecc(text));
132 }
133 appendData_Block(d->output, constBegin_String(buf), size_String(buf));
134 iEndCollect();
135 break;
136 }
124 default: 137 default:
125 break; /* Ignore unknown types. */ 138 break; /* Ignore unknown types. */
126 } 139 }