X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:date:from:to:subject:message-id:reply-to
	:references:mime-version:content-type:in-reply-to; q=dns; s=
	default; b=Z+UorG4//7abes7mIKxQpu4QknWzWz6fEnyMBql4s6So7gvMpToqd
	R4cVwwmGZBoYXbhSiPNcwN4oHY/wA7XkPBM1Ped63qm0IqDHsWm70KXHz41kDkLU
	8HbFs3QoD0A6ekmbvkbhQwuvxRxFqwMJKOkn0bMJ6HiC5jv3pYmQb0=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:date:from:to:subject:message-id:reply-to
	:references:mime-version:content-type:in-reply-to; s=default;
	 bh=2pEHz2K3akHKB20OvAfqjhT0/Jk=; b=elCIZL2vVDRlQQQ4YchAzMmTaBZf
	XfnJ3f5b25HFoAeHqa4zxECkxnhtjxJv2PiQ46wAMLAew9+AimrrxKqmstLAeFLW
	l8mgoJ0AMdMq1ETLa1+ERG6ZBlrnUuBgHdvE1ZySFoSXVlsODZ26sB0zjWdUvSvv
	8cnr9ovBFwhiHaI=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-5.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2
X-HELO: calimero.vinschen.de
Date: Thu, 15 May 2014 15:49:05 +0200
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: screen on 64-bit mangles mintty/buffer
Message-ID: <20140515134905.GR2436@calimero.vinschen.de>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <5370E144.4010905@shaddybaddah.name> <90t1n9l4g51dgrq060rc6ua48eog4178v8@4ax.com> <5373AF2E.5090402@shaddybaddah.name> <20140515071745.GI2436@calimero.vinschen.de> <5374B8EA.5080801@shaddybaddah.name>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;	protocol="application/pgp-signature"; boundary="Aq4SrlNverAHn87R"
Content-Disposition: inline
In-Reply-To: <5374B8EA.5080801@shaddybaddah.name>
User-Agent: Mutt/1.5.23 (2014-03-12)

--Aq4SrlNverAHn87R
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On May 15 22:54, Shaddy Baddah wrote:
> Hi Corinna,
>=20
>=20
> On 2014-05-15 17:17+1000, Corinna Vinschen wrote:
> >
> >
> >Nice detective work, really.  The goldstar is well deservered :)
> >
> >On May 15 04:00, Shaddy Baddah wrote:
> >>I quickly worked out that the code has a bug for "%i". At some point
> >>the code was changed to push and pop the parameters being passed (0 and
> >>39 in my eg.). However, the "%i" select/case block was incrementing the
> >>arguments in a no longer used array for parameters:
> >>
> >>
> >>	    case 'i':
> >>		if (p_is_s[0] =3D=3D 0)
> >>		    param[0]++;
> >>		if (p_is_s[1] =3D=3D 0)
> >>		    param[1]++;
> >>		break;
> >
> >Unfortunately there's no newer upstream release and this bug is present
> >in the ncurses 5.9 version in Fedora 20 as well.  From what I gather fro=
m the
> >surrounding code, I *assume* something like this could fix it
> >
> >             case 'i':
> >                 y =3D npop();
> >                 x =3D npop();
> >                 if (p_is_s[0] =3D=3D 0)
> >                     y++;
> >                 if (p_is_s[1] =3D=3D 0)
> >                     x++;
> >                 npush(x);
> >                 npush(y);
> >                 break;
> >
> >I'm not sure the relation between x, y, and the p_is_s indices is
> >correct, though.
>=20
> Yes, that's the code that I thought of as well, and same, I'd have to
> get my head around the exact order of p_is_s (unfortunate name), etc.
>=20
> When you say the bug is present in ncurses 5.9, is there any application
> that is directly affected? I ask as screen being affected was sort of a
> fluke. It's configure script should have detected terminfo notation was
> available for use, and used the equivalent entry for "cs".

Well, according to Murphy, if there's a bug, it will be hit.

One of them is, for instance, tcsh, which still uses the termcap
functions deliberately for compatibility with old systems, even when
linked against [n]curses[w].  Fortunately tcsh doesn't try to use really
fancy terminal sequences...

There are very likely more projects out there doing that.  And on many
systems the only way to get the termcap functions is to use ncurses.


Corinna

--=20
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

--Aq4SrlNverAHn87R
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBAgAGBQJTdMXRAAoJEPU2Bp2uRE+gP3oP/3HSre4hqVqn6nlVBN6EYypt
f5Pi0pRDoQwJDzf1MWuFCxb1W5LUANkGDsrwW1dmajhEbfv8djTFNDJ2disxr9DS
Ca30V2guRQ9aPOEgw9qh8RAGDY1X6JBtEMDjfxQr0j1WZVWLvTzPPGYQ+ODalIAX
0E6d/gSFlFs9SfMF3jPanU8aSHLVHuXfyRjHly/c5X+k8i4HQJKYvHUj49LOTo2W
ddV++gXplZwCYWZrj4RkaoAnRA+oTLUEfz0ihZY2TWciUGVsZxzXHmsDlt16z4gs
dpshovnTpd7/o1P5pGthIZebJgZKaTfwNN/SG7C/Ph4YL99IuqL+89L6DQtdBHUw
C7ieGVaIziJ49uTvGACNwbCIzsHOj7F8f1wlDdQntZ3pA8flxSWRDE3zNEOlpjji
animfefqhVYTaQUpUeiDYy096MnB7NLkU17y9v/ECU/ENq+pJwXy65eSzvS71OPB
HAMn3H1SGpdOQK+DBJqtSguZzIT3siNfgP0vRivfA4chSfYS/BQbad6DQCFfTdVw
JVCr+IpUNcs2/hsYRO0D5MmciL2d3SVXxB3ycUVanl0UNPAkDStoDUCH6ISO2YtD
jsVSJIpK2su54lCGe2uFkwWd+vF0xd86O3Icm4zeydMaLkyq7r8BTRKh0H0UNlPt
tk/K2CFPEMapxjwuTBeU
=6Zij
-----END PGP SIGNATURE-----

--Aq4SrlNverAHn87R--
