X-Git-Url: https://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Flinebreak.c;h=73dba732d4a7991a1ae277182a5ecfe2f5dc87b6;hb=6684d992bfedd21bf8dea1fbb52392c1d7c8159b;hp=0ad46681ef3038ca914e5fe06afeb42f83251723;hpb=00065b7cd8ec54f7d94a60b2fcf8b3ce87bea953;p=gnulib.git diff --git a/lib/linebreak.c b/lib/linebreak.c index 0ad46681e..73dba732d 100644 --- a/lib/linebreak.c +++ b/lib/linebreak.c @@ -25,14 +25,11 @@ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include #include "c-ctype.h" #include "xsize.h" - -#include "utf8-ucs4-unsafe.h" - -#include "utf16-ucs4.h" +#include "unistr.h" #ifdef unused static inline int -u32_mbtouc (unsigned int *puc, const unsigned int *s, size_t n) +u32_mbtouc_unsafe (unsigned int *puc, const unsigned int *s, size_t n) { *puc = *s; return 1; @@ -496,7 +493,7 @@ u16_width (const unsigned short *s, size_t n, const char *encoding) unsigned int uc; int w; - s += u16_mbtouc (&uc, s, s_end - s); + s += u16_mbtouc_unsafe (&uc, s, s_end - s); if (uc == 0) break; /* end of string reached */ @@ -754,7 +751,7 @@ u16_possible_linebreaks (const unsigned short *s, size_t n, const char *encoding while (s < s_end) { unsigned int uc; - int count = u16_mbtouc (&uc, s, s_end - s); + int count = u16_mbtouc_unsafe (&uc, s, s_end - s); int prop = lbrkprop_lookup (uc); if (prop == LBP_BK) @@ -1067,7 +1064,7 @@ u16_width_linebreaks (const unsigned short *s, size_t n, while (s < s_end) { unsigned int uc; - int count = u16_mbtouc (&uc, s, s_end - s); + int count = u16_mbtouc_unsafe (&uc, s, s_end - s); /* Respect the override. */ if (o != NULL && *o != UC_BREAK_UNDEFINED)