sed: remove compile_program use of MB_CUR_MAX
* sed/compile.c (compile_program): Use localeinfo.multibyte as it should be a bit faster than using MB_CUR_MAX.
This commit is contained in:
1 parent
e4e57d8c0d
commit
c39cfe4fa3
1 file changed
+1
-1
+1
-1
@@ -1182,7 +1182,7 @@ compile_program (struct vector *vector)
|
||||
|
||||
/* If multibyte, count the source buffer's characters. */
|
||||
idx_t src_char_num = 0;
|
||||
if (MB_CUR_MAX != 1)
|
||||
if (localeinfo.multibyte)
|
||||
for (idx_t i = 0; i < len;
|
||||
i += mcel_scan (src_buf + i, src_buf + len).len)
|
||||
src_char_num++;
|
||||
|
||||
Reference in new issue
Block a user