summaryrefslogtreecommitdiffstats
path: root/utf8.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2023-01-08 23:26:09 +0000
committerThomas Adam <thomas@xteddy.org>2023-01-08 23:26:09 +0000
commit5086377f30aabcd45f44359b8118ffeeb89da5cb (patch)
treebd19d1f4f63e128aa3979f4c6b9ecab2a3b722fc /utf8.c
parent2a32565e0c882c9e78ef9c7d52476c3574331f62 (diff)
parent7c0789d2d2721b70e04fe6a589f644797d2b5e1f (diff)
Merge branch 'obsd-master'
Diffstat (limited to 'utf8.c')
-rw-r--r--utf8.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/utf8.c b/utf8.c
index 042ddf89..76645363 100644
--- a/utf8.c
+++ b/utf8.c
@@ -230,10 +230,13 @@ utf8_width(struct utf8_data *ud, int *width)
return (UTF8_ERROR);
}
log_debug("UTF-8 %.*s is %08X", (int)ud->size, ud->data, (u_int)wc);
+<<<<<<< HEAD
#ifdef HAVE_UTF8PROC
*width = utf8proc_wcwidth(wc);
log_debug("utf8proc_wcwidth(%08X) returned %d", (u_int)wc, *width);
#else
+=======
+>>>>>>> obsd-master
*width = wcwidth(wc);
log_debug("wcwidth(%08X) returned %d", (u_int)wc, *width);
if (*width < 0) {
@@ -243,7 +246,10 @@ utf8_width(struct utf8_data *ud, int *width)
*/
*width = (wc >= 0x80 && wc <= 0x9f) ? 0 : 1;
}
+<<<<<<< HEAD
#endif
+=======
+>>>>>>> obsd-master
if (*width >= 0 && *width <= 0xff)
return (UTF8_DONE);
return (UTF8_ERROR);