Home | History | Annotate | Download | only in libedit
History log of /src/lib/libedit/eln.c
RevisionDateAuthorComments
 1.38  17-May-2024  christos When calling el_line make sure that we call the resizing function
callback because el_line updates the legacy LineInfo structure and
we need to notify that the cached copy of the the buffer has changed.
Of course the resizing function can call el_line itself to update
the buffer, so prevent recursion. Bug found by Peter Rufer at Arista.
 1.37  11-Jan-2022  christos PR/56618: Walter Lozano: Improve libedit compatibility with readline by
implementing:

rl_copy_text, rl_erase_empty_line, rl_message, rl_on_new_line,
rl_replace_line, rl_restore_prompt, rl_save_prompt
 1.36  15-Aug-2021  christos Disable attempts to handle EINTR and non-blocking I/O by default. It is
confusing to other programs and unexpected behavior. Reported by Ingo Schwarze.
This behavior is now controlled with EL_SAFEREAD.
 1.35  26-Apr-2019  christos Follow the man page for EL_GETTC and not require a NULL terminated argument
list: https://reviews.llvm.org/D61191
 1.34  09-May-2016  christos branches: 1.34.16;
Elide gcc warning about intermediate const casts caused by visibility change.
 1.33  11-Apr-2016  christos Get rid of private/public; keep protected (Ingo Schwarze)
 1.32  11-Apr-2016  christos Char -> wchar_t from Ingo Schwarze.
 1.31  11-Apr-2016  christos more macro WIDECHAR undoing from Ingo Schwarze.
 1.30  09-Apr-2016  christos More WIDECHAR elimination (Ingo Schwarze)
 1.29  23-Mar-2016  christos Start removing the WIDECHAR ifdefs; building without it has stopped working
anyway. (Ingo Schwarze)
 1.28  28-Feb-2016  christos remove 4 clause licenses.
 1.27  24-Feb-2016  christos Make the read_char function always take a wchar_t * argument (Ingo Schwarze)
 1.26  24-Feb-2016  christos Get split el_getc and el_wgetc completely and call el_wgetc internally.
Change some character constants to they wide versions. (Ingo Schwarze)
 1.25  16-Feb-2016  christos From Ingo Scharze:
Let "el.h" include everything needed for struct editline,
and don't include that stuff multiple times. That also improves
consistency, also avoids circular inclusions, and also makes it
easier to follow what is going on, even though not quite as nice.
But it seems like the best we can do...
 1.24  16-Feb-2016  christos cleanup chartype.h includes (Ingo Schwarze)
 1.23  15-Feb-2016  christos OpenBSD eln.c rev. 1.3 2011/11/27 21:46:44 pascal
kill a C++-style comment
 1.22  14-Feb-2016  christos From Ingo Schwarze:

el_getc() for the WIDECHAR case, that is, the version in eln.c.
For a UTF-8 locale, it is broken in four ways:

1. If the character read is outside the ASCII range, the function
does an undefined cast from wchar_t to char. Even if wchar_t
is internally represented as UCS-4, that is wrong and dangerous
because characters beyond codepoint U+0255 get their high bits
truncated, meaning that perfectly valid printable Unicode
characters get mapped to arbitrary bytes, even the ASCII escape
character for some Unicode characters. But wchar_t need not
be implemented in terms of UCS-4, so the outcome of this function
is undefined for any and all input.

2. If insufficient space is available for the result, the function
fails to detect failure and returns garbage rather than -1 as
specified in the documentation.

3. The documentation says that errno will be set on failure, but
that doesn't happen either in the above case.

