Package: sc Version: 7.16-4 Severity: normal Tags: patch User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu xenial ubuntu-patch
Dear Maintainer, sc breaks with ncurses 6 because it sets notimeout, causing getch not to wait for input. multi-character commands like 'ir' are completely broken by this. The solution is to not set notimeout. Setting it before was simply ignored by curses, which is why we did not see breakage In Ubuntu, the attached patch was applied to fix sc: * lex.c: do not set notimeout (LP: #1549665) Thanks for considering the patch. -- System Information: Debian Release: stretch/sid APT prefers xenial-updates APT policy: (500, 'xenial-updates'), (500, 'xenial-security'), (500, 'xenial') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.4.0-7-generic (SMP w/4 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) diff -Nru sc-7.16/debian/patches/nonotimeout.patch sc-7.16/debian/patches/nonotimeout.patch --- sc-7.16/debian/patches/nonotimeout.patch 1969-12-31 16:00:00.000000000 -0800 +++ sc-7.16/debian/patches/nonotimeout.patch 2016-02-25 14:42:37.000000000 -0800 @@ -0,0 +1,35 @@ +Description; do not set notimeout + It causes getch to immediately return -1, triggering the warning + "Weird character, decimal -1", and stops multi-character commands + like 'ir' from working. This was not a problem before because + curses was wrongly ignoring it (see + http://invisible-island.net/ncurses/NEWS.html#t20151128) +Author: Serge Hallyn <serge.hal...@gmail.com> +Forwarded: yes + +Index: sc-7.16/lex.c +=================================================================== +--- sc-7.16.orig/lex.c ++++ sc-7.16/lex.c +@@ -650,21 +650,18 @@ void + initkbd() + { + keypad(stdscr, TRUE); +- notimeout(stdscr,TRUE); + } + + void + kbd_again() + { + keypad(stdscr, TRUE); +- notimeout(stdscr,TRUE); + } + + void + resetkbd() + { + keypad(stdscr, FALSE); +- notimeout(stdscr, FALSE); + } + + int diff -Nru sc-7.16/debian/patches/series sc-7.16/debian/patches/series --- sc-7.16/debian/patches/series 2014-05-18 13:00:54.000000000 -0700 +++ sc-7.16/debian/patches/series 2016-02-25 14:39:24.000000000 -0800 @@ -2,3 +2,4 @@ call_function_not_take_its_address Upstream-changes-from-old-versions function_definitions +nonotimeout.patch