Home | History | Annotate | Download | only in libedit
History log of /src/lib/libedit/terminal.c
RevisionDateAuthorComments
 1.46  04-Feb-2023  christos Remove unused stuff, and limit the scope of some of the used ones.
(from des@freebsd)
 1.45  30-Oct-2022  christos improvements in malloc/free handling.
 1.44  09-Sep-2021  christos Add casts to appease conversions between wchar_t and wint_t
 1.43  10-Jul-2020  christos Fix numeric variable handling in settc (lyzliyuzhi at 163 dot com)
 1.42  31-May-2020  christos use strlcpy() instead of strncpy() for gcc happiness
 1.41  12-Nov-2019  christos PR/54654: Soren Tempel: Make sure el_cursor.v < el_terminal.t_size.v when
moving around.
 1.40  15-Sep-2019  christos Fix type and remove cast (Yuichiro NAITO/FreeBSD).
 1.39  23-Jul-2019  christos PR/54399: S�ren Tempel: Uninitialized memory access in libedit history.
Initialize the buffer using calloc. While here change all malloc(a * sizeof(b))
to calloc(a, sizeof(b)). XXX: should fix realloc similarly.
 1.38  30-Jun-2019  christos Add a comment explaining why we don't use DO here. Correct the attribution
on the previous patch: The patch was from Jordan Lewis and the report from
Raphael Poss.
 1.37  29-Jun-2019  christos PR/54329: Raphael Ross: According to https://www.gnu.org/software/termutils/\
manual/termcap-1.3/html_chapter/termcap_4.html#SEC23 the cursor move multiple
escapes have undefined results when moving out of the screen. Stop using DO
to move down multiple lines and use a loop of newlines instead.
 1.36  12-Apr-2019  christos PR/52359: Benjamin Lorenz: When resizing because of a signal save and restore
the cursor position, since it does not change.
 1.35  15-Feb-2019  christos PR/53983: Jonathan Perkins: Fix types for readline compatibility
 1.34  24-Nov-2018  christos PR/53682: Jordan Lewis: use newlines instead of padded spaces when restoring
multi-line histories.
 1.33  27-Jun-2017  christos branches: 1.33.4; 1.33.6;
- handle literal escape sequence printing.
- factor out common code in allocation and freeing of the display.
 1.32  09-May-2016  christos branches: 1.32.8;
s/protected/libedit_private/g
 1.31  02-May-2016  christos eliminate static buffer with custom resizing code.
 1.30  18-Apr-2016  christos From Ingo Schwarze:
* Replace fcns.c by a shorter and simpler func.h
and include it only in the one file needing it, map.c.
* Combine help.h and help.c into a simplified help.h
and include it only in the one file needing it, map.c.
* Check the very simple, static files editline.c, historyn.c, and
tokenizern.c into CVS rather than needlessly generating them.
* So we no longer autogenerate any C files. :-)
* Shorten and simplify makelist by deleting the options -n, -e, -bc,
and -m; the latter was unused and useless in the first place.
* Move the declaration of el_func_t from fcns.h to the header
actually needing it, map.h. Since that header is already
included by el.h for unrelated reasons, that makes el_func_t
just as globally available as before.
* No longer include the simplified fcns.h into el.h,
include it directly into the *.c files needing it.
 1.29  11-Apr-2016  christos Get rid of private/public; keep protected (Ingo Schwarze)
 1.28  11-Apr-2016  christos Char -> wchar_t from Ingo Schwarze.
 1.27  11-Apr-2016  christos more macro WIDECHAR undoing from Ingo Schwarze.
 1.26  09-Apr-2016  christos More WIDECHAR elimination (Ingo Schwarze)
 1.25  23-Mar-2016  christos Start removing the WIDECHAR ifdefs; building without it has stopped working
anyway. (Ingo Schwarze)
 1.24  22-Mar-2016  christos put back NUL check (Ingo Schwarze)
 1.23  02-Mar-2016  christos PR/50880: David Binderman: Remove redundant code.
While here, fix all debugging formats.
 1.22  17-Feb-2016  christos whitespace and header sorting changes (Ingo Schwarze). No functional changes.
 1.21  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.20  16-Feb-2016  christos cleanup chartype.h includes (Ingo Schwarze)
 1.19  16-Feb-2016  christos cleanup inclusion of histedit.h (Ingo Schwarze)
 1.18  15-Feb-2016  christos OpenBSD term.c rev. 1.7 2002/11/29 20:13:39 deraadt
spelling
 1.17  15-Feb-2016  christos OpenBSD term.c rev. 1.13 2009/12/11 18:58:59 jacekm
fix two memory leaks
 1.16  14-Feb-2016  christos From Ingo Schwarze:

