History log of /netbsd-current/lib/libterminfo/compile.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.26 21-Jun-2020 roy

libterminfo: cast to uint16/32_t before conversion to preserve negativity

Otherwise the ABSENT_NUMERIC(-1) or CANCELLED_NUMERIC(-2) will be converted
incorrectly to size_t and then down to uint16/32_t.
Picked up by DIAGNOSTIC builds.

Thanks to Michael Forney for the fix for PR lib/52293.


Revision tags: phil-wifi-20200421 phil-wifi-20200411 phil-wifi-20200406
# 1.25 05-Apr-2020 roy

terminfo: Add guards to optionally build parts of libterminfo

Reading from a database is now optional.
Compiling terminfo descriptions (including from $TERMINFO) is now optional.
Compat support is now optional.

This removes 17k on amd64 from the binary size, which allows it to be used
again on space constrained ramdisks.


# 1.24 30-Mar-2020 roy

terminfo: satisfy gcc bitching


# 1.23 30-Mar-2020 roy

terminfo: v3 records should create v3 aliases


# 1.22 29-Mar-2020 roy

terminfo: Promote a terminfo description to v3 when required

Blindly scanning the capabilities for # and checking that the following
number is bigger than a short isn't reliable because this could be a
string value:

SomeString#1234

Instead, if we process the numeric as normal and if it's value is too big
for v1 then promote the record to v3.


# 1.21 29-Mar-2020 roy

terminfo: allow _ti_getname to convert from and to any version


# 1.20 28-Mar-2020 christos

PR/55118: Andreas Gustafsson: Oops, set the right flag variable.


# 1.19 28-Mar-2020 roy

terminfo: Add a comment for prior change.


# 1.18 28-Mar-2020 roy

terminfo: use , as a record version delimiter rather than @

@ is allowed in a terminfo description, but a comma is not.


# 1.17 28-Mar-2020 christos

support for older compilers


# 1.16 27-Mar-2020 christos

Introduce a bunch of inline functions and utilities to avoid code duplication.


# 1.15 27-Mar-2020 christos

As described in tech-userlevel:
- Modify the writing code to only write entries in the new
format for the terminal descriptions that require it.
- Store new format entries as <name>@v3
- Store old format entries with clamped values as <name> for
backwards compatibility
- Lookup first <name>@v3 and then <name> if that is not found.
- Don't create terminfo2 anymore; old programs keep working with
clamped entries, and new programs be able to use the wide
fields with using the original db file.


# 1.14 13-Mar-2020 roy

terminfo: promote numeric parameters from short to int

POSIX mandates implementations must support upto a short but may exceed it.
When NetBSD terminfo was implemented, no terminfo description used over
a short, but because ncurses has supported ints for some time, some now do.

Infact, such a terminfo description was imported where colour pairs for
screen-256color went up to 65536 which exposed a bug in the existing
implementation where it set to zero. Because the number might mean
something more than a range, we need to be able to store it accurately.

This requires a version bump because whilst the API hasn't changed thanks
to C int promotion, the ABI has. Also the underlying database structure
has changed as well - we now store the numeric paramter inside a uint32_t
field rather than a uint16_t one.
Whilst this change can still read the old style database, the old one
cannot read the new one and thus we now maintain the database as
terminfo2.cdb, leaving the old library and database alone so old programs
still work fine.

libcurses, libfrom, libmenu and libpanel have also been bumped to
accomoate this change.


# 1.13 12-Mar-2020 roy

terminfo: truncate numeric parameters to a short

Because that is what our API demands.
We should probably change to int when we next bump the API.


Revision tags: is-mlppp-base netbsd-8-2-RELEASE netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 netbsd-8-1-RELEASE netbsd-8-1-RC1 pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2
# 1.12 04-May-2017 roy

branches: 1.12.10;
Clean up some more warnings.


Revision tags: prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320
# 1.11 11-Feb-2017 roy

branches: 1.11.2;
Warn about unprintable characters in capability strings.


# 1.10 11-Feb-2017 roy

Following a newline, strip leading whitespace from capability strings.


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 bouyer-socketcan-base pgoyette-localcount-20170107 netbsd-7-1-RC1 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-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 tls-maxphys-base
# 1.9 07-Jun-2013 roy

