OpenBSD CVS

CVS log for src/usr.bin/tmux/utf8.c


[BACK] Up to [local] / src / usr.bin / tmux

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.64 / (download) - annotate - [select for diffs], Fri Sep 15 15:49:05 2023 UTC (8 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, HEAD
Changes since 1.63: +210 -10 lines
Diff to previous 1.63 (colored)

Change UTF-8 combining to inspect the previous character at the cursor
position rather than keeping the last character from the input stream,
this is how most terminals work and fixes problems with displaying these
characters in vim. GitHub issue 3600.

Revision 1.63 / (download) - annotate - [select for diffs], Fri Sep 1 14:29:11 2023 UTC (8 months, 2 weeks ago) by nicm
Branch: MAIN
Changes since 1.62: +5 -5 lines
Diff to previous 1.62 (colored)

Rewrite combined character handling to be more consistent and to support
newer Unicode combined characters (which we have to "know" are combined
since they are not width zero). GitHub issue 3600.

Revision 1.62 / (download) - annotate - [select for diffs], Mon Jul 3 08:37:14 2023 UTC (10 months, 2 weeks ago) by nicm
Branch: MAIN
Changes since 1.61: +2 -2 lines
Diff to previous 1.61 (colored)

Another warning fix for GCC from Thomas Klausner.

Revision 1.61 / (download) - annotate - [select for diffs], Fri Jun 30 21:55:09 2023 UTC (10 months, 2 weeks ago) by nicm
Branch: MAIN
Changes since 1.60: +2 -2 lines
Diff to previous 1.60 (colored)

Change a few types to fix warnings, from Thomas Klausner.

Revision 1.60 / (download) - annotate - [select for diffs], Sun Jan 8 22:15:30 2023 UTC (16 months, 1 week ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE, OPENBSD_7_3
Changes since 1.59: +10 -3 lines
Diff to previous 1.59 (colored)

Restore code to handle wcwidth failure so that unknown codepoints still
do the most likely right thing. GitHub issue 3427, patch based on an
diff from Jesse Luehrs in GitHub issue 3003.

Revision 1.59 / (download) - annotate - [select for diffs], Fri Dec 16 08:19:58 2022 UTC (17 months ago) by nicm
Branch: MAIN
Changes since 1.58: +6 -7 lines
Diff to previous 1.58 (colored)

Make U+FE0F VARIATION SELECTOR-16 change the width from 1 to 2. GitHub
issue 3409.

Revision 1.58 / (download) - annotate - [select for diffs], Thu Jun 10 07:56:47 2021 UTC (2 years, 11 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0
Changes since 1.57: +2 -2 lines
Diff to previous 1.57 (colored)

More accurate vi(1) word navigation in copy mode and on the status line.
This changes the meaning of the word-separators option - setting it to
the empty string is equivalent to the previous behavior. From Will Noble
in GitHub issue 2693.

Revision 1.57 / (download) - annotate - [select for diffs], Wed Sep 16 18:37:55 2020 UTC (3 years, 8 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8
Changes since 1.56: +3 -3 lines
Diff to previous 1.56 (colored)

Fix some warnings, GitHub issue 2382.

Revision 1.56 / (download) - annotate - [select for diffs], Tue Jul 21 05:24:33 2020 UTC (3 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.55: +15 -1 lines
Diff to previous 1.55 (colored)

Fix show-buffer when run from inside tmux, GitHub issue 2314.

Revision 1.55 / (download) - annotate - [select for diffs], Tue Jun 9 10:37:00 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.54: +2 -2 lines
Diff to previous 1.54 (colored)

Include width in error message.

Revision 1.54 / (download) - annotate - [select for diffs], Tue Jun 9 08:34:33 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.53: +54 -47 lines
Diff to previous 1.53 (colored)

It is not sensible to store pointers into an array we are going to
realloc (duh), use two trees instead.

Revision 1.53 / (download) - annotate - [select for diffs], Sat Jun 6 12:38:32 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.52: +35 -60 lines
Diff to previous 1.52 (colored)

Use bitshifts instead of a union for encoding UTF-8 into 32 bits, which
is more friendly to GCC3.

Reported by and ok aoyama@.

Revision 1.52 / (download) - annotate - [select for diffs], Tue Jun 2 20:10:23 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.51: +25 -31 lines
Diff to previous 1.51 (colored)

Allow UTF-8 characters of width 0 to be stored, it is useful to be able
to put padding cells in as width 0.

Revision 1.51 / (download) - annotate - [select for diffs], Tue Jun 2 17:17:44 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.50: +6 -6 lines
Diff to previous 1.50 (colored)

UTF-8 keys need to be big endian so the size bits are at the top.

Revision 1.50 / (download) - annotate - [select for diffs], Tue Jun 2 11:29:00 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.49: +3 -1 lines
Diff to previous 1.49 (colored)

Fail rather than fatal on UTF-8 width 0.

Revision 1.49 / (download) - annotate - [select for diffs], Tue May 26 12:50:03 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.48: +8 -4 lines
Diff to previous 1.48 (colored)

Return new character properly when converting to data.

Revision 1.48 / (download) - annotate - [select for diffs], Mon May 25 18:57:25 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.47: +20 -49 lines
Diff to previous 1.47 (colored)

Use the internal representation for UTF-8 keys instead of wchar_t and
drop some code only needed for that.

Revision 1.47 / (download) - annotate - [select for diffs], Mon May 25 18:19:29 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.46: +132 -145 lines
Diff to previous 1.46 (colored)

Tidy up new UTF-8 code and make it more generic.

Revision 1.46 / (download) - annotate - [select for diffs], Mon May 25 15:02:25 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.45: +6 -6 lines
Diff to previous 1.45 (colored)

Make some data types consistent.

Revision 1.45 / (download) - annotate - [select for diffs], Mon May 25 09:32:10 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.44: +175 -1 lines
Diff to previous 1.44 (colored)

Instead of storing all UTF-8 characters in the extended cell which means
that 14 bytes are wasted for each character in the BMP, only store
characters of three bytes or less in the cell itself and store others
(outside the BMP or with combining characters) in a separate global
tree. Can reduce grid memory use for heavy Unicode users by around 30%.

Revision 1.44 / (download) - annotate - [select for diffs], Mon Nov 25 15:04:15 2019 UTC (4 years, 5 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.43: +23 -2 lines
Diff to previous 1.43 (colored)

Add p format modifier for padding to width.

Revision 1.43 / (download) - annotate - [select for diffs], Sun May 26 17:34:45 2019 UTC (4 years, 11 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.42: +21 -1 lines
Diff to previous 1.42 (colored)

Add formats for word and line under the mouse and use them to add some
items to the pane menu.

Revision 1.42 / (download) - annotate - [select for diffs], Thu May 23 18:22:13 2019 UTC (4 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.41: +4 -2 lines
Diff to previous 1.41 (colored)

Environment variables can start with { also.

Revision 1.41 / (download) - annotate - [select for diffs], Thu May 23 14:03:44 2019 UTC (4 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.40: +7 -2 lines
Diff to previous 1.40 (colored)

Break the argument escaping code into a separate function and use it to
escape key bindings in list-keys. Also escape ~ and ; and $ properly.

Revision 1.40 / (download) - annotate - [select for diffs], Mon Mar 18 20:53:33 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.39: +1 -61 lines
Diff to previous 1.39 (colored)

Extend the #[] style syntax and use that together with previous format
changes to allow the status line to be entirely configured with a single
option.

Now that it is possible to configure their content, enable the existing
code that lets the status line be multiple lines in height. The status
option can now take a value of 2, 3, 4 or 5 (as well as the previous on
or off) to configure more than one line. The new status-format array
option configures the format of each line, the default just references
the existing status-* options, although some of the more obscure status
options may be eliminated in time.

Additions to the #[] syntax are: "align" to specify alignment (left,
centre, right), "list" for the window list and "range" to configure
ranges of text for the mouse bindings.

The "align" keyword can also be used to specify alignment of entries in
tree mode and the pane status lines.

Revision 1.39 / (download) - annotate - [select for diffs], Sun Jun 4 09:02:57 2017 UTC (6 years, 11 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.38: +1 -2 lines
Diff to previous 1.38 (colored)

Remove unused variable.

Revision 1.38 / (download) - annotate - [select for diffs], Sun Jun 4 09:02:36 2017 UTC (6 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.37: +26 -1 lines
Diff to previous 1.37 (colored)

Be more strict about escape sequences that rename windows or set titles:
ignore any that not valid UTF-8 outright, and for good measure pass the
result through our UTF-8-aware vis(3).

Revision 1.37 / (download) - annotate - [select for diffs], Wed May 31 17:56:48 2017 UTC (6 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.36: +2 -3 lines
Diff to previous 1.36 (colored)

Style and spacing nits.

Revision 1.36 / (download) - annotate - [select for diffs], Fri Mar 17 14:51:41 2017 UTC (7 years, 2 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.35: +2 -2 lines
Diff to previous 1.35 (colored)

Fix a couple of argument types.

Revision 1.35 / (download) - annotate - [select for diffs], Wed Jan 18 10:08:05 2017 UTC (7 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.34: +15 -1 lines
Diff to previous 1.34 (colored)

Plain stravis() because it will mangle UTF-8 characters, so add
utf8_stravis() which calls our existing utf8_strvis() and use it instead

Revision 1.34 / (download) - annotate - [select for diffs], Tue Oct 11 07:11:40 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.33: +28 -1 lines
Diff to previous 1.33 (colored)

Support UTF-8 entry into the command prompt.

Revision 1.33 / (download) - annotate - [select for diffs], Fri May 27 22:57:27 2016 UTC (7 years, 11 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.32: +3 -9 lines
Diff to previous 1.32 (colored)

Most of the utf8_data is fixed so simplify utf8_set to use a memcpy.

Revision 1.32 / (download) - annotate - [select for diffs], Fri Apr 29 09:11:19 2016 UTC (8 years ago) by nicm
Branch: MAIN
Changes since 1.31: +1 -9 lines
Diff to previous 1.31 (colored)

OpenBSD wcwidth() is sensible and complete so if it returns -1 it means
that a character is not printable, so return to ignoring such
characters.

Revision 1.31 / (download) - annotate - [select for diffs], Wed Apr 27 09:36:25 2016 UTC (8 years ago) by nicm
Branch: MAIN
Changes since 1.30: +9 -1 lines
Diff to previous 1.30 (colored)

Loads of platforms appear to have old or broken Unicode character type
information and are missing widths for relatively common Unicode
characters (so mbtowc() works, but wcwidth() fails). So if wcwidth()
returns -1, assume a width of 1 instead of ignoring the character.

Revision 1.30 / (download) - annotate - [select for diffs], Tue Apr 26 07:33:36 2016 UTC (8 years ago) by nicm
Branch: MAIN
Changes since 1.29: +7 -2 lines
Diff to previous 1.29 (colored)

Log wcwidth() and mbtowc() failure to make it easier to debug a Unicode
codepoint not appearing.

Revision 1.29 / (download) - annotate - [select for diffs], Wed Mar 2 15:36:03 2016 UTC (8 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.28: +30 -15 lines
Diff to previous 1.28 (colored)

Handle wcwidth() and mbtowc() failures in better style and drop
characters where we can't find the width (wcwidth() fails) on input, the
same as we drop invalid UTF-8. Suggested by schwarze@.

Revision 1.28 / (download) - annotate - [select for diffs], Tue Mar 1 12:02:08 2016 UTC (8 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.27: +27 -423 lines
Diff to previous 1.27 (colored)

Use system wcwidth() instead of carrying around UTF-8 width tables.

Revision 1.27 / (download) - annotate - [select for diffs], Sun Jan 31 09:57:41 2016 UTC (8 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.26: +38 -1 lines
Diff to previous 1.26 (colored)

Whoops, need this for the previous reverse trim commit too.

Revision 1.26 / (download) - annotate - [select for diffs], Tue Jan 19 15:59:12 2016 UTC (8 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.25: +2 -2 lines
Diff to previous 1.25 (colored)

I no longer use my SourceForge address so replace it.

Revision 1.25 / (download) - annotate - [select for diffs], Fri Nov 20 22:02:54 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.24: +2 -1 lines
Diff to previous 1.24 (colored)

Memory leaks and an uninitialized part of utf8_data, from Patrick Palka.

Revision 1.24 / (download) - annotate - [select for diffs], Sat Nov 14 12:03:23 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.23: +2 -2 lines
Diff to previous 1.23 (colored)

The private use area at U+E000 to U+F8FF is not very useful if it is
width 0, make it width 1 instead.

Revision 1.23 / (download) - annotate - [select for diffs], Sat Nov 14 11:45:43 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.22: +35 -47 lines
Diff to previous 1.22 (colored)

All these return values from utf8_* are confusing, use an enum.

Revision 1.22 / (download) - annotate - [select for diffs], Sat Nov 14 11:13:44 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.21: +14 -14 lines
Diff to previous 1.21 (colored)

Rename a variable in utf8_combine for consistency and use 0xfffd for
unknown Unicode.

Revision 1.21 / (download) - annotate - [select for diffs], Sat Nov 14 10:56:31 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.20: +24 -20 lines
Diff to previous 1.20 (colored)

Be more strict about invalid UTF-8.

Revision 1.20 / (download) - annotate - [select for diffs], Fri Nov 13 08:09:28 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.19: +18 -1 lines
Diff to previous 1.19 (colored)

Long overdue change to the way we store cells in the grid: now, instead
of storing a full grid_cell with UTF-8 data and everything, store a new
type grid_cell_entry. This can either be the cell itself (for ASCII
cells), or an offset into an extended array (per line) for UTF-8
data.

This avoid a large (8 byte) overhead on non-UTF-8 cells (by far the
majority for most users) without the complexity of the shadow array we
had before. Grid memory without any UTF-8 is about half.

The disadvantage that cells can no longer be modified in place and need
to be copied out of the grid and back but it turned out to be lot less
complicated than I expected.

Revision 1.19 / (download) - annotate - [select for diffs], Thu Nov 12 22:04:37 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.18: +58 -58 lines
Diff to previous 1.18 (colored)

Rename overly-long utf8data to ud throughout.

Revision 1.18 / (download) - annotate - [select for diffs], Thu Nov 12 12:43:36 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.17: +22 -1 lines
Diff to previous 1.17 (colored)

Add utf8_padcstr and use it to align columns in list-keys.

Revision 1.17 / (download) - annotate - [select for diffs], Thu Nov 12 12:19:57 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.16: +30 -53 lines
Diff to previous 1.16 (colored)

Tidy utf8.c a little: build table on first use, and make utf8_width take
a u_int rather than splitting and then combining again in utf8_split.

Revision 1.16 / (download) - annotate - [select for diffs], Thu Nov 12 11:10:50 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.15: +45 -1 lines
Diff to previous 1.15 (colored)

If we know the terminal outside tmux is not UTF-8, replace UTF-8 in
error messages and whatnot with underscores the same as we do when we
draw UTF-8 characters as part of the screen.

Revision 1.15 / (download) - annotate - [select for diffs], Thu Nov 12 11:05:34 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.14: +33 -3 lines
Diff to previous 1.14 (colored)

Support UTF-8 key bindings by expanding the key type from int to
uint64_t and converting UTF-8 to Unicode on input and the reverse on
output. (This allows key bindings, there are still omissions - the
largest being that the various prompts do not accept UTF-8.)

Revision 1.14 / (download) - annotate - [select for diffs], Thu Nov 5 16:44:25 2015 UTC (8 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.13: +290 -139 lines
Diff to previous 1.13 (colored)

Update the internal wcwidth(3) table of tmux(1) to match the data
in /usr/src/share/locale/ctype/en_US.UTF-8.src, with one single
exception:  Keep U+00AD SOFT HYPHEN at width 1 rather than moving
it to width 0, a tradition already observed in the old
https://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c .
While here, manually rebalance the btree for optimal lookup speed.
OK nicm@

Revision 1.13 / (download) - annotate - [select for diffs], Mon Apr 20 14:48:55 2015 UTC (9 years, 1 month ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.12: +3 -3 lines
Diff to previous 1.12 (colored)

Style nit - unnecessary brackets.

Revision 1.12 / (download) - annotate - [select for diffs], Wed Oct 8 17:35:58 2014 UTC (9 years, 7 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.11: +5 -5 lines
Diff to previous 1.11 (colored)

Add xreallocarray and remove nmemb argument from xrealloc.

Revision 1.11 / (download) - annotate - [select for diffs], Thu Apr 17 15:37:55 2014 UTC (10 years, 1 month ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.10: +120 -1 lines
Diff to previous 1.10 (colored)

Add some UTF-8 utility functions and use them to prevent the width limit
on formats from splitting UTF-8 characters improperly.

Revision 1.10 / (download) - annotate - [select for diffs], Thu Apr 17 14:45:49 2014 UTC (10 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.9: +2 -3 lines
Diff to previous 1.9 (colored)

Some more long lines.

Revision 1.9 / (download) - annotate - [select for diffs], Wed Apr 2 18:12:18 2014 UTC (10 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.8: +44 -1 lines
Diff to previous 1.8 (colored)

Support UTF-8 with choose-buffer, from Kosuke ASAMI. Also make
buffer_sample bigger to let it trim at window right edge.

Revision 1.8 / (download) - annotate - [select for diffs], Mon Mar 31 21:43:35 2014 UTC (10 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.7: +2 -2 lines
Diff to previous 1.7 (colored)

In four byte UTF-8 sequences, only three bits of the first byte should
be used. Fix from Koga Osamu.

Revision 1.7 / (download) - annotate - [select for diffs], Fri Apr 12 12:50:36 2013 UTC (11 years, 1 month ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.6: +1 -2 lines
Diff to previous 1.6 (colored)

Remove some Korean characters from the zero-width list that apparently
shouldn't be there, from Jeong Mok Cho.

Revision 1.6 / (download) - annotate - [select for diffs], Mon Jan 3 23:35:22 2011 UTC (13 years, 4 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.5: +14 -1 lines
Diff to previous 1.5 (colored)

Support for UTF-8 mouse input (\033[1005h). This was added in xterm 262
and supports larger terminals than the older way.

If the new mouse-utf8 option is on, UTF-8 mouse input is enabled for all
UTF-8 terminals. The option defaults to on if LANG etc are set in the
same manner as the utf8 option.

With help and based on code from hsim at gmx.li.

Revision 1.5 / (download) - annotate - [select for diffs], Tue Oct 20 22:17:33 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.4: +2 -2 lines
Diff to previous 1.4 (colored)

%zu not %u, doh.

Revision 1.4 / (download) - annotate - [select for diffs], Tue Oct 20 19:18:28 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.3: +82 -36 lines
Diff to previous 1.3 (colored)

Try to reduce the UTF-8 mess.

Get rid of passing around u_char[4]s and define a struct utf8_data which has
character data, size (sequence length) and width. Move UTF-8 character
collection into two functions utf8_open/utf8_append in utf8.c which fill in
this struct and use these functions from input.c and the various functions in
screen-write.c.

Space for rather more data than is necessary for one UTF-8 sequence is in the
utf8_data struct because screen_write_copy is still nasty and needs to reinject
the character (after combining) into screen_write_cell.

Revision 1.3 / (download) - annotate - [select for diffs], Thu Jun 25 06:15:04 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.2: +1 -24 lines
Diff to previous 1.2 (colored)

Miscellaneous unused functions, including one which was basically a
duplicate. Found by lint.

Revision 1.2 / (download) - annotate - [select for diffs], Wed Jun 24 05:35:07 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.1: +2 -2 lines
Diff to previous 1.1 (colored)

Constify utf8_width() function argument.

Revision 1.1 / (download) - annotate - [select for diffs], Mon Jun 1 22:58:49 2009 UTC (14 years, 11 months ago) by nicm
Branch: MAIN

Import tmux, a terminal multiplexor allowing (among other things) a single
terminal to be switched between several different windows and programs
displayed on one terminal be detached from one terminal and moved to another.

ok deraadt pirofti

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.