tAdd support for 'h'tml files - sacc - sacc(omys), simple console gopher client (mirror) HTML git clone https://git.parazyd.org/sacc DIR Log DIR Files DIR Refs DIR LICENSE --- DIR commit 32250e601c63ec2a1f0a1bab6c523b6372fc4f05 DIR parent 9a618bec82d956de8d6a2d67539eb19f6790944e HTML Author: Quentin Rameau <quinq@fifth.space> Date: Thu, 13 Jul 2017 00:38:08 +0200 Add support for 'h'tml files Diffstat: M sacc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) --- DIR diff --git a/sacc.c b/sacc.c t@@ -144,7 +144,7 @@ typedisplay(char t) case 'I': return "Img +"; case 'h': - return "HTML|"; + return "HTML+"; case 'i': return " |"; case 's': t@@ -439,6 +439,11 @@ dig(Item *entry, Item *item) item->entry = entry; switch (item->type) { + case 'h': /* fallthrough */ + if (!strncmp(item->selector, "URL:", 4)) { + item->dat = item->selector+4; + return 0; + } case '0': if (!fetchitem(item)) return 0; t@@ -476,6 +481,7 @@ delve(Item *hole) while (hole) { switch (hole->type) { + case 'h': case '0': if (dig(entry, hole)) displaytextitem(hole);