sacc

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

commit 7c58c064edf8f33e788423d4e495b2d1e126f2ff
parent 5bf8439ba81e8d9235923dc3f8effa4a105ab8ba
Author: Quentin Rameau <quinq@fifth.space>
Date:   Sun, 30 Jul 2017 19:13:39 +0200

Prefix all ui-related function with "ui"

Diffstat:
Mcommon.h | 6+++---
Msacc.c | 10+++++-----
Mui_ti.c | 8++++----
Mui_txt.c | 6+++---
4 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/common.h b/common.h @@ -23,10 +23,10 @@ struct dir { }; void die(const char *fmt, ...); -void display(Item *item); -Item *selectitem(Item *entry); -void status(char *fmt, ...); const char *typedisplay(char t); +void uidisplay(Item *item); +Item *uiselectitem(Item *entry); +void uistatus(char *fmt, ...); void uicleanup(void); char *uiprompt(char *fmt, ...); void uisetup(void); diff --git a/sacc.c b/sacc.c @@ -342,7 +342,7 @@ connectto(const char *host, const char *port) int sock, r; if (r = getaddrinfo(host, port, &hints, &addrs)) { - status("Can't resolve hostname ā€œ%sā€: %s", host, gai_strerror(r)); + uistatus("Can't resolve hostname ā€œ%sā€: %s", host, gai_strerror(r)); return -1; } @@ -357,11 +357,11 @@ connectto(const char *host, const char *port) break; } if (sock < 0) { - status("Can't open socket: %s", strerror(errno)); + uistatus("Can't open socket: %s", strerror(errno)); return -1; } if (r < 0) { - status("Can't connect to: %s:%s: %s", host, port, strerror(errno)); + uistatus("Can't connect to: %s:%s: %s", host, port, strerror(errno)); return -1; } @@ -664,8 +664,8 @@ delve(Item *hole) return; do { - display(entry); - hole = selectitem(entry); + uidisplay(entry); + hole = uiselectitem(entry); } while (hole == entry); } } diff --git a/ui_ti.c b/ui_ti.c @@ -119,7 +119,7 @@ help(Item *entry) } void -status(char *fmt, ...) +uistatus(char *fmt, ...) { va_list ap; @@ -163,7 +163,7 @@ displaystatus(Item *item) } void -display(Item *entry) +uidisplay(Item *entry) { Item **items; Dir *dir; @@ -295,12 +295,12 @@ jumptoline(Item *entry, ssize_t line, int absolute) dir->printoff = lastpagetop; } - display(entry); + uidisplay(entry); return; } Item * -selectitem(Item *entry) +uiselectitem(Item *entry) { Dir *dir; int plines = lines-2; diff --git a/ui_txt.c b/ui_txt.c @@ -57,7 +57,7 @@ ndigits(size_t n) } void -status(char *fmt, ...) +uistatus(char *fmt, ...) { va_list arg; @@ -107,7 +107,7 @@ uiprompt(char *fmt, ...) } void -display(Item *entry) +uidisplay(Item *entry) { Item **items; Dir *dir; @@ -133,7 +133,7 @@ display(Item *entry) } Item * -selectitem(Item *entry) +uiselectitem(Item *entry) { Dir *dir; static char c;