History log of /netbsd-current/lib/libedit/terminal.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.46 04-Feb-2023 christos

Remove unused stuff, and limit the scope of some of the used ones.
(from des@freebsd)


Revision tags: netbsd-10-base
# 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


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 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


Revision tags: phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 phil-wifi-20191119
# 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).


Revision tags: netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 netbsd-9-base
# 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.


Revision tags: phil-wifi-20190609
# 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


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.34 24-Nov-2018 christos

PR/53682: Jordan Lewis: use newlines instead of padded spaces when restoring
multi-line histories.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base perseant-stdc-iso10646-base
# 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.


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 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)


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 tls-maxphys-base
# 1.14 30-May-2012 christos

don't include both term.h and termcap.h


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.13 24-Mar-2012 christos

From: Jilles Tjoelker: Add a mapping for the cursor delete key


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 netbsd-6-base
# 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)


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 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.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


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 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


Revision tags: phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 phil-wifi-20191119
# 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).


Revision tags: netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 netbsd-9-base
# 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.


Revision tags: phil-wifi-20190609
# 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


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.34 24-Nov-2018 christos

PR/53682: Jordan Lewis: use newlines instead of padded spaces when restoring
multi-line histories.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base perseant-stdc-iso10646-base
# 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.


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 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)


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 tls-maxphys-base
# 1.14 30-May-2012 christos

don't include both term.h and termcap.h


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.13 24-Mar-2012 christos

From: Jilles Tjoelker: Add a mapping for the cursor delete key


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 netbsd-6-base
# 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)


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 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.44 09-Sep-2021 christos

Add casts to appease conversions between wchar_t and wint_t


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 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


Revision tags: phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 phil-wifi-20191119
# 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).


Revision tags: netbsd-9-2-RELEASE netbsd-9-1-RELEASE netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 netbsd-9-base
# 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.


Revision tags: phil-wifi-20190609
# 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


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.34 24-Nov-2018 christos

PR/53682: Jordan Lewis: use newlines instead of padded spaces when restoring
multi-line histories.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base perseant-stdc-iso10646-base
# 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.


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 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)


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 tls-maxphys-base
# 1.14 30-May-2012 christos

don't include both term.h and termcap.h


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.13 24-Mar-2012 christos

From: Jilles Tjoelker: Add a mapping for the cursor delete key


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 netbsd-6-base
# 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)


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 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.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


Revision tags: phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 phil-wifi-20191119
# 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).


Revision tags: netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 netbsd-9-base
# 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.


Revision tags: phil-wifi-20190609
# 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


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.34 24-Nov-2018 christos

PR/53682: Jordan Lewis: use newlines instead of padded spaces when restoring
multi-line histories.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base perseant-stdc-iso10646-base
# 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.


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 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)


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 tls-maxphys-base
# 1.14 30-May-2012 christos

don't include both term.h and termcap.h


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.13 24-Mar-2012 christos

From: Jilles Tjoelker: Add a mapping for the cursor delete key


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 netbsd-6-base
# 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)


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 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.42 31-May-2020 christos

use strlcpy() instead of strncpy() for gcc happiness


Revision tags: phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 phil-wifi-20191119
# 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).


Revision tags: netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 netbsd-9-base
# 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.


Revision tags: phil-wifi-20190609
# 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


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.34 24-Nov-2018 christos

PR/53682: Jordan Lewis: use newlines instead of padded spaces when restoring
multi-line histories.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base perseant-stdc-iso10646-base
# 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.


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 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)


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 tls-maxphys-base
# 1.14 30-May-2012 christos

don't include both term.h and termcap.h


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.13 24-Mar-2012 christos

From: Jilles Tjoelker: Add a mapping for the cursor delete key


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 netbsd-6-base
# 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)


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 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.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).


Revision tags: netbsd-9-base
# 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.


Revision tags: phil-wifi-20190609
# 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


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.34 24-Nov-2018 christos