branches: 1.9.10; 1.9.14;
Whitespace


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.8 03-Jun-2012 joerg

branches: 1.8.2;
Switch terminfo(3) to cdb(5).


# 1.7 01-Jun-2012 joerg

Fix a number of memory leaks. Keep final loop of the cleanup in tic(1)
under #ifdef __VALGRIND__ though.


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base
# 1.6 28-Nov-2011 joerg

branches: 1.6.2;
Kill a bunch of manual __attribute__ usages and replace them with the
equivalent sys/cdefs.h invocation.


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base
# 1.5 11-Apr-2011 roy

branches: 1.5.4;
Clean up some compile warnings


Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.4 02-Mar-2010 roy

Use _ti_get_token instead of strsep when parsing termcap entries.
This allows us to handle \E\ as a valid sequence.


# 1.3 01-Mar-2010 dholland

compile.c needs sys/endian.h; PR 42875 from Henning Petersen.


# 1.2 25-Feb-2010 roy

If we only have a name then we flatten to an alias.


# 1.1 22-Feb-2010 roy

libterminfo can now compile a single terminfo description which allows
$TERMINFO to be a terminfo description as well as a file reference.

This enables the user to modify the terminfo description on read-only
media.


# 1.25 05-Apr-2020 roy

terminfo: Add guards to optionally build parts of libterminfo

Reading from a database is now optional.
Compiling terminfo descriptions (including from $TERMINFO) is now optional.
Compat support is now optional.

This removes 17k on amd64 from the binary size, which allows it to be used
again on space constrained ramdisks.


# 1.24 30-Mar-2020 roy

terminfo: satisfy gcc bitching


# 1.23 30-Mar-2020 roy

terminfo: v3 records should create v3 aliases


# 1.22 29-Mar-2020 roy

terminfo: Promote a terminfo description to v3 when required

Blindly scanning the capabilities for # and checking that the following
number is bigger than a short isn't reliable because this could be a
string value:

SomeString#1234

Instead, if we process the numeric as normal and if it's value is too big
for v1 then promote the record to v3.


# 1.21 29-Mar-2020 roy

terminfo: allow _ti_getname to convert from and to any version


# 1.20 28-Mar-2020 christos

PR/55118: Andreas Gustafsson: Oops, set the right flag variable.


# 1.19 28-Mar-2020 roy

terminfo: Add a comment for prior change.


# 1.18 28-Mar-2020 roy

terminfo: use , as a record version delimiter rather than @

@ is allowed in a terminfo description, but a comma is not.


# 1.17 28-Mar-2020 christos

support for older compilers


# 1.16 27-Mar-2020 christos

Introduce a bunch of inline functions and utilities to avoid code duplication.


# 1.15 27-Mar-2020 christos

As described in tech-userlevel:
- Modify the writing code to only write entries in the new
format for the terminal descriptions that require it.
- Store new format entries as <name>@v3
- Store old format entries with clamped values as <name> for
backwards compatibility
- Lookup first <name>@v3 and then <name> if that is not found.
- Don't create terminfo2 anymore; old programs keep working with
clamped entries, and new programs be able to use the wide
fields with using the original db file.


# 1.14 13-Mar-2020 roy

terminfo: promote numeric parameters from short to int

POSIX mandates implementations must support upto a short but may exceed it.
When NetBSD terminfo was implemented, no terminfo description used over
a short, but because ncurses has supported ints for some time, some now do.

Infact, such a terminfo description was imported where colour pairs for
screen-256color went up to 65536 which exposed a bug in the existing
implementation where it set to zero. Because the number might mean
something more than a range, we need to be able to store it accurately.

This requires a version bump because whilst the API hasn't changed thanks
to C int promotion, the ABI has. Also the underlying database structure
has changed as well - we now store the numeric paramter inside a uint32_t
field rather than a uint16_t one.
Whilst this change can still read the old style database, the old one
cannot read the new one and thus we now maintain the database as
terminfo2.cdb, leaving the old library and database alone so old programs
still work fine.

