From 89d416806b74853d79eb76e3a37fde3f4d807ffd Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 10 Nov 2023 09:20:01 +0530 Subject: [PATCH] ... --- kitty/simd-string.c | 2 +- kitty/simd-string.h | 2 +- kitty/vt-parser.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/kitty/simd-string.c b/kitty/simd-string.c index 210829fc1..663e388c1 100644 --- a/kitty/simd-string.c +++ b/kitty/simd-string.c @@ -88,6 +88,6 @@ find_either_of_two_chars_simple(uint8_t *haystack, const size_t sz, const uint8_ #undef SHIFT_OP uint8_t* -find_either_of_two_chars(uint8_t *haystack, const size_t sz, const uint8_t a, const uint8_t b) { +find_either_of_two_bytes(uint8_t *haystack, const size_t sz, const uint8_t a, const uint8_t b) { return find_either_of_two_chars_simple(haystack, sz, a, b); } diff --git a/kitty/simd-string.h b/kitty/simd-string.h index 5344cbcb6..717494c12 100644 --- a/kitty/simd-string.h +++ b/kitty/simd-string.h @@ -20,4 +20,4 @@ typedef struct ByteLoader { uint8_t byte_loader_peek(const ByteLoader *self); void byte_loader_init(ByteLoader *self, const uint8_t *buf, unsigned int sz); uint8_t byte_loader_next(ByteLoader *self); -uint8_t* find_either_of_two_chars(uint8_t *haystack, const size_t sz, const uint8_t a, const uint8_t b); +uint8_t* find_either_of_two_bytes(uint8_t *haystack, const size_t sz, const uint8_t a, const uint8_t b); diff --git a/kitty/vt-parser.c b/kitty/vt-parser.c index 47e700a35..926fd0375 100644 --- a/kitty/vt-parser.c +++ b/kitty/vt-parser.c @@ -396,7 +396,7 @@ consume_esc(PS *self) { static bool find_st_terminator(PS *self, size_t *end_pos) { const size_t sz = self->read.sz - self->read.pos; - uint8_t *q = find_either_of_two_chars(self->buf + self->read.pos, sz, BEL, ESC_ST); + uint8_t *q = find_either_of_two_bytes(self->buf + self->read.pos, sz, BEL, ESC_ST); if (q == NULL) { self->read.pos += sz; return false; @@ -1447,7 +1447,7 @@ consume_input(PS *self) { static bool find_pending_stop_csi(PS *self) { const size_t sz = self->read.sz - self->read.pos; - uint8_t *q = find_either_of_two_chars(self->buf + self->read.pos, sz, ESC, 'l'); + uint8_t *q = find_either_of_two_bytes(self->buf + self->read.pos, sz, ESC, 'l'); if (q == NULL) { self->read.pos += sz; return false;