Introduction
Introduction Statistics Contact Development Disclaimer Help
Fix current url display in screen UI - sacc - sacc(omys), simple console gopher…
git clone git://bitreich.org/sacc/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65…
Log
Files
Refs
Tags
LICENSE
---
commit c69cb6fe7293ab237206addbbc89e809e6f3d26e
parent 90277d09e34282cbd7c21fbc6b0f5190aca3df21
Author: Quentin Rameau <[email protected]>
Date: Sun, 3 Sep 2017 20:59:46 +0200
Fix current url display in screen UI
Diffstat:
M ui_ti.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/ui_ti.c b/ui_ti.c
@@ -147,6 +147,7 @@ static void
displaystatus(Item *item)
{
Dir *dir = item->dat;
+ char *fmt;
size_t nitems = dir ? dir->nitems : 0;
unsigned long long printoff = dir ? dir->printoff : 0;
int n;
@@ -155,10 +156,12 @@ displaystatus(Item *item)
putp(tparm(cursor_address, lines-1, 0));
putp(tparm(enter_standout_mode));
- n = printf("%3lld%%| %s:%s%s",
+ fmt = (strcmp(item->port, "70") && strcmp(item->port, "gopher")) ?
+ "%3lld%%| %s:%5$s/%c%s" : "%3lld%%| %s/%c%s";
+ n = printf(fmt,
(printoff + lines-1 >= nitems) ? 100 :
(printoff + lines-1) * 100 / nitems,
- item->host, item->port, item->selector);
+ item->host, item->type, item->selector, item->port);
putp(tparm(exit_standout_mode));
printf("%*s", columns-n, " ");
You are viewing proxied material from bitreich.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.