aboutsummaryrefslogtreecommitdiff
path: root/lib/mbstring/u8cspn.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mbstring/u8cspn.c')
-rw-r--r--lib/mbstring/u8cspn.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/mbstring/u8cspn.c b/lib/mbstring/u8cspn.c
index 4892de4..827373f 100644
--- a/lib/mbstring/u8cspn.c
+++ b/lib/mbstring/u8cspn.c
@@ -1,13 +1,13 @@
#include "mbstring.h"
size_t
-u8cspn(const char8_t *s, size_t n, const rune *p, size_t m)
+u8cspn(struct u8view sv, const rune *p, size_t n)
{
rune ch;
- size_t k, l;
+ size_t k, w;
- for (k = 0; (l = u8next(&ch, &s, &n)); k += l) {
- for (size_t i = 0; i < m; i++) {
+ for (k = 0; w = u8next(&ch, &sv); k += w) {
+ for (size_t i = 0; i < n; i++) {
if (p[i] == ch)
goto found;
}