sacc

sacc(omys), simple console gopher client (mirror)
git clone https://git.parazyd.org/sacc
Log | Files | Refs | LICENSE

commit 32250e601c63ec2a1f0a1bab6c523b6372fc4f05
parent 9a618bec82d956de8d6a2d67539eb19f6790944e
Author: Quentin Rameau <quinq@fifth.space>
Date:   Thu, 13 Jul 2017 00:38:08 +0200

Add support for 'h'tml files

Diffstat:
Msacc.c | 8+++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

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);