libcurses, libfrom, libmenu and libpanel have also been bumped to
accomoate this change.


# 1.13 12-Mar-2020 roy

terminfo: truncate numeric parameters to a short

Because that is what our API demands.
We should probably change to int when we next bump the API.


Revision tags: netbsd-8-2-RELEASE netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 netbsd-8-1-RELEASE netbsd-8-1-RC1 pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2
# 1.12 04-May-2017 roy

Clean up some more warnings.


Revision tags: prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320
# 1.11 11-Feb-2017 roy

branches: 1.11.2;
Warn about unprintable characters in capability strings.


# 1.10 11-Feb-2017 roy

Following a newline, strip leading whitespace from capability strings.


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 bouyer-socketcan-base pgoyette-localcount-20170107 netbsd-7-1-RC1 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-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 tls-maxphys-base
# 1.9 07-Jun-2013 roy

branches: 1.9.10; 1.9.14;
Whitespace


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.8 03-Jun-2012 joerg

branches: 1.8.2;
Switch terminfo(3) to cdb(5).


# 1.7 01-Jun-2012 joerg

Fix a number of memory leaks. Keep final loop of the cleanup in tic(1)
under #ifdef __VALGRIND__ though.


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base
# 1.6 28-Nov-2011 joerg

branches: 1.6.2;
Kill a bunch of manual __attribute__ usages and replace them with the
equivalent sys/cdefs.h invocation.


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base
# 1.5 11-Apr-2011 roy

branches: 1.5.4;
Clean up some compile warnings


Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.4 02-Mar-2010 roy

Use _ti_get_token instead of strsep when parsing termcap entries.
This allows us to handle \E\ as a valid sequence.


# 1.3 01-Mar-2010 dholland

compile.c needs sys/endian.h; PR 42875 from Henning Petersen.


# 1.2 25-Feb-2010 roy

If we only have a name then we flatten to an alias.


# 1.1 22-Feb-2010 roy

libterminfo can now compile a single terminfo description which allows
$TERMINFO to be a terminfo description as well as a file reference.

This enables the user to modify the terminfo description on read-only
media.


# 1.24 30-Mar-2020 roy

terminfo: satisfy gcc bitching


# 1.23 30-Mar-2020 roy

terminfo: v3 records should create v3 aliases


# 1.22 29-Mar-2020 roy

terminfo: Promote a terminfo description to v3 when required

Blindly scanning the capabilities for # and checking that the following
number is bigger than a short isn't reliable because this could be a
string value:

SomeString#1234

Instead, if we process the numeric as normal and if it's value is too big
for v1 then promote the record to v3.


# 1.21 29-Mar-2020 roy

terminfo: allow _ti_getname to convert from and to any version


# 1.20 28-Mar-2020 christos

PR/55118: Andreas Gustafsson: Oops, set the right flag variable.


# 1.19 28-Mar-2020 roy

terminfo: Add a comment for prior change.


# 1.18 28-Mar-2020 roy

terminfo: use , as a record version delimiter rather than @

@ is allowed in a terminfo description, but a comma is not.


# 1.17 28-Mar-2020 christos

support for older compilers


# 1.16 27-Mar-2020 christos

Introduce a bunch of inline functions and utilities to avoid code duplication.


# 1.15 27-Mar-2020 christos

As described in tech-userlevel:
- Modify the writing code to only write entries in the new
format for the terminal descriptions that require it.
- Store new format entries as <name>@v3
- Store old format entries with clamped values as <name> for
backwards compatibility
- Lookup first <name>@v3 and then <name> if that is not found.
- Don't create terminfo2 anymore; old programs keep working with
clamped entries, and new programs be able to use the wide
fields with using the original db file.


# 1.14 13-Mar-2020 roy

terminfo: promote numeric parameters from short to int

POSIX mandates implementations must support upto a short but may exceed it.
When NetBSD terminfo was implemented, no terminfo description used over
a short, but because ncurses has supported ints for some time, some now do.

Infact, such a terminfo description was imported where colour pairs for
screen-256color went up to 65536 which exposed a bug in the existing
implementation where it set to zero. Because the number might mean
something more than a range, we need to be able to store it accurately.

