From 5dbf53a1c512f9163744874e3d502e9f9e2808da Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Tue, 29 Oct 2024 21:59:03 +0100 Subject: Make ucswdth() take a current width --- lib/unicode/string/u8wdth.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib/unicode') diff --git a/lib/unicode/string/u8wdth.c b/lib/unicode/string/u8wdth.c index db51b06..71581d3 100644 --- a/lib/unicode/string/u8wdth.c +++ b/lib/unicode/string/u8wdth.c @@ -2,11 +2,10 @@ #include "unicode/prop.h" #include "unicode/string.h" -size_t -u8wdth(u8view_t sv, int ts) +ptrdiff_t +u8wdth(u8view_t sv, ptrdiff_t n, int ts) { rune ch; - size_t n = 0; while (ucsnext(&ch, &sv) != 0) { if (ch == '\t') -- cgit v1.2.3