Mon Apr 1 10:26:42 2019 UTC ()
nano: fixing a possible non-functioning ^S keystroke
(wiedi)
diff -r1.78 -r1.79 pkgsrc/editors/nano/Makefile
diff -r1.50 -r1.51 pkgsrc/editors/nano/distinfo
diff -r0 -r1.3 pkgsrc/editors/nano/patches/patch-src_files.c
--- pkgsrc/editors/nano/Makefile 2019/03/24 19:42:34 1.78
+++ pkgsrc/editors/nano/Makefile 2019/04/01 10:26:42 1.79
| @@ -1,16 +1,17 @@ | | | @@ -1,16 +1,17 @@ |
1 | # $NetBSD: Makefile,v 1.78 2019/03/24 19:42:34 wiedi Exp $ | | 1 | # $NetBSD: Makefile,v 1.79 2019/04/01 10:26:42 wiedi Exp $ |
2 | | | 2 | |
3 | DISTNAME= nano-4.0 | | 3 | DISTNAME= nano-4.0 |
| | | 4 | PKGREVISION= 1 |
4 | CATEGORIES= editors | | 5 | CATEGORIES= editors |
5 | MASTER_SITES= https://www.nano-editor.org/dist/v${PKGVERSION_NOREV:R}/ | | 6 | MASTER_SITES= https://www.nano-editor.org/dist/v${PKGVERSION_NOREV:R}/ |
6 | EXTRACT_SUFX= .tar.xz | | 7 | EXTRACT_SUFX= .tar.xz |
7 | | | 8 | |
8 | MAINTAINER= wiedi@frubar.net | | 9 | MAINTAINER= wiedi@frubar.net |
9 | HOMEPAGE= https://www.nano-editor.org/ | | 10 | HOMEPAGE= https://www.nano-editor.org/ |
10 | COMMENT= Small and friendly text editor (a free replacement for Pico) | | 11 | COMMENT= Small and friendly text editor (a free replacement for Pico) |
11 | LICENSE= gnu-gpl-v3 | | 12 | LICENSE= gnu-gpl-v3 |
12 | | | 13 | |
13 | USE_PKGLOCALEDIR= yes | | 14 | USE_PKGLOCALEDIR= yes |
14 | USE_TOOLS+= msgfmt gmake | | 15 | USE_TOOLS+= msgfmt gmake |
15 | GNU_CONFIGURE= yes | | 16 | GNU_CONFIGURE= yes |
16 | CONFIGURE_ARGS+= --enable-color | | 17 | CONFIGURE_ARGS+= --enable-color |
--- pkgsrc/editors/nano/distinfo 2019/03/24 19:42:34 1.50
+++ pkgsrc/editors/nano/distinfo 2019/04/01 10:26:42 1.51
| @@ -1,7 +1,8 @@ | | | @@ -1,7 +1,8 @@ |
1 | $NetBSD: distinfo,v 1.50 2019/03/24 19:42:34 wiedi Exp $ | | 1 | $NetBSD: distinfo,v 1.51 2019/04/01 10:26:42 wiedi Exp $ |
2 | | | 2 | |
3 | SHA1 (nano-4.0.tar.xz) = 586f369d622a883acf06d1143a7b3c8754acc011 | | 3 | SHA1 (nano-4.0.tar.xz) = 586f369d622a883acf06d1143a7b3c8754acc011 |
4 | RMD160 (nano-4.0.tar.xz) = b6bb83e30ec4484a6fa8f3d5366387918a480e1f | | 4 | RMD160 (nano-4.0.tar.xz) = b6bb83e30ec4484a6fa8f3d5366387918a480e1f |
5 | SHA512 (nano-4.0.tar.xz) = 2cef28df05f890bc27ef8faa9eb5350f8de2cc6cc69b4dc8e11c19248911630a7088ddbee57c8a8aa56df6efaab13124132d0cda55e5ae1f151265723d7d0ede | | 5 | SHA512 (nano-4.0.tar.xz) = 2cef28df05f890bc27ef8faa9eb5350f8de2cc6cc69b4dc8e11c19248911630a7088ddbee57c8a8aa56df6efaab13124132d0cda55e5ae1f151265723d7d0ede |
6 | Size (nano-4.0.tar.xz) = 1533992 bytes | | 6 | Size (nano-4.0.tar.xz) = 1533992 bytes |
7 | SHA1 (patch-configure) = 4a618bf99332fcfce2413be14400b919d042cc30 | | 7 | SHA1 (patch-configure) = 4a618bf99332fcfce2413be14400b919d042cc30 |
| | | 8 | SHA1 (patch-src_files.c) = 59c486e32c18f883139c918fe846946a67a826a6 |
$NetBSD: patch-src_files.c,v 1.3 2019/04/01 10:26:42 wiedi Exp $
The lack of initialization caused a nasty bug on some targets (such as
ARMv7) which would make it so that ^S would just say "Cancelled".
While x86 (both 64 and 32 bits) seems to initialize 'response' to zero or
a positive number, ARM does not, and there is usually a negative value in
its place, which triggers the 'if (response < 0)' check and, as a result,
the code says "Cancelled".
This fixes https://savannah.gnu.org/bugs/?56023.
Reported-by: Devin Hussey <husseydevin@gmail.com>
Bug existed since version 4.0, commit 0f9d60a3.
--- src/files.c.orig 2019-03-23 08:26:13.000000000 +0000
+++ src/files.c
@@ -2101,7 +2101,7 @@ int do_writeout(bool exiting, bool withp
while (TRUE) {
const char *msg;
- int response, choice;
+ int response = 0, choice = 0;
functionptrtype func;
#ifndef NANO_TINY
const char *formatstr, *backupstr;