As we have seen before, "histedit.h" can never get rid of including
the <wchar.h> header because using the data types defined there is
deeply ingrained in the public interfaces of libedit.

Now POSIX unconditionally requires that <wchar.h> defines the type
wint_t. Consequently, it can be used unconditionally, no matter
whether WIDECHAR is active or not. Consequently, the #define Int
is pointless.

Note that removing it is not gratuitious churn. Auditing for
integer signedness problems is already hard when only fundamental
types like "int" and "unsigned" are involved. It gets very hard
when types come into the picture that have platform-dependent
signedness, like "char" and "wint_t". Adding yet another layer
on top, changing both the signedness and the width in a platform-
dependent way, makes auditing yet harder, which IMHO is really
dangerous. Note that while removing the #define, i already found
one bug caused by this excessive complication - in the function
re_putc() in refresh.c. If WIDECHAR was defined, it printed an
Int = wint_t value with %c. Fortunately, that bug only affects
debugging, not production. The fix is contained in the patch.

With WIDECHAR, this doesn't change anything. For the case without
WIDECHAR, i checked that none of the places wants to store values
that might not fit in wint_t.

This only changes internal interfaces; public ones remain unchanged.
 1.15  11-Feb-2016  christos - Add some more Char casts
- reduce ifdefs by providing empty defs for nls functions (Ingo Schwarze)
 1.14  30-May-2012  christos don't include both term.h and termcap.h
 1.13  24-Mar-2012  christos From: Jilles Tjoelker: Add a mapping for the cursor delete key
 1.12  18-Nov-2011  christos Initialize termbuf (Kamil Dudka)
 1.11  18-Nov-2011  christos check for negative return of ct_visual_char (Kamil Dudka)
 1.10  04-Oct-2011  christos branches: 1.10.2;

fixed warnings where wint_t is unsigned.
 1.9  03-Oct-2011  christos fix broken change (parenthesis in the wrong place). From Nirbhay Choubey
 1.8  16-Aug-2011  christos re-enable -Wconversion
 1.7  29-Jul-2011  christos pass -Wconversion
 1.6  29-Jul-2011  christos kill ifdef notdef
 1.5  29-Jul-2011  christos KNF return (\1); -> return \1;
 1.4  28-Jul-2011  christos kill ptr_t and ioctl_t, add * sizeof(*foo) to all allocations.
 1.3  28-Jul-2011  christos whitespace
 1.2  28-Jul-2011  christos Rename key to keymacro to avoid conflicts with term.h. The renaming of term
to terminal was again to avoid conflicts with term.h. term.h is a moving
namespace violation.
 1.1  28-Jul-2011  christos term -> terminal
XXX: need to rename key_ too.
 1.10.2.2  30-Oct-2012  yamt sync with head
 1.10.2.1  17-Apr-2012  yamt sync with head
 1.32.8.1  23-Jul-2017  snj Pull up following revision(s) (requested by kre in ticket #102):
lib/libedit/Makefile: 1.64-1.65
lib/libedit/editline.3: 1.94-1.96
lib/libedit/editrc.5: 1.33
lib/libedit/el.c: 1.93-1.94
lib/libedit/el.h: 1.42
lib/libedit/literal.c: 1.1-1.3
lib/libedit/literal.h: 1.1-1.2
lib/libedit/prompt.c: 1.27
lib/libedit/read.c: 1.103
lib/libedit/refresh.c: 1.52-1.54
lib/libedit/refresh.h: 1.11
lib/libedit/terminal.c: 1.33
Make the default editrc file be $EDITRC (from env) if set, falling back
to $HOME/.editrc otherwise. Better support for this in sh coming.
--
Include EDITRC in doc.
--
mention the limitation of the literal sequence delimiter.
--
- handle literal escape sequence printing.
- factor out common code in allocation and freeing of the display.
--
- add literal sequence handling.
--
remove unused variable
--
add literal escape sequence support, patterned after the tcsh ones.
--
fix comment
--
Fix an obvious, but almost invisible typo (avoid some core dumps).
--
Allow wide characters (properly encoded as byte strings according to LC_CTYPE)
to be (perhaps part of) the "invisible" characters in a prompt, or the
required prompt character which follows the literal sequence (this character
must be one with a printing column width >= 1). The literal indicator
character (which is just a marker, and not printed anywhere) (the PSlit
parameter in sh(1)) can also be a wide char (passed to libedit as a wchar_t,
encoded as that by sh(1) or other applications that support this.)
Note: this has currently only been tested with everything ascii (C locale).
--
Remove workaround for ancient HTML generation code.
 1.33.6.2  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.33.6.1  10-Jun-2019  christos Sync with HEAD
 1.33.4.1  26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts

RSS XML Feed