summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--chat.c2
-rw-r--r--chat.h2
-rw-r--r--handle.c4
-rw-r--r--input.c2
-rw-r--r--ui.c28
5 files changed, 19 insertions, 19 deletions
diff --git a/chat.c b/chat.c
index f52bc3a..cbd9790 100644
--- a/chat.c
+++ b/chat.c
@@ -68,7 +68,7 @@ int main(int argc, char *argv[]) {
 	chat.user = strdup(chat.nick);
 
 	uiInit();
-	uiChat("Traveling...");
+	uiLog("Traveling...");
 	uiDraw();
 
 	int sock = ircConnect(host, port, webPass);
diff --git a/chat.h b/chat.h
index 04e3c6b..e63e0cf 100644
--- a/chat.h
+++ b/chat.h
@@ -40,7 +40,7 @@ void uiHide(void);
 void uiDraw(void);
 void uiRead(void);
 void uiTopic(const char *topic);
-void uiChat(const char *line);
+void uiLog(const char *line);
 
 __attribute__((format(printf, 1, 2)))
 void uiFmt(const char *format, ...);
diff --git a/handle.c b/handle.c
index 7bbf3e7..fa13ca8 100644
--- a/handle.c
+++ b/handle.c
@@ -58,9 +58,9 @@ static void handle432(char *prefix, char *params) {
 	shift(&params);
 	shift(&params);
 	char *mesg = shift(&params);
-	uiChat("You can't use that name here");
+	uiLog("You can't use that name here");
 	uiFmt("Sheriff says, \"%s\"", mesg);
-	uiChat("Type /nick <name> to choose a new one");
+	uiLog("Type /nick <name> to choose a new one");
 }
 
 static void handle001(char *prefix, char *params) {
diff --git a/input.c b/input.c
index 53957ec..51fe947 100644
--- a/input.c
+++ b/input.c
@@ -60,7 +60,7 @@ static void inputNick(wchar_t *params) {
 	if (nick) {
 		ircFmt("NICK %ls\r\n", nick);
 	} else {
-		uiChat("/nick requires a name");
+		uiLog("/nick requires a name");
 	}
 }
 
diff --git a/ui.c b/ui.c
index 341025c..b014668 100644
--- a/ui.c
+++ b/ui.c
@@ -37,12 +37,12 @@
 #define MIN(a, b) ((a) < (b) ? (a) : (b))
 
 static const int TOPIC_COLS = 512;
-static const int CHAT_LINES = 100;
 static const int INPUT_COLS = 512;
+static const int LOG_LINES = 100;
 
 static struct {
 	WINDOW *topic;
-	WINDOW *chat;
+	WINDOW *log;
 	WINDOW *input;
 	size_t cursor;
 } ui;
@@ -67,10 +67,10 @@ void uiInit(void) {
 	ui.topic = newpad(2, TOPIC_COLS);
 	mvwhline(ui.topic, 1, 0, ACS_HLINE, TOPIC_COLS);
 
-	ui.chat = newpad(CHAT_LINES, COLS);
-	wsetscrreg(ui.chat, 0, CHAT_LINES - 1);
-	scrollok(ui.chat, true);
-	wmove(ui.chat, CHAT_LINES - (LINES - 4) - 1, 0);
+	ui.log = newpad(LOG_LINES, COLS);
+	wsetscrreg(ui.log, 0, LOG_LINES - 1);
+	scrollok(ui.log, true);
+	wmove(ui.log, LOG_LINES - (LINES - 4) - 1, 0);
 
 	ui.input = newpad(2, INPUT_COLS);
 	mvwhline(ui.input, 0, 0, ACS_HLINE, INPUT_COLS);
@@ -79,8 +79,8 @@ void uiInit(void) {
 }
 
 static void uiResize(void) {
-	wresize(ui.chat, CHAT_LINES, COLS);
-	wmove(ui.chat, CHAT_LINES - 1, COLS - 1);
+	wresize(ui.log, LOG_LINES, COLS);
+	wmove(ui.log, LOG_LINES - 1, COLS - 1);
 }
 
 void uiHide(void) {
@@ -98,8 +98,8 @@ void uiDraw(void) {
 		1, lastCol
 	);
 	pnoutrefresh(
-		ui.chat,
-		CHAT_LINES - (LINES - 4), 0,
+		ui.log,
+		LOG_LINES - (LINES - 4), 0,
 		2, 0,
 		lastLine - 2, lastCol
 	);
@@ -194,9 +194,9 @@ void uiTopic(const char *topic) {
 	uiAdd(ui.topic, topic);
 }
 
-void uiChat(const char *line) {
-	waddch(ui.chat, '\n');
-	uiAdd(ui.chat, line);
+void uiLog(const char *line) {
+	waddch(ui.log, '\n');
+	uiAdd(ui.log, line);
 }
 
 void uiFmt(const char *format, ...) {
@@ -206,7 +206,7 @@ void uiFmt(const char *format, ...) {
 	vasprintf(&buf, format, ap);
 	va_end(ap);
 	if (!buf) err(EX_OSERR, "vasprintf");
-	uiChat(buf);
+	uiLog(buf);
 	free(buf);
 }
 
nJune McEnroe This is not really how you're supposed to use the select system, I don't think, since the mandoc package actually creates those files, but it does work. This lets me actually use the git installed by MacPorts. 2020-09-12Move /opt/local behind /usr againJune McEnroe The reason I did this with pkgsrc was because I actually don't want the man(1) from mandoc, since it won't follow MANSECT. Same applies to MacPorts. I wish I could disable its man(1) with a variant or whatever. 2020-09-12Enable toc in cgit renderings of man pagesJune McEnroe But keep it disabled for READMEs since they always use non-standard sections and the TOC is just distracting there, I think. Also add the style so its h1 is the same size as the ones inside sections... 2020-09-11Install mandoc on macOSJune McEnroe 2020-09-11Rewrite install script yet againJune McEnroe 2020-09-11Remove NetBSD from install scriptJune McEnroe I never use it. 2020-09-11Use MacPorts rather than pkgsrcJune McEnroe My system is probably such a mess now... 2020-09-11Add debian VM name to sshJune McEnroe 2020-09-11Add influencer tweetJune McEnroe 2020-09-10Add The Kingdom of GodsJune McEnroe Reading has really slowed down :( 2020-09-07Add SunglassesJune McEnroe An IRC find. 2020-09-06Add Between the BreathsJune McEnroe One of those good songs from a soundtrack of a film that probably isn't? The summary sounds a lot more interesting than the title implies, at least. 2020-09-04Open /dev/tty in nudgeJune McEnroe This makes it work even when it's run connected to a pipe, i.e. as the notify command of catgirl... 2020-09-04Add nudgeJune McEnroe 2020-09-03Build fbclock with -lzJune McEnroe I guess this got lost somewhere, long ago... 2020-08-29Add tweets from retweetsJune McEnroe