diff options
Diffstat (limited to 'usr.bin/tmux/tmux.h')
-rw-r--r-- | usr.bin/tmux/tmux.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/usr.bin/tmux/tmux.h b/usr.bin/tmux/tmux.h index 636cb64346f..8370e855efc 100644 --- a/usr.bin/tmux/tmux.h +++ b/usr.bin/tmux/tmux.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tmux.h,v 1.1054 2020/05/25 15:02:25 nicm Exp $ */ +/* $OpenBSD: tmux.h,v 1.1055 2020/05/25 18:19:29 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -596,10 +596,13 @@ struct msg_write_close { #define ALL_MOUSE_MODES (MODE_MOUSE_STANDARD|MODE_MOUSE_BUTTON|MODE_MOUSE_ALL) #define MOTION_MOUSE_MODES (MODE_MOUSE_BUTTON|MODE_MOUSE_ALL) +/* A single UTF-8 character. */ +typedef u_int utf8_char; + /* - * A single UTF-8 character. UTF8_SIZE must be big enough to hold combining + * An expanded UTF-8 character. UTF8_SIZE must be big enough to hold combining * characters as well. It can't be more than 32 bytes without changes to how - * big characters are stored. + * characters are stored. */ #define UTF8_SIZE 21 struct utf8_data { @@ -673,7 +676,7 @@ struct grid_cell { /* Grid extended cell entry. */ struct grid_extd_entry { - u_int data; + utf8_char data; u_short attr; u_char flags; int fg; @@ -2889,9 +2892,9 @@ u_int session_group_attached_count(struct session_group *); void session_renumber_windows(struct session *); /* utf8.c */ -u_int utf8_set_big(char, u_int); -u_int utf8_map_big(const struct utf8_data *); -void utf8_get_big(u_int, struct utf8_data *); +utf8_char utf8_build_one(char, u_int); +enum utf8_state utf8_from_data(const struct utf8_data *, utf8_char *); +void utf8_to_data(utf8_char, struct utf8_data *); void utf8_set(struct utf8_data *, u_char); void utf8_copy(struct utf8_data *, const struct utf8_data *); enum utf8_state utf8_open(struct utf8_data *, u_char); |