4. Even for ASCII characters, the results may be wrong if wchar_t
is not using UCS-4.
 1.21  12-Feb-2016  christos Avoid c99 for now.
 1.20  12-Feb-2016  christos GC IGNORE_EXTCHARS and simplify code (Ingo Schwarze)
 1.19  18-May-2015  christos make el_gets() return the number of characters read in wide mode (not the
number of wide characters) From khorben@ by FreeBSD:
https://svnweb.freebsd.org/ports/head/devel/libedit/files/patch-src_eln.c?\
revision=382458&view=markup
XXX: Pullup-7
 1.18  24-Mar-2015  christos save and restore IGNORE_EXTCHARS like we do in the getc case. From:
https://bugzilla.redhat.com/attachment.cgi?id=1001894
 1.17  18-Jun-2014  christos branches: 1.17.2;
Don't depend on weak aliases to define the vi "alias" expansion function,
provide an API instead to set it.
 1.16  20-May-2014  christos Always NULL terminate the argv[] array. From OpenBSD.
 1.15  26-Feb-2014  christos branches: 1.15.2;
Add missing EL_REFRESH
 1.14  11-Mar-2012  christos branches: 1.14.2;
include the NULL in the argv conversion
 1.13  16-Aug-2011  christos branches: 1.13.2;
re-enable -Wconversion
 1.12  28-Jul-2011  christos kill ptr_t and ioctl_t, add * sizeof(*foo) to all allocations.
 1.11  28-Jul-2011  christos term -> terminal
XXX: need to rename key_ too.
 1.10  20-Jun-2011  mrg various build fixes for gcc 4.5. from chuq. XXX i'm not sure all of
these work properly wtf pointer aliasing, but there are no casts at
least...

the lib/libpuffs/puffs_priv.h is definately a real bug fix.

from chuq.
 1.9  04-Nov-2010  christos branches: 1.9.4;
PR/43998, PR/44021: In narrow history emulation, don't treat UTF-8 character
sets specially as far as history goes since we always need to do the conversion
from narrow [history] to wide [editline].
 1.8  28-Aug-2010  christos setup a callback to be invoked on resize buffers so that readline can
reset rl_line_buffer which unfortunately some applications use it directly.
 1.7  15-Apr-2010  christos From Jess Thrysoee
- NARROW_HISTORY and IGNORE_EXTCHARS should not take effect if locale is UTF-8
- account for multi byte char length in
 1.6  20-Jan-2010  christos PR/42646: Joachim Kuebart: Shell crashes in libedit when window size changes
(SIGWINCH). Return NULL if el_gets() gets interrupted.
 1.5  19-Jan-2010  christos Fix wrapper for EL_EDITOR, from Michael L. Hitch
 1.4  12-Jan-2010  christos - call the mapping function directly instead of el_wset().
- save the strings passed to the mapping function so that they don't get
re-used. This leaks. To fix it properly we could either pass a flag to
free particular entries before re-using, or allocate all of them.
Allocating all of them wastes memory, allocating some of them makes
the code more complex.
This fixes compatibility binding (shell tab completion for example)
 1.3  31-Dec-2009  christos - Document and enable wide character support.
- Fix read function compatibility.
 1.2  30-Dec-2009  christos Fix wide build, test it, but don't turn it on yet.
 1.1  30-Dec-2009  christos Wide character support (UTF-8) from Johny Mattsson; currently disabled.
 1.9.4.1  23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.13.2.2  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.13.2.1  17-Apr-2012  yamt sync with head
 1.14.2.1  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.15.2.1  10-Aug-2014  tls Rebase.
 1.17.2.1  13-May-2015  martin Sync lib/libedit with head, requested by christos in #753:

lib/libedit/Makefile 1.53
lib/libedit/chartype.h 1.13
lib/libedit/editline.3 1.83-1.84
lib/libedit/editrc.5 1.28-1.29
lib/libedit/eln.c 1.18
lib/libedit/filecomplete.c 1.33-1.34
lib/libedit/readline.c 1.112-1.115

Man page improvements, fix overlapping strcpy, improve readline
compatibility, clang build fix.
 1.34.16.1  10-Jun-2019  christos Sync with HEAD

RSS XML Feed