This requires a version bump because whilst the API hasn't changed thanks
to C int promotion, the ABI has. Also the underlying database structure
has changed as well - we now store the numeric paramter inside a uint32_t
field rather than a uint16_t one.
Whilst this change can still read the old style database, the old one
cannot read the new one and thus we now maintain the database as
terminfo2.cdb, leaving the old library and database alone so old programs
still work fine.

libcurses, libfrom, libmenu and libpanel have also been bumped to
accomoate this change.


# 1.13 12-Mar-2020 roy

terminfo: truncate numeric parameters to a short

Because that is what our API demands.
We should probably change to int when we next bump the API.


Revision tags: netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 netbsd-8-1-RELEASE netbsd-8-1-RC1 pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2
# 1.12 04-May-2017 roy

Clean up some more warnings.


Revision tags: prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320
# 1.11 11-Feb-2017 roy

branches: 1.11.2;
Warn about unprintable characters in capability strings.


# 1.10 11-Feb-2017 roy

Following a newline, strip leading whitespace from capability strings.


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 bouyer-socketcan-base pgoyette-localcount-20170107 netbsd-7-1-RC1 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-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 tls-maxphys-base
# 1.9 07-Jun-2013 roy

branches: 1.9.10; 1.9.14;
Whitespace


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.8 03-Jun-2012 joerg

branches: 1.8.2;
Switch terminfo(3) to cdb(5).


# 1.7 01-Jun-2012 joerg

Fix a number of memory leaks. Keep final loop of the cleanup in tic(1)
under #ifdef __VALGRIND__ though.


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base
# 1.6 28-Nov-2011 joerg

branches: 1.6.2;
Kill a bunch of manual __attribute__ usages and replace them with the
equivalent sys/cdefs.h invocation.


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base
# 1.5 11-Apr-2011 roy

branches: 1.5.4;
Clean up some compile warnings


Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.4 02-Mar-2010 roy

Use _ti_get_token instead of strsep when parsing termcap entries.
This allows us to handle \E\ as a valid sequence.


# 1.3 01-Mar-2010 dholland

compile.c needs sys/endian.h; PR 42875 from Henning Petersen.


# 1.2 25-Feb-2010 roy

If we only have a name then we flatten to an alias.


# 1.1 22-Feb-2010 roy

libterminfo can now compile a single terminfo description which allows
$TERMINFO to be a terminfo description as well as a file reference.

This enables the user to modify the terminfo description on read-only
media.


# 1.20 28-Mar-2020 christos

PR/55118: Andreas Gustafsson: Oops, set the right flag variable.


# 1.19 28-Mar-2020 roy

terminfo: Add a comment for prior change.


# 1.18 28-Mar-2020 roy

terminfo: use , as a record version delimiter rather than @

@ is allowed in a terminfo description, but a comma is not.


# 1.17 28-Mar-2020 christos

support for older compilers


# 1.16 27-Mar-2020 christos

Introduce a bunch of inline functions and utilities to avoid code duplication.


# 1.15 27-Mar-2020 christos

As described in tech-userlevel:
- Modify the writing code to only write entries in the new
format for the terminal descriptions that require it.
- Store new format entries as <name>@v3
- Store old format entries with clamped values as <name> for
backwards compatibility
- Lookup first <name>@v3 and then <name> if that is not found.
- Don't create terminfo2 anymore; old programs keep working with
clamped entries, and new programs be able to use the wide
fields with using the original db file.


# 1.14 13-Mar-2020 roy

terminfo: promote numeric parameters from short to int

POSIX mandates implementations must support upto a short but may exceed it.
When NetBSD terminfo was implemented, no terminfo description used over
a short, but because ncurses has supported ints for some time, some now do.

Infact, such a terminfo description was imported where colour pairs for
screen-256color went up to 65536 which exposed a bug in the existing
implementation where it set to zero. Because the number might mean
something more than a range, we need to be able to store it accurately.

This requires a version bump because whilst the API hasn't changed thanks
to C int promotion, the ABI has. Also the underlying database structure
has changed as well - we now store the numeric paramter inside a uint32_t
field rather than a uint16_t one.
Whilst this change can still read the old style database, the old one
cannot read the new one and thus we now maintain the database as
terminfo2.cdb, leaving the old library and database alone so old programs
still work fine.

