Source: cwidget Version: 0.5.17-7 With the upcoming libncursesw6 package (which is not available yet, but everything is ready in git and I have asked for an upload to experimental), cwidget FTBFS. This is the relevant part, I have attached the full build log for reference:
,----
| text_layout.cc: In member function 'virtual void
cwidget::widgets::text_layout::dispatch_mouse(short int, int, int, int,
mmask_t)':
| text_layout.cc:89:57: error: no matching function for call to 'max(int,
size_t)'
| set_start(std::max(0, start - mouse_wheel_scroll_lines));
| ^
`----
This is the offending function:
,----
| void text_layout::dispatch_mouse(short id, int x, int y, int z, mmask_t
bstate)
| {
| // Only do something if this system's ncurses has both button 4
| // and button 5 (older ones didn't).
| #if defined(BUTTON4_PRESSED) && defined(BUTTON5_PRESSED)
| const int mouse_wheel_scroll_lines =
| std::max(1, std::min(getmaxy() - 1, 3));
|
| if((bstate & BUTTON4_PRESSED) != 0)
| {
| if((bstate & BUTTON5_PRESSED) == 0)
| {
| freshen_contents(lastst);
| if(start > 0)
| set_start(std::max(0, start - mouse_wheel_scroll_lines));
| }
| }
| else if((bstate & BUTTON5_PRESSED) != 0)
| {
| freshen_contents(lastst);
| if(start + getmaxy() < contents.size())
| set_start(std::min(contents.size() - getmaxy(),
| start + mouse_wheel_scroll_lines));
| }
| #endif
| }
`----
Indeed, one difference between libncursesw5 and libncursesw6 is that the
latter _does_ have support for button 5. So the whole block between
"#if defined(...)" and "#endif" had never been compiled with Debian's
ncurses packages, and it is not very surprising that it bit-rotted.
I should note that the person who first requested this 5th button
support in Debian is Daniel Burrows, original author of aptitude and
cwidget. See https://bugs.debian.org/bug=230990.
-- System Information:
Debian Release: buster/sid
APT prefers unstable
APT policy: (500, 'unstable'), (101, 'experimental')
Architecture: i386 (x86_64)
Foreign Architectures: amd64
Kernel: Linux 4.15.4-nouveau (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8),
LANGUAGE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
cwidget_0.5.17-7_i386.build.xz
Description: build log

