Arrange caption format - sacc - sacc(omys), simple console gopher client | |
git clone git://bitreich.org/sacc/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65… | |
Log | |
Files | |
Refs | |
Tags | |
LICENSE | |
--- | |
commit 8a7bc011a62ba737e6fb1fe7c84ca2fa1a20eb31 | |
parent e1950fa3b12946f1f520745102442de01b405d5a | |
Author: Quentin Rameau <[email protected]> | |
Date: Fri, 23 Jun 2017 01:18:24 +0200 | |
Arrange caption format | |
Diffstat: | |
M sacc.c | 7 +++++-- | |
1 file changed, 5 insertions(+), 2 deletions(-) | |
--- | |
diff --git a/sacc.c b/sacc.c | |
@@ -178,8 +178,11 @@ display(Item *item) | |
ndigits = (nitems < 10) ? 1 : (nitems < 100) ? 2 : 3; | |
for (i = item->printoff; i < nitems && i < lines; ++i) { | |
- printf("[%*d]%.4s: %s\n", ndigits, i+1, | |
- typedisplay(items[i]->type), items[i]->username… | |
+ item = items[i]; | |
+ printf("%*d %-4s%c %s\n", ndigits, i+1, | |
+ item->type != 'i' ? typedisplay(item->type) : "… | |
+ item->type > '1' ? '|' : '+', | |
+ items[i]->username); | |
} | |
break; | |
} |