libcurses, libfrom, libmenu and libpanel have also been bumped to
accomoate this change.


# 1.13 12-Mar-2020 roy

terminfo: truncate numeric parameters to a short

Because that is what our API demands.
We should probably change to int when we next bump the API.


Revision tags: netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 netbsd-8-1-RELEASE netbsd-8-1-RC1 pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2
# 1.12 04-May-2017 roy

Clean up some more warnings.


Revision tags: prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320
# 1.11 11-Feb-2017 roy

branches: 1.11.2;
Warn about unprintable characters in capability strings.


# 1.10 11-Feb-2017 roy

Following a newline, strip leading whitespace from capability strings.


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 bouyer-socketcan-base pgoyette-localcount-20170107 netbsd-7-1-RC1 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-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 tls-maxphys-base
# 1.9 07-Jun-2013 roy

branches: 1.9.10; 1.9.14;
Whitespace


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.8 03-Jun-2012 joerg

branches: 1.8.2;
Switch terminfo(3) to cdb(5).


# 1.7 01-Jun-2012 joerg

Fix a number of memory leaks. Keep final loop of the cleanup in tic(1)
under #ifdef __VALGRIND__ though.


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base
# 1.6 28-Nov-2011 joerg

branches: 1.6.2;
Kill a bunch of manual __attribute__ usages and replace them with the
equivalent sys/cdefs.h invocation.


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base
# 1.5 11-Apr-2011 roy

branches: 1.5.4;
Clean up some compile warnings


Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.4 02-Mar-2010 roy

Use _ti_get_token instead of strsep when parsing termcap entries.
This allows us to handle \E\ as a valid sequence.


# 1.3 01-Mar-2010 dholland

compile.c needs sys/endian.h; PR 42875 from Henning Petersen.


# 1.2 25-Feb-2010 roy

If we only have a name then we flatten to an alias.


# 1.1 22-Feb-2010 roy

libterminfo can now compile a single terminfo description which allows
$TERMINFO to be a terminfo description as well as a file reference.

This enables the user to modify the terminfo description on read-only
media.


# 1.17 28-Mar-2020 christos

support for older compilers


# 1.16 27-Mar-2020 christos

Introduce a bunch of inline functions and utilities to avoid code duplication.


# 1.15 27-Mar-2020 christos

As described in tech-userlevel:
- Modify the writing code to only write entries in the new
format for the terminal descriptions that require it.
- Store new format entries as <name>@v3
- Store old format entries with clamped values as <name> for
backwards compatibility
- Lookup first <name>@v3 and then <name> if that is not found.
- Don't create terminfo2 anymore; old programs keep working with
clamped entries, and new programs be able to use the wide
fields with using the original db file.


# 1.14 13-Mar-2020 roy

terminfo: promote numeric parameters from short to int

POSIX mandates implementations must support upto a short but may exceed it.
When NetBSD terminfo was implemented, no terminfo description used over
a short, but because ncurses has supported ints for some time, some now do.

Infact, such a terminfo description was imported where colour pairs for
screen-256color went up to 65536 which exposed a bug in the existing
implementation where it set to zero. Because the number might mean
something more than a range, we need to be able to store it accurately.

This requires a version bump because whilst the API hasn't changed thanks
to C int promotion, the ABI has. Also the underlying database structure
has changed as well - we now store the numeric paramter inside a uint32_t
field rather than a uint16_t one.
Whilst this change can still read the old style database, the old one
cannot read the new one and thus we now maintain the database as
terminfo2.cdb, leaving the old library and database alone so old programs
still work fine.

libcurses, libfrom, libmenu and libpanel have also been bumped to
accomoate this change.


# 1.13 12-Mar-2020 roy

terminfo: truncate numeric parameters to a short

Because that is what our API demands.
We should probably change to int when we next bump the API.


Revision tags: netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 netbsd-8-1-RELEASE netbsd-8-1-RC1 pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2
# 1.12 04-May-2017 roy

Clean up some more warnings.


Revision tags: prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320
# 1.11 11-Feb-2017 roy

