=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/tmux.h,v retrieving revision 1.180 retrieving revision 1.181 diff -c -r1.180 -r1.181 *** src/usr.bin/tmux/tmux.h 2009/11/18 13:16:33 1.180 --- src/usr.bin/tmux/tmux.h 2009/11/18 17:02:17 1.181 *************** *** 1,4 **** ! /* $OpenBSD: tmux.h,v 1.180 2009/11/18 13:16:33 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: tmux.h,v 1.181 2009/11/18 17:02:17 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 74,79 **** --- 74,85 ---- #define PRINT_LENGTH 512 /* printed error/message size */ #define ENVIRON_LENGTH 1024 /* environment variable length */ + /* + * UTF-8 data size. This must be big enough to hold combined characters as well + * as single. + */ + #define UTF8_SIZE 9 + /* Fatal errors. */ #define fatal(msg) log_fatal("%s: %s", __func__, msg); #define fatalx(msg) log_fatalx("%s: %s", __func__, msg); *************** *** 525,537 **** #define MODE_MOUSE 0x10 /* ! * A single UTF-8 character. * * The data member in this must be UTF8_SIZE to allow screen_write_copy to * reinject stored UTF-8 data back into screen_write_cell after combining (ugh * XXX XXX). */ - #define UTF8_SIZE 9 struct utf8_data { u_char data[UTF8_SIZE]; --- 531,542 ---- #define MODE_MOUSE 0x10 /* ! * A single UTF-8 character. * * The data member in this must be UTF8_SIZE to allow screen_write_copy to * reinject stored UTF-8 data back into screen_write_cell after combining (ugh * XXX XXX). */ struct utf8_data { u_char data[UTF8_SIZE]; *************** *** 1674,1679 **** --- 1679,1691 ---- char *grid_string_cells(struct grid *, u_int, u_int, u_int); void grid_duplicate_lines( struct grid *, u_int, struct grid *, u_int, u_int); + + /* grid-utf8.c */ + size_t grid_utf8_size(const struct grid_utf8 *); + size_t grid_utf8_copy(const struct grid_utf8 *, char *, size_t); + void grid_utf8_set(struct grid_utf8 *, const struct utf8_data *); + int grid_utf8_append(struct grid_utf8 *, const struct utf8_data *); + int grid_utf8_compare(const struct grid_utf8 *, const struct grid_utf8 *); /* grid-view.c */ const struct grid_cell *grid_view_peek_cell(struct grid *, u_int, u_int);