diff options
author | Curtis McEnroe | 2018-08-07 14:14:07 -0400 |
---|---|---|
committer | Curtis McEnroe | 2018-08-07 14:14:07 -0400 |
commit | 0b429a7ccc372a3d52445ab248d1299e9abd58db (patch) | |
tree | 041af9cf8e292bed1575bad295ada40de7f182ac /ui.c | |
parent | fa270d92873a7fd595e093eb3c07409e336620c0 (diff) |
Define ui.c BUF_LEN with enum
Diffstat (limited to 'ui.c')
-rw-r--r-- | ui.c | 4 |
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--; |