Define ui.c BUF_LEN with enum
parent
fa270d9287
commit
0b429a7ccc
4
ui.c
4
ui.c
|
@ -299,12 +299,12 @@ static void logDown(void) {
|
||||||
ui.scroll = MIN(ui.scroll + logHeight() / 2, LOG_LINES);
|
ui.scroll = MIN(ui.scroll + logHeight() / 2, LOG_LINES);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enum { BUF_LEN = 512 };
|
||||||
static struct {
|
static struct {
|
||||||
wchar_t buf[512];
|
wchar_t buf[BUF_LEN];
|
||||||
wchar_t *ptr;
|
wchar_t *ptr;
|
||||||
wchar_t *end;
|
wchar_t *end;
|
||||||
} line = { .ptr = line.buf, .end = line.buf };
|
} line = { .ptr = line.buf, .end = line.buf };
|
||||||
static const size_t BUF_LEN = sizeof(line.buf) / sizeof(line.buf[0]);
|
|
||||||
|
|
||||||
static void left(void) {
|
static void left(void) {
|
||||||
if (line.ptr > line.buf) line.ptr--;
|
if (line.ptr > line.buf) line.ptr--;
|
||||||
|
|
Loading…
Reference in New Issue