53 const unsigned char *end = (
const unsigned char *) str + len;
54 const unsigned char *cp;
66 for (cp = (
const unsigned char *) str; cp < end; cp++) {
84 ||
UNEXPECTED((ch = *++cp) < (c0 == 0xe0 ? 0xa0 : 0x80))
95 ||
UNEXPECTED((ch = *++cp) < (c0 == 0xf0 ? 0x90 : 0x80))
121 #define STR(x) vstring_str(x)
122 #define LEN(x) VSTRING_LEN(x)
int vstring_get_nonl(VSTRING *vp, VSTREAM *fp)
int main(int argc, char **argv)
VSTREAM * vstream_printf(const char *fmt,...)
VSTRING * vstring_alloc(ssize_t len)
int vstream_fflush(VSTREAM *stream)
#define vstream_fwrite(v, b, n)
VSTRING * vstring_free(VSTRING *vp)
int valid_utf8_string(const char *str, ssize_t len)