38#if defined(_MSC_VER) && _MSC_VER < 1800
49#define ARRAY_LEN(x) (sizeof(x) / sizeof(x[0]))
81 mid = (min + max) / 2;
82 const unsigned char *mid_ptr =
83 (
const unsigned char *)ptr + mid * size;
91 else if (ch > mid_end)
Header file for common definitions in the libunibreak library.
unsigned short utf16_t
Type for UTF-16 data points.
Definition: unibreakbase.h:48
unsigned int utf32_t
Type for UTF-32 data points.
Definition: unibreakbase.h:49
unsigned char utf8_t
Type for UTF-8 data points.
Definition: unibreakbase.h:47
__inline const void * ub_bsearch(utf32_t ch, const void *ptr, size_t count, size_t size)
Definition: unibreakdef.h:72
utf32_t ub_get_next_char_utf8(const utf8_t *s, size_t len, size_t *ip)
Gets the next Unicode character in a UTF-8 sequence.
Definition: unibreakdef.c:50
utf32_t(* get_next_char_t)(const void *, size_t, size_t *)
Abstract function interface for ub_get_next_char_utf8, ub_get_next_char_utf16, and ub_get_next_char_u...
Definition: unibreakdef.h:65
utf32_t ub_get_next_char_utf32(const utf32_t *s, size_t len, size_t *ip)
Gets the next Unicode character in a UTF-32 sequence.
Definition: unibreakdef.c:159
utf32_t ub_get_next_char_utf16(const utf16_t *s, size_t len, size_t *ip)
Gets the next Unicode character in a UTF-16 sequence.
Definition: unibreakdef.c:118