PR/53682: Jordan Lewis: use newlines instead of padded spaces when restoring
multi-line histories.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base perseant-stdc-iso10646-base
# 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.


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 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)


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 tls-maxphys-base
# 1.14 30-May-2012 christos

don't include both term.h and termcap.h


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.13 24-Mar-2012 christos

From: Jilles Tjoelker: Add a mapping for the cursor delete key


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 netbsd-6-base
# 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)


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 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.40 15-Sep-2019 christos

Fix type and remove cast (Yuichiro NAITO/FreeBSD).


Revision tags: netbsd-9-base
# 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.


Revision tags: phil-wifi-20190609
# 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


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.34 24-Nov-2018 christos

PR/53682: Jordan Lewis: use newlines instead of padded spaces when restoring
multi-line histories.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base perseant-stdc-iso10646-base
# 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.


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 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)


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 tls-maxphys-base
# 1.14 30-May-2012 christos

don't include both term.h and termcap.h


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.13 24-Mar-2012 christos

From: Jilles Tjoelker: Add a mapping for the cursor delete key


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 netbsd-6-base
# 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)


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 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.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.


Revision tags: phil-wifi-20190609
# 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


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.34 24-Nov-2018 christos

PR/53682: Jordan Lewis: use newlines instead of padded spaces when restoring
multi-line histories.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base perseant-stdc-iso10646-base
# 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.


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 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)


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 tls-maxphys-base
# 1.14 30-May-2012 christos

don't include both term.h and termcap.h


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.13 24-Mar-2012 christos

From: Jilles Tjoelker: Add a mapping for the cursor delete key


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 netbsd-6-base
# 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)


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 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.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.


Revision tags: phil-wifi-20190609
# 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


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.34 24-Nov-2018 christos

PR/53682: Jordan Lewis: use newlines instead of padded spaces when restoring
multi-line histories.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base perseant-stdc-iso10646-base
# 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.


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 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)


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 tls-maxphys-base
# 1.14 30-May-2012 christos

don't include both term.h and termcap.h


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.13 24-Mar-2012 christos

From: Jilles Tjoelker: Add a mapping for the cursor delete key


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 netbsd-6-base
# 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)


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 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.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.


Revision tags: phil-wifi-20190609
# 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


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.34 24-Nov-2018 christos

PR/53682: Jordan Lewis: use newlines instead of padded spaces when restoring
multi-line histories.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base perseant-stdc-iso10646-base
# 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.


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 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)


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 tls-maxphys-base
# 1.14 30-May-2012 christos

don't include both term.h and termcap.h


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.13 24-Mar-2012 christos

From: Jilles Tjoelker: Add a mapping for the cursor delete key


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 netbsd-6-base
# 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)


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 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.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


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.34 24-Nov-2018 christos

PR/53682: Jordan Lewis: use newlines instead of padded spaces when restoring
multi-line histories.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base perseant-stdc-iso10646-base
# 1.33 27-Jun-2017 christos

branches: 1.33.4;
- handle literal escape sequence printing.
- factor out common code in allocation and freeing of the display.


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 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)


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 tls-maxphys-base
# 1.14 30-May-2012 christos

don't include both term.h and termcap.h


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.13 24-Mar-2012 christos

From: Jilles Tjoelker: Add a mapping for the cursor delete key


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 netbsd-6-base
# 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)


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 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.33 27-Jun-2017 christos

- handle literal escape sequence printing.
- factor out common code in allocation and freeing of the display.


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.32 09-May-2016 christos

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)


Revision tags: netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 tls-maxphys-base
# 1.14 30-May-2012 christos

don't include both term.h and termcap.h


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.13 24-Mar-2012 christos

From: Jilles Tjoelker: Add a mapping for the cursor delete key


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 netbsd-6-base
# 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)


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 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.


Revision tags: pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.32 09-May-2016 christos

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)


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 tls-maxphys-base
# 1.14 30-May-2012 christos

don't include both term.h and termcap.h


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.13 24-Mar-2012 christos

From: Jilles Tjoelker: Add a mapping for the cursor delete key


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 netbsd-6-base
# 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)


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 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.