summaryrefslogtreecommitdiffstats
path: root/lib/libedit/tty.c
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2016-03-20 17:19:48 +0000
committerschwarze <schwarze@openbsd.org>2016-03-20 17:19:48 +0000
commitb96b528f9d37ad5504959c89613b35a8d883017b (patch)
tree7fb3e2ffdb8af9439f0f94f15bdd4811f6844677 /lib/libedit/tty.c
parentwhitespace: remove a space before a tab and a trailing tab. (diff)
downloadwireguard-openbsd-b96b528f9d37ad5504959c89613b35a8d883017b.tar.xz
wireguard-openbsd-b96b528f9d37ad5504959c89613b35a8d883017b.zip
Fix the CHARSET_IS_UTF8 case in read_char().
For now, this mainly help programs explicitly using wide-character functions like el_wgetc(3) and el_wgets(3). 1. After reading an invalid byte sequence, do not throw away additional valid bytes; fix by me using mbrtowc(3), obsoleting utf8_islead(). 2. When read(2) returns EOF, return that information to the caller, do not prod on and potentially access garbage data in the buffer; from Linas Vepstas via NetBSD read.c rev. 1.70 2013/05/27. 3. After read__fixio() failure, restore errno to the one set by read(); from Steffen Nurpmeso via NetBSD read.c rev. 1.68 2012/09/10. 4. After read__fixio() success, restore errno to the initial state upon function entry; fix by me. OK czarkoff@. Also committed to NetBSD.
Diffstat (limited to 'lib/libedit/tty.c')
0 files changed, 0 insertions, 0 deletions