From db764a15bb2ad17adb7fd4616595d1b497fd4375 Mon Sep 17 00:00:00 2001 From: Cem Keylan Date: Sat, 8 Oct 2022 15:59:57 +0200 Subject: imv: reflect libgrapheme API changes --- ...e-update-libgrapheme-API-to-version-2.0.0.patch | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 wayland/imv/patches/0003-console-update-libgrapheme-API-to-version-2.0.0.patch (limited to 'wayland/imv/patches/0003-console-update-libgrapheme-API-to-version-2.0.0.patch') diff --git a/wayland/imv/patches/0003-console-update-libgrapheme-API-to-version-2.0.0.patch b/wayland/imv/patches/0003-console-update-libgrapheme-API-to-version-2.0.0.patch new file mode 100644 index 00000000..3afdf52d --- /dev/null +++ b/wayland/imv/patches/0003-console-update-libgrapheme-API-to-version-2.0.0.patch @@ -0,0 +1,38 @@ +From 10ddb6571e811be121ed62d5725ddaf40e3923dc Mon Sep 17 00:00:00 2001 +From: Cem Keylan +Date: Fri, 7 Oct 2022 13:03:15 +0200 +Subject: [PATCH] console: update libgrapheme API to version 2.0.0 + +libgrapheme recently saw its second major version which was "refactored +for correctness and conformance"[1]. + +[1]: http://lists.suckless.org/news/2210/0036.html +--- + src/console.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/console.c b/src/console.c +index 9db18e7..22803e1 100644 +--- a/src/console.c ++++ b/src/console.c +@@ -52,7 +52,7 @@ static size_t next_char(char *buffer, size_t position) + return result; + #elif defined(IMV_USE_GRAPHEME) + if (buffer[position] != 0) { +- return position + grapheme_next_character_break(buffer + position, SIZE_MAX); ++ return position + grapheme_next_character_break_utf8(buffer + position, SIZE_MAX); + } else { + return position; + } +@@ -85,7 +85,7 @@ static size_t prev_char(char *buffer, size_t position) + size_t result = 0; + size_t step; + do { +- step = grapheme_next_character_break(buffer + result, SIZE_MAX); ++ step = grapheme_next_character_break_utf8(buffer + result, SIZE_MAX); + if (result + step >= position) + break; + result += step; +-- +2.38.0 + -- cgit v1.2.3