+2023-06-30 Bruno Haible <bruno@clisp.org>
+
+ Accommodate a difference between mbrtowc and mbrtoc32.
+ * lib/mbiter.h (mbiter_multi_next): Handle the mbrtoc32 return value
+ (size_t)(-3).
+ * lib/mbuiter.h (mbuiter_multi_next): Likewise.
+ * lib/mbfile.h (mbfile_multi_getc): Likewise.
+
2023-06-30 Bruno Haible <bruno@clisp.org>
doc: Reference some reported bugs (in comments).
assert (mbf->buf[0] == '\0');
assert (mbc->wc == 0);
}
+ else if (bytes == (size_t) -3)
+ /* The previous multibyte sequence produced an additional 32-bit
+ wide character. */
+ bytes = 0;
mbc->wc_valid = true;
break;
}
assert (*iter->cur.ptr == '\0');
assert (iter->cur.wc == 0);
}
+ else if (iter->cur.bytes == (size_t) -3)
+ /* The previous multibyte sequence produced an additional 32-bit
+ wide character. */
+ iter->cur.bytes = 0;
iter->cur.wc_valid = true;
/* When in the initial state, we can go back treating ASCII
assert (*iter->cur.ptr == '\0');
assert (iter->cur.wc == 0);
}
+ else if (iter->cur.bytes == (size_t) -3)
+ /* The previous multibyte sequence produced an additional 32-bit
+ wide character. */
+ iter->cur.bytes = 0;
iter->cur.wc_valid = true;
/* When in the initial state, we can go back treating ASCII