branches: 1.11.2;
Warn about unprintable characters in capability strings.


# 1.10 11-Feb-2017 roy

Following a newline, strip leading whitespace from capability strings.


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 bouyer-socketcan-base pgoyette-localcount-20170107 netbsd-7-1-RC1 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-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 tls-maxphys-base
# 1.9 07-Jun-2013 roy

branches: 1.9.10; 1.9.14;
Whitespace


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.8 03-Jun-2012 joerg

branches: 1.8.2;
Switch terminfo(3) to cdb(5).


# 1.7 01-Jun-2012 joerg

Fix a number of memory leaks. Keep final loop of the cleanup in tic(1)
under #ifdef __VALGRIND__ though.


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base
# 1.6 28-Nov-2011 joerg

branches: 1.6.2;
Kill a bunch of manual __attribute__ usages and replace them with the
equivalent sys/cdefs.h invocation.


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base
# 1.5 11-Apr-2011 roy

branches: 1.5.4;
Clean up some compile warnings


Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.4 02-Mar-2010 roy

Use _ti_get_token instead of strsep when parsing termcap entries.
This allows us to handle \E\ as a valid sequence.


# 1.3 01-Mar-2010 dholland

compile.c needs sys/endian.h; PR 42875 from Henning Petersen.


# 1.2 25-Feb-2010 roy

If we only have a name then we flatten to an alias.


# 1.1 22-Feb-2010 roy

libterminfo can now compile a single terminfo description which allows
$TERMINFO to be a terminfo description as well as a file reference.

This enables the user to modify the terminfo description on read-only
media.


# 1.14 13-Mar-2020 roy

terminfo: promote numeric parameters from short to int

POSIX mandates implementations must support upto a short but may exceed it.
When NetBSD terminfo was implemented, no terminfo description used over
a short, but because ncurses has supported ints for some time, some now do.

Infact, such a terminfo description was imported where colour pairs for
screen-256color went up to 65536 which exposed a bug in the existing
implementation where it set to zero. Because the number might mean
something more than a range, we need to be able to store it accurately.

This requires a version bump because whilst the API hasn't changed thanks
to C int promotion, the ABI has. Also the underlying database structure
has changed as well - we now store the numeric paramter inside a uint32_t
field rather than a uint16_t one.
Whilst this change can still read the old style database, the old one
cannot read the new one and thus we now maintain the database as
terminfo2.cdb, leaving the old library and database alone so old programs
still work fine.

libcurses, libfrom, libmenu and libpanel have also been bumped to
accomoate this change.


# 1.13 12-Mar-2020 roy

terminfo: truncate numeric parameters to a short

Because that is what our API demands.
We should probably change to int when we next bump the API.


Revision tags: netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 netbsd-8-1-RELEASE netbsd-8-1-RC1 pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2
# 1.12 04-May-2017 roy

Clean up some more warnings.


Revision tags: prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320
# 1.11 11-Feb-2017 roy

branches: 1.11.2;
Warn about unprintable characters in capability strings.


# 1.10 11-Feb-2017 roy

Following a newline, strip leading whitespace from capability strings.


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 bouyer-socketcan-base pgoyette-localcount-20170107 netbsd-7-1-RC1 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-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 tls-maxphys-base
# 1.9 07-Jun-2013 roy

branches: 1.9.10; 1.9.14;
Whitespace


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.8 03-Jun-2012 joerg

branches: 1.8.2;
Switch terminfo(3) to cdb(5).


# 1.7 01-Jun-2012 joerg

Fix a number of memory leaks. Keep final loop of the cleanup in tic(1)
under #ifdef __VALGRIND__ though.


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base
# 1.6 28-Nov-2011 joerg

branches: 1.6.2;
Kill a bunch of manual __attribute__ usages and replace them with the
equivalent sys/cdefs.h invocation.


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base
# 1.5 11-Apr-2011 roy

branches: 1.5.4;
Clean up some compile warnings


Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.4 02-Mar-2010 roy

Use _ti_get_token instead of strsep when parsing termcap entries.
This allows us to handle \E\ as a valid sequence.


# 1.3 01-Mar-2010 dholland

