diff options
Diffstat (limited to 'adapter/format/gopher2html.nim')
-rw-r--r-- | adapter/format/gopher2html.nim | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/adapter/format/gopher2html.nim b/adapter/format/gopher2html.nim index 33cd564a..1004cc2c 100644 --- a/adapter/format/gopher2html.nim +++ b/adapter/format/gopher2html.nim @@ -5,26 +5,9 @@ import std/os import std/streams import std/strutils -import utils/twtstr - include ../gophertypes -func gopherType(c: char): GopherType = - return case c - of '0': TEXT_FILE - of '1': DIRECTORY - of '3': ERROR - of '5': DOS_BINARY - of '7': SEARCH - of 'm': MESSAGE - of 's': SOUND - of 'g': GIF - of 'h': HTML - of 'i': INFO - of 'I': IMAGE - of '9': BINARY - of 'p': PNG - else: UNKNOWN +import utils/twtstr const ControlPercentEncodeSet = {char(0x00)..char(0x1F), char(0x7F)..char(0xFF)} const QueryPercentEncodeSet = (ControlPercentEncodeSet + {' ', '"', '#', '<', '>'}) |