summaryrefslogtreecommitdiff
path: root/share/terminfo
diff options
context:
space:
mode:
authorroy <roy@NetBSD.org>2020-03-13 15:19:24 +0000
committerroy <roy@NetBSD.org>2020-03-13 15:19:24 +0000
commitc33983b956a2fb431df0a1f0e79feef20fead859 (patch)
tree511e2e6b493a7277c14d911f2037131c53fab228 /share/terminfo
parent97a0543f1240eabaa6fac1e6fe6cdd59d5f93a73 (diff)
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.
Diffstat (limited to 'share/terminfo')
-rw-r--r--share/terminfo/Makefile10
1 files changed, 5 insertions, 5 deletions
diff --git a/share/terminfo/Makefile b/share/terminfo/Makefile
index 7d35e2fba1b..74a614fc09d 100644
--- a/share/terminfo/Makefile
+++ b/share/terminfo/Makefile
@@ -1,12 +1,12 @@
-# $NetBSD: Makefile,v 1.3 2012/06/03 23:19:11 joerg Exp $
+# $NetBSD: Makefile,v 1.4 2020/03/13 15:19:25 roy Exp $
# from: @(#)Makefile 8.1 (Berkeley) 6/8/93
-CLEANFILES= terminfo.cdb
-realall: terminfo.cdb
-FILES=terminfo.cdb terminfo
+CLEANFILES= terminfo2.cdb
+realall: terminfo2.cdb
+FILES=terminfo2.cdb terminfo
FILESDIR=${BINDIR}/misc
-terminfo.cdb: terminfo ${TOOL_TIC}
+terminfo2.cdb: terminfo ${TOOL_TIC}
${_MKTARGET_CREATE}
${TOOL_TIC} -ax -o ${.TARGET} "${.CURDIR}/terminfo"