diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-10-29 21:59:03 +0100 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-10-29 21:59:03 +0100 |
commit | 5dbf53a1c512f9163744874e3d502e9f9e2808da (patch) | |
tree | a3e1b78c447dd530459fe58eb6c763badb5fa4f1 /lib | |
parent | 3f7c3d8baa64fecbfb1a30db853731897035fd0b (diff) |
Make ucswdth() take a current width
Diffstat (limited to 'lib')
-rw-r--r-- | lib/unicode/string/u8wdth.c | 5 |
1 files changed, 2 insertions, 3 deletions
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') |