about summary refs log tree commit diff
path: root/ui.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2018-08-07 14:14:07 -0400
committerJune McEnroe <june@causal.agency>2018-08-07 14:14:07 -0400
commit0b429a7ccc372a3d52445ab248d1299e9abd58db (patch)
tree041af9cf8e292bed1575bad295ada40de7f182ac /ui.c
parentHack clang into checking uiFmt format strings (diff)
downloadcatgirl-0b429a7ccc372a3d52445ab248d1299e9abd58db.tar.gz
catgirl-0b429a7ccc372a3d52445ab248d1299e9abd58db.zip
Define ui.c BUF_LEN with enum
Diffstat (limited to 'ui.c')
-rw-r--r--ui.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui.c b/ui.c
index 972d824..5cf62a1 100644
--- a/ui.c
+++ b/ui.c
@@ -299,12 +299,12 @@ static void logDown(void) {
 	ui.scroll = MIN(ui.scroll + logHeight() / 2, LOG_LINES);
 }
 
+enum { BUF_LEN = 512 };
 static struct {
-	wchar_t buf[512];
+	wchar_t buf[BUF_LEN];
 	wchar_t *ptr;
 	wchar_t *end;
 } line = { .ptr = line.buf, .end = line.buf };
-static const size_t BUF_LEN = sizeof(line.buf) / sizeof(line.buf[0]);
 
 static void left(void) {
 	if (line.ptr > line.buf) line.ptr--;
ed flagJune McEnroe 2020-02-11Add chroot targetJune McEnroe 2020-02-11Exit focus and paste modes on err exitJune McEnroe 2020-02-11Add startup GPLv3 note and URLJune McEnroe 2020-02-11Make sure -D_GNU_SOURCE ends up in CFLAGS on LinuxJune McEnroe 2020-02-11Add note about setting PKG_CONFIG_PATHJune McEnroe 2020-02-11Rename query ID on nick changeJune McEnroe 2020-02-11Call completeClear when closing a windowJune McEnroe 2020-02-11Don't insert color codes for non-mentionsJune McEnroe 2020-02-11Take first two words in colorMentionsJune McEnroe 2020-02-11Use time_t for save signatureJune McEnroe 2020-02-11Set self.nick to * initiallyJune McEnroe 2020-02-11Define ColorCap instead of hardcoding 100June McEnroe 2020-02-11Move hash to top of chat.hJune McEnroe 2020-02-11Move base64 out of chat.hJune McEnroe 2020-02-11Move XDG_SUBDIR out of chat.hJune McEnroe 2020-02-11Fix whois idle unit calculationJune McEnroe 2020-02-11Cast towupper to wchar_tJune McEnroe 2020-02-11Cast set but unused variables to voidJune McEnroe 2020-02-11Declare strlcatJune McEnroe 2020-02-11Check if VDSUSP existsJune McEnroe 2020-02-11Fix completeReplace iterationJune McEnroe 2020-02-11Use pkg(8) to configure on FreeBSDJune McEnroe 2020-02-11Remove legacy codeJune McEnroe 2020-02-11Add INSTALLING section to READMEJune McEnroe