Add support for 'h'tml files - sacc - sacc(omys), simple console gopher client HTML git clone git://bitreich.org/sacc/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/sacc/ DIR Log DIR Files DIR Refs DIR Tags 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 @@ -144,7 +144,7 @@ typedisplay(char t) case 'I': return "Img +"; case 'h': - return "HTML|"; + return "HTML+"; case 'i': return " |"; case 's': @@ -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; @@ -476,6 +481,7 @@ delve(Item *hole) while (hole) { switch (hole->type) { + case 'h': case '0': if (dig(entry, hole)) displaytextitem(hole);