NetBSD/lib
rillig 609d11bc47 libcurses: fix wrong tab width for addch
In sysinst, the installation screen is indented with tabs.  Sysinst uses
msgc, which brings its own text layout engine.  This engine does not use
addbytes but addch.  In addch, the x position for each tab was advanced
twice as much as needed.  The menu items were thus not indented by 8
spaces but by 16, which caused an ugly line break in the German
translation.

This bug largely went unnoticed because most other applications use
addbytes instead, which worked fine all the time.  It had been
introduced somewhere between NetBSD 8.0 and NetBSD 9.0.

The code around this bug used aliased variables for win->curx and
win->cury a lot.  Getting this right is difficult and needs a thorough
test suite.  Even though libcurses has 201 tests, that is not nearly
enough to cover all the relations between the various functions in
libcurses that call each other, crossing API boundaries from internal
to external, doing character conversions on the way and juggling around
4 different types of characters (char, wchar_t, chtype, cchar_t).

The simplest fix was to remove all this aliasing, while keeping the
API the same.  If _cursesi_waddbytes is not considered part of the API,
it would be possible to replace px with win->curx in all places, same
for py and win->cury.

The complicated code with the aliasing may have been meant for
performance reasons, but it's hard to see any advantage if both points
of truth need to be synchronized all the time.

Libcurses can be built in 2 modes: with wide character support or
without (-DDISABLE_WCHAR).  The test suite only covers the variant with
wide characters.  The single-byte variant has to be tested manually.
Running sysinst with the single-byte libcurses produces the correct
layout.
2021-02-13 14:30:37 +00:00
..
csu Explicitly use -fcommon for globals shared between libc and CSU. 2020-04-22 23:32:25 +00:00
i18n_module
libarch
libbluetooth
libbpfjit
libbsdmalloc
libbz2
libc Document EINVAL for invalid flags given to fsync_range(). 2021-02-13 06:24:08 +00:00
libc_fp
libc_vfp comparision -> comparison 2020-12-02 14:20:19 +00:00
libcompat
libcrypt Remove extra semicolon. 2020-05-14 08:34:17 +00:00
libcurses libcurses: fix wrong tab width for addch 2021-02-13 14:30:37 +00:00
libdm Update for proplib(3) API changes. 2020-06-07 05:54:00 +00:00
libedit Fix numeric variable handling in settc (lyzliyuzhi at 163 dot com) 2020-07-10 20:34:24 +00:00
libexecinfo If Unwind_Backtrace is broken, ctx.n will still contain ~0, and we will 2020-07-26 15:53:05 +00:00
libform terminfo: promote numeric parameters from short to int 2020-03-13 15:19:24 +00:00
libintl
libipsec
libisns
libkern
libkvm Catch up with aa64 is not mips change 2020-11-10 19:14:11 +00:00
liblwres
libm Provide frexpl on non-long-double systems as alias to frexp. 2020-01-30 20:31:50 +00:00
libmenu terminfo: promote numeric parameters from short to int 2020-03-13 15:19:24 +00:00
libnpf Major NPF improvements (merge from upstream): 2020-05-30 14:16:56 +00:00
libnvmm Implement support for trapping REP CMPS instructions in NVMM. 2020-12-27 20:56:14 +00:00
libossaudio ossaudio(3): Do not reuse results from AUDIO_GETBUFINFO in SETINFO 2020-12-19 12:55:28 +00:00
libp2k UVM locking changes, proposed on tech-kern: 2020-02-23 15:46:38 +00:00
libpam lib/libpam: Fix the possible -Werror=stringop-truncation 2020-06-12 01:20:32 +00:00
libpanel terminfo: promote numeric parameters from short to int 2020-03-13 15:19:24 +00:00
libpci
libperfuse miscelaneous -> miscellaneous in comment. 2020-03-05 15:56:20 +00:00
libposix
libppath
libprop Improvements to the problib(3) API: 2020-06-06 21:25:59 +00:00
libpthread s/reseting/resetting/ 2020-07-22 01:24:39 +00:00
libpuffs s/conjuction/conjunction/ 2019-12-27 10:13:59 +00:00
libquota
libradius
librefuse
libresolv
librmt
librpcsvc
librt
librump
librumpclient
librumpdev
librumphijack Add pathconf and lpathconf (fixes lib/librumphijack/nfs test which uses ls 2020-05-27 18:55:36 +00:00
librumpnet
librumpres
librumpuser Support aarch64eb in */config.guess. 2020-11-17 10:35:10 +00:00
librumpvfs
libskey
libss
libtelnet
libterminfo libterminfo: cast to uint16/32_t before conversion to preserve negativity 2020-06-21 15:05:23 +00:00
libukfs
libusbhid lib/libusbhid: Fix possible left shift changes signedness bit. 2020-04-04 21:26:16 +00:00
libutil PR lib/46542 2020-10-30 22:03:11 +00:00
libwrap PR/54992: fix hosts_access(5) to works for IPv6 linklocal address without scope-id 2020-03-30 08:34:38 +00:00
liby
libz
lua
npf
Makefile lib: Move sqlite, since it depends on libm 2020-10-29 20:11:17 +00:00
Makefile.inc
bumpversion
checkoldver
checkver
checkvers