From: John Marino Date: Tue, 3 Nov 2015 23:58:27 +0000 (+0100) Subject: Merge branch 'vendor/LIBEDIT' X-Git-Tag: v4.5.0~198 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/5fd565a09d464d3d0042df9997c41e8f1995a5b5 Merge branch 'vendor/LIBEDIT' Conflicts: contrib/libedit/src/chartype.h contrib/libedit/src/eln.c --- 5fd565a09d464d3d0042df9997c41e8f1995a5b5 diff --cc contrib/libedit/src/chartype.h index f8c68ee1ba,0beee17cd2..7a1c041d24 --- a/contrib/libedit/src/chartype.h +++ b/contrib/libedit/src/chartype.h @@@ -44,9 -44,7 +44,9 @@@ * supports non-BMP code points without requiring UTF-16, but nothing * seems to actually advertise this properly, despite Unicode 3.1 having * been around since 2001... */ + +#if 0 /* DragonFly wchar supports ISO 10646 */ - #if !defined(__NetBSD__) && !defined(__sun) && !(defined(__APPLE__) && defined(__MACH__)) + #if !defined(__NetBSD__) && !defined(__sun) && !(defined(__APPLE__) && defined(__MACH__)) && !defined(__OpenBSD__) #ifndef __STDC_ISO_10646__ /* In many places it is assumed that the first 127 code points are ASCII * compatible, so ensure wchar_t indeed does ISO 10646 and not some other diff --cc contrib/libedit/src/eln.c index a5c9fa7d9a,0e74996f52..f829d1c164 --- a/contrib/libedit/src/eln.c +++ b/contrib/libedit/src/eln.c @@@ -81,12 -78,9 +81,11 @@@ el_gets(EditLine *el, int *nread if (!(el->el_flags & CHARSET_IS_UTF8)) el->el_flags |= IGNORE_EXTCHARS; - tmp = el_wgets(el, nread); + tmp = el_wgets(el, &nwread); if (!(el->el_flags & CHARSET_IS_UTF8)) el->el_flags &= ~IGNORE_EXTCHARS; + for (int i = 0; i < nwread; i++) + *nread += ct_enc_width(tmp[i]); - return ct_encode_string(tmp, &el->el_lgcyconv); }