sacc

sacc (saccomys): simple gopher client.
Log | Files | Refs | LICENSE

commit cea0005063fa81a6d1b22d8c89dfd50f1c2f2270
parent 54e52d947c665dd719db5e221c184753e192549e
Author: Quentin Rameau <quinq@fifth.space>
Date:   Fri, 14 Jul 2017 23:05:35 +0200

Add support for mirror type '+'

Diffstat:
sacc.c | 4+++-
ui_ti.c | 3++-
ui_txt.c | 3++-
3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/sacc.c b/sacc.c @@ -140,7 +140,7 @@ typedisplay(char t) case '9': return "Binf+"; case '+': - return "Mirr|"; + return "Mirr+"; case 'T': return "IBMt|"; case 'g': @@ -453,6 +453,7 @@ dig(Item *entry, Item *item) return 0; break; case '1': + case '+': case '7': if (!fetchitem(item) || !(item->dat = molddiritem(item->raw))) { fputs("Couldn't parse dir item\n", stderr); @@ -491,6 +492,7 @@ delve(Item *hole) displaytextitem(hole); break; case '1': + case '+': if (dig(entry, hole) && hole->dat) entry = hole; break; diff --git a/ui_ti.c b/ui_ti.c @@ -139,7 +139,8 @@ display(Item *entry) Dir *dir; size_t i, curln, lastln, nitems, printoff; - if (!entry || !(entry->type == '1' || entry->type == '7')) + if (!entry || + !(entry->type == '1' || entry->type == '+' || entry->type == '7')) return; putp(tparm(clear_screen)); diff --git a/ui_txt.c b/ui_txt.c @@ -92,7 +92,8 @@ display(Item *entry) size_t i, lines, nitems; int nd; - if (!entry || !(entry->type == '1' || entry->type == '7') || + if (!entry || + !(entry->type == '1' || entry->type == '+' || entry->type == '7') || !(dir = entry->dat)) return;