compile.c needs sys/endian.h; PR 42875 from Henning Petersen.


# 1.2 25-Feb-2010 roy

If we only have a name then we flatten to an alias.


# 1.1 22-Feb-2010 roy

libterminfo can now compile a single terminfo description which allows
$TERMINFO to be a terminfo description as well as a file reference.

This enables the user to modify the terminfo description on read-only
media.


# 1.13 12-Mar-2020 roy

terminfo: truncate numeric parameters to a short

Because that is what our API demands.
We should probably change to int when we next bump the API.


Revision tags: netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 netbsd-8-1-RELEASE netbsd-8-1-RC1 pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2
# 1.12 04-May-2017 roy

Clean up some more warnings.


Revision tags: prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320
# 1.11 11-Feb-2017 roy

branches: 1.11.2;
Warn about unprintable characters in capability strings.


# 1.10 11-Feb-2017 roy

Following a newline, strip leading whitespace from capability strings.


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 bouyer-socketcan-base pgoyette-localcount-20170107 netbsd-7-1-RC1 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-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 tls-maxphys-base
# 1.9 07-Jun-2013 roy

branches: 1.9.10; 1.9.14;
Whitespace


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.8 03-Jun-2012 joerg

branches: 1.8.2;
Switch terminfo(3) to cdb(5).


# 1.7 01-Jun-2012 joerg

Fix a number of memory leaks. Keep final loop of the cleanup in tic(1)
under #ifdef __VALGRIND__ though.


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base
# 1.6 28-Nov-2011 joerg

branches: 1.6.2;
Kill a bunch of manual __attribute__ usages and replace them with the
equivalent sys/cdefs.h invocation.


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base
# 1.5 11-Apr-2011 roy

branches: 1.5.4;
Clean up some compile warnings


Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.4 02-Mar-2010 roy

Use _ti_get_token instead of strsep when parsing termcap entries.
This allows us to handle \E\ as a valid sequence.


# 1.3 01-Mar-2010 dholland

compile.c needs sys/endian.h; PR 42875 from Henning Petersen.


# 1.2 25-Feb-2010 roy

If we only have a name then we flatten to an alias.


# 1.1 22-Feb-2010 roy

libterminfo can now compile a single terminfo description which allows
$TERMINFO to be a terminfo description as well as a file reference.

This enables the user to modify the terminfo description on read-only
media.


Revision tags: netbsd-8-1-RC1 pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2
# 1.12 04-May-2017 roy

Clean up some more warnings.


Revision tags: prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320
# 1.11 11-Feb-2017 roy

branches: 1.11.2;
Warn about unprintable characters in capability strings.


# 1.10 11-Feb-2017 roy

Following a newline, strip leading whitespace from capability strings.


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 bouyer-socketcan-base pgoyette-localcount-20170107 netbsd-7-1-RC1 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-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 tls-maxphys-base
# 1.9 07-Jun-2013 roy

branches: 1.9.10; 1.9.14;
Whitespace


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.8 03-Jun-2012 joerg

branches: 1.8.2;
Switch terminfo(3) to cdb(5).


# 1.7 01-Jun-2012 joerg

Fix a number of memory leaks. Keep final loop of the cleanup in tic(1)
under #ifdef __VALGRIND__ though.


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base
# 1.6 28-Nov-2011 joerg

branches: 1.6.2;
Kill a bunch of manual __attribute__ usages and replace them with the
equivalent sys/cdefs.h invocation.


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base
# 1.5 11-Apr-2011 roy

branches: 1.5.4;
Clean up some compile warnings


Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.4 02-Mar-2010 roy

Use _ti_get_token instead of strsep when parsing termcap entries.
This allows us to handle \E\ as a valid sequence.


# 1.3 01-Mar-2010 dholland

compile.c needs sys/endian.h; PR 42875 from Henning Petersen.


# 1.2 25-Feb-2010 roy

If we only have a name then we flatten to an alias.


# 1.1 22-Feb-2010 roy

libterminfo can now compile a single terminfo description which allows
$TERMINFO to be a terminfo description as well as a file reference.

This enables the user to modify the terminfo description on read-only
media.