From 604b18befd9918a65a8f370a6051864fcda2f623 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Fri, 31 May 2024 20:31:55 +0200 Subject: Pass a tabsize to ucswdth() --- include/unicode/string.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/unicode/string.h b/include/unicode/string.h index ed082a1..6908fe7 100644 --- a/include/unicode/string.h +++ b/include/unicode/string.h @@ -30,7 +30,7 @@ enum normform { /* clang-format on */ -[[nodiscard]] size_t u8wdth(struct u8view); +[[nodiscard]] size_t u8wdth(struct u8view, int); [[nodiscard]] size_t u8gcnt(struct u8view); [[nodiscard]] size_t u8wcnt(struct u8view); [[nodiscard]] size_t u8wcnt_human(struct u8view); @@ -49,7 +49,7 @@ size_t u8wnext_human(struct u8view *, struct u8view *); enum normform); /* Encoding-generic macros */ -#define ucswdth(sv) _Generic((sv), struct u8view: u8wdth)((sv)) +#define ucswdth(sv, ts) _Generic((sv), struct u8view: u8wdth)((sv), (ts)) #define ucsgcnt(sv) _Generic((sv), struct u8view: u8gcnt)((sv)) #define ucswcnt(sv) _Generic((sv), struct u8view: u8wcnt)((sv)) #define ucswcnt_human(sv) _Generic((sv), struct u8view: u8wcnt_human)((sv)) -- cgit v1.2.3