Debian Bug report logs - #237629
libncurses5: bad tigetflag() return value on powerpc breaks zsh

version graph

Package: libncurses5; Maintainer for libncurses5 is Craig Small <csmall@debian.org>; Source for libncurses5 is src:ncurses.

Reported by: simon raven <simon@nuit.ca>

Date: Fri, 12 Mar 2004 13:48:01 UTC

Severity: important

Tags: sid

Merged with 237870

Found in version 5.3.20030719-5

Fixed in version ncurses/5.4-3

Done: Daniel Jacobowitz <dan@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Daniel Jacobowitz <ncurses-maint@debian.org>:
Bug#237629; Package ncurses-term. Full text and rfc822 format available.

Acknowledgement sent to simon raven <simon@nuit.ca>:
New Bug report received and forwarded. Copy sent to Daniel Jacobowitz <ncurses-maint@debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: simon raven <simon@nuit.ca>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: ncurses-term: shell terminfo FUBAR with new shells instances
Date: Fri, 12 Mar 2004 13:31:01 +0000
Package: ncurses-term
Version: 5.4-2
Severity: grave
Tags: sid
Justification: causes non-serious data loss


some of my prompt settings are set with terminfo calls, and there seems
to have been some changes to some of the terminfo files rendering my shell almost
useless (i'm typing from within a screen session, that has pre-upgrade
shells still active; however, if i spawn a sub-shell (login or otherwise)
the history is missing, and other issues crop up.

here's what it looked like before:

(simon@anubis:pts/3)(~)
(13:27:%) (to the end of the screen -->) (04-03-12)

and here's after:

yesyes(yessimonyes@anubis:pts/3yes)yesyes(yes~yes)yes
yesyes(yes13:28:yes%yes)yesyes
yesyes(yes04-03-12yes)yesyes

in the second case, it looks *exactly* like that, no spaces or anything.


-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (998, 'unstable'), (1, 'experimental')
Architecture: powerpc (ppc)
Kernel: Linux 2.6.4
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8

-- no debconf information



Information forwarded to debian-bugs-dist@lists.debian.org, Daniel Jacobowitz <ncurses-maint@debian.org>:
Bug#237629; Package ncurses-term. Full text and rfc822 format available.

Acknowledgement sent to Thomas Dickey <dickey@his.com>:
Extra info received and forwarded to list. Copy sent to Daniel Jacobowitz <ncurses-maint@debian.org>. Full text and rfc822 format available.

Message #10 received at 237629@bugs.debian.org (full text, mbox):

From: Thomas Dickey <dickey@his.com>
To: simon raven <simon@nuit.ca>, 237629@bugs.debian.org
Subject: Re: Bug#237629: ncurses-term: shell terminfo FUBAR with new shells instances
Date: Fri, 12 Mar 2004 09:38:26 -0500 (EST)
On Fri, 12 Mar 2004, simon raven wrote:

> Package: ncurses-term
> Version: 5.4-2
> Severity: grave
> Tags: sid
> Justification: causes non-serious data loss

There are several places to look.  Finding the part that is sending "yes"
seems to be the most straightforward.  But it could be in screen, bash
glibc or even ncurses.  Unless infocmp shows "yes" somewhere in its
output, it is unlikely to be ncurses.  ltrace or strace might provide
a clue.

-- 
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net



Information forwarded to debian-bugs-dist@lists.debian.org, Daniel Jacobowitz <ncurses-maint@debian.org>:
Bug#237629; Package ncurses-term. Full text and rfc822 format available.

Acknowledgement sent to Daniel Jacobowitz <dan@debian.org>:
Extra info received and forwarded to list. Copy sent to Daniel Jacobowitz <ncurses-maint@debian.org>. Full text and rfc822 format available.

Message #15 received at 237629@bugs.debian.org (full text, mbox):

From: Daniel Jacobowitz <dan@debian.org>
To: simon raven <simon@nuit.ca>, 237629@bugs.debian.org
Subject: Re: Bug#237629: ncurses-term: shell terminfo FUBAR with new shells instances
Date: Fri, 12 Mar 2004 10:42:59 -0500
On Fri, Mar 12, 2004 at 01:31:01PM +0000, simon raven wrote:
> Package: ncurses-term
> Version: 5.4-2
> Severity: grave
> Tags: sid
> Justification: causes non-serious data loss
> 
> 
> some of my prompt settings are set with terminfo calls, and there seems
> to have been some changes to some of the terminfo files rendering my shell almost
> useless (i'm typing from within a screen session, that has pre-upgrade
> shells still active; however, if i spawn a sub-shell (login or otherwise)
> the history is missing, and other issues crop up.
> 
> here's what it looked like before:
> 
> (simon@anubis:pts/3)(~)
> (13:27:%) (to the end of the screen -->) (04-03-12)
> 
> and here's after:
> 
> yesyes(yessimonyes@anubis:pts/3yes)yesyes(yes~yes)yes
> yesyes(yes13:28:yes%yes)yesyes
> yesyes(yes04-03-12yes)yesyes
> 
> in the second case, it looks *exactly* like that, no spaces or anything.

You've left out a lot of information, including: what terminal emulator
are you using?  What is $TERM?  What is your shell, and what terminfo
calls is it using?  Or are you using tput?

It sounds like you're getting the value of some capability and echoing
it to the terminal.  And now it's a boolean where it used to be a
control sequence.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer



Information forwarded to debian-bugs-dist@lists.debian.org, Daniel Jacobowitz <ncurses-maint@debian.org>:
Bug#237629; Package ncurses-term. Full text and rfc822 format available.

Acknowledgement sent to simon@nuit.ca:
Extra info received and forwarded to list. Copy sent to Daniel Jacobowitz <ncurses-maint@debian.org>. Full text and rfc822 format available.

Message #20 received at 237629@bugs.debian.org (full text, mbox):

From: simon@nuit.ca
To: Thomas Dickey <dickey@his.com>
Cc: 237629@bugs.debian.org
Subject: Re: Bug#237629: ncurses-term: shell terminfo FUBAR with new shells instances
Date: Fri, 12 Mar 2004 16:08:26 +0000
[Message part 1 (text/plain, inline)]
Le Fri, Mar 12, 2004 at 09:38:26 -0500, Thomas Dickey a écrit:
> On Fri, 12 Mar 2004, simon raven wrote:
> 
> > Package: ncurses-term
> > Version: 5.4-2
> > Severity: grave
> > Tags: sid
> > Justification: causes non-serious data loss
> 
> There are several places to look.  Finding the part that is sending "yes"
> seems to be the most straightforward.  But it could be in screen, bash
> glibc or even ncurses.  Unless infocmp shows "yes" somewhere in its
> output, it is unlikely to be ncurses.  ltrace or strace might provide
> a clue.

ah cool. thank you. i'll start looking :).

> -- 
> Thomas E. Dickey
> http://invisible-island.net
> ftp://invisible-island.net

-- 
@@-----------------------------------------------------------------@@
| ,''`.   http://www.debian.org/  | http://www.nuit.ca/             |
| : :' :  Debian GNU/Linux        | http://simonraven.nuit.ca/      |
| `. `'                           | PGP key fingerprint (new one):  |
|  `-                             | 7C49 FD9C 1054 7300 3B7B        |
|                                 | 8BF4 6A88 7AE2 711D F097        |
@@-----------------------------------------------------------------@@
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Daniel Jacobowitz <ncurses-maint@debian.org>:
Bug#237629; Package ncurses-term. Full text and rfc822 format available.

Acknowledgement sent to simon@nuit.ca:
Extra info received and forwarded to list. Copy sent to Daniel Jacobowitz <ncurses-maint@debian.org>. Full text and rfc822 format available.

Message #25 received at 237629@bugs.debian.org (full text, mbox):

From: simon@nuit.ca
To: Daniel Jacobowitz <dan@debian.org>
Cc: 237629@bugs.debian.org
Subject: Re: Bug#237629: ncurses-term: shell terminfo FUBAR with new shells instances
Date: Fri, 12 Mar 2004 16:17:52 +0000
[Message part 1 (text/plain, inline)]
Le Fri, Mar 12, 2004 at 10:42:59 -0500, Daniel Jacobowitz a écrit:
> On Fri, Mar 12, 2004 at 01:31:01PM +0000, simon raven wrote:
> 
> You've left out a lot of information, including: what terminal emulator
> are you using?  What is $TERM?  What is your shell, and what terminfo
> calls is it using?  Or are you using tput?

sorry about that. $TERM is xterm or linux.  using default term emu. for
both (doubt this matters, but i'm uxterm and unicode_start for
console).

terminfo stuff (straight from .zshrc):

#    set -A altchar "${(s..)terminfo[acsc]}"
#    PR_SET_CHARSET="%{$terminfo[enacs]%}"
#    PR_SHIFT_IN="%{$terminfo[smacs]%}"
#    PR_SHIFT_OUT="%{$terminfo[rmacs]%}"

#    autoload colors zsh/terminfo
#    if [[ "$terminfo[colors]" -ge 8 ]]; then
#    colors
#    fi
#    for color in RED GREEN YELLOW BLUE MAGENTA CYAN WHITE; do
#        eval PR_$color='%{$terminfo[bold]$fg[${(L)color}]%}'
#        eval PR_LIGHT_$color='%{$fg[${(L)color}]%}'

#    PR_NO_COLOUR="%{$terminfo[sgr0]%}"

btw, the colours that were getting loaded were the non-bold colours 
(darker in shade), whereas before it was the bright ones. oh and it also
does this in screen, too. 

> It sounds like you're getting the value of some capability and echoing
> it to the terminal.  And now it's a boolean where it used to be a
> control sequence.

very strange... but now that you mention it, that's what seems to be going
on. i find it odd that one minute it's functional, and the next tty i
open i get that yes stuff.

i'll try out that stuff that thomas suggested.

> -- 
> Daniel Jacobowitz
> MontaVista Software                         Debian GNU/Linux Developer

-- 
@@-----------------------------------------------------------------@@
| ,''`.   http://www.debian.org/  | http://www.nuit.ca/             |
| : :' :  Debian GNU/Linux        | http://simonraven.nuit.ca/      |
| `. `'                           | PGP key fingerprint (new one):  |
|  `-                             | 7C49 FD9C 1054 7300 3B7B        |
|                                 | 8BF4 6A88 7AE2 711D F097        |
@@-----------------------------------------------------------------@@
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Daniel Jacobowitz <ncurses-maint@debian.org>:
Bug#237629; Package ncurses-term. Full text and rfc822 format available.

Acknowledgement sent to Daniel Jacobowitz <dan@debian.org>:
Extra info received and forwarded to list. Copy sent to Daniel Jacobowitz <ncurses-maint@debian.org>. Full text and rfc822 format available.

Message #30 received at 237629@bugs.debian.org (full text, mbox):

From: Daniel Jacobowitz <dan@debian.org>
To: simon@nuit.ca
Cc: 237629@bugs.debian.org
Subject: Re: Bug#237629: ncurses-term: shell terminfo FUBAR with new shells instances
Date: Fri, 12 Mar 2004 11:24:03 -0500
On Fri, Mar 12, 2004 at 04:17:52PM +0000, simon@nuit.ca wrote:
> Le Fri, Mar 12, 2004 at 10:42:59 -0500, Daniel Jacobowitz a ?crit:
> > On Fri, Mar 12, 2004 at 01:31:01PM +0000, simon raven wrote:
> > 
> > You've left out a lot of information, including: what terminal emulator
> > are you using?  What is $TERM?  What is your shell, and what terminfo
> > calls is it using?  Or are you using tput?
> 
> sorry about that. $TERM is xterm or linux.  using default term emu. for
> both (doubt this matters, but i'm uxterm and unicode_start for
> console).
> 
> terminfo stuff (straight from .zshrc):
> 
> #    set -A altchar "${(s..)terminfo[acsc]}"
> #    PR_SET_CHARSET="%{$terminfo[enacs]%}"
> #    PR_SHIFT_IN="%{$terminfo[smacs]%}"
> #    PR_SHIFT_OUT="%{$terminfo[rmacs]%}"
> 
> #    autoload colors zsh/terminfo
> #    if [[ "$terminfo[colors]" -ge 8 ]]; then
> #    colors
> #    fi
> #    for color in RED GREEN YELLOW BLUE MAGENTA CYAN WHITE; do
> #        eval PR_$color='%{$terminfo[bold]$fg[${(L)color}]%}'
> #        eval PR_LIGHT_$color='%{$fg[${(L)color}]%}'
> 
> #    PR_NO_COLOUR="%{$terminfo[sgr0]%}"
> 
> btw, the colours that were getting loaded were the non-bold colours 
> (darker in shade), whereas before it was the bright ones. oh and it also
> does this in screen, too. 
> 
> > It sounds like you're getting the value of some capability and echoing
> > it to the terminal.  And now it's a boolean where it used to be a
> > control sequence.
> 
> very strange... but now that you mention it, that's what seems to be going
> on. i find it odd that one minute it's functional, and the next tty i
> open i get that yes stuff.
> 
> i'll try out that stuff that thomas suggested.

It seems OK here using zsh 4.0.9-2...

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer



Information forwarded to debian-bugs-dist@lists.debian.org, Daniel Jacobowitz <ncurses-maint@debian.org>:
Bug#237629; Package ncurses-term. Full text and rfc822 format available.

Acknowledgement sent to simon@nuit.ca:
Extra info received and forwarded to list. Copy sent to Daniel Jacobowitz <ncurses-maint@debian.org>. Full text and rfc822 format available.

Message #35 received at 237629@bugs.debian.org (full text, mbox):

From: simon@nuit.ca
To: Thomas Dickey <dickey@his.com>
Cc: 237629@bugs.debian.org
Subject: Re: Bug#237629: ncurses-term: shell terminfo FUBAR with new shells instances
Date: Fri, 12 Mar 2004 16:49:37 +0000
[Message part 1 (text/plain, inline)]
Le Fri, Mar 12, 2004 at 09:38:26 -0500, Thomas Dickey a écrit:
> On Fri, 12 Mar 2004, simon raven wrote:
> 
> > Package: ncurses-term
> > Version: 5.4-2
> > Severity: grave
> > Tags: sid
> > Justification: causes non-serious data loss
> 
> There are several places to look.  Finding the part that is sending "yes"
> seems to be the most straightforward.  But it could be in screen, bash
> glibc or even ncurses.  Unless infocmp shows "yes" somewhere in its
> output, it is unlikely to be ncurses.  ltrace or strace might provide
> a clue.

infocmp:

#       Reconstructed via infocmp from file: /etc/terminfo/l/linux
linux|linux console,
        am, bce, ccc, eo, mir, msgr, xenl, xon,
        colors#8, it#8, ncv#18, pairs#64,
        acsc=+\020\,\021-\030.^Y0\333`\004a\261f\370g\361h\260i\316j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v\301w\302x\263y\363z\362{\343|\330}\234~\376,
        bel=^G, blink=\E[5m, bold=\E[1m, civis=\E[?25l\E[?1c,
        clear=\E[H\E[J, cnorm=\E[?25h\E[?0c, cr=^M,
        csr=\E[%i%p1%d;%p2%dr, cub1=^H, cud1=^J, cuf1=\E[C,
        cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, cvvis=\E[?25h\E[?8c,
        dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m, dl=\E[%p1%dM,
        dl1=\E[M, ech=\E[%p1%dX, ed=\E[J, el=\E[K, el1=\E[1K,
        flash=\E[?5h\E[?5l$<200/>, home=\E[H, hpa=\E[%i%p1%dG,
        ht=^I, hts=\EH, ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL,
        il1=\E[L, ind=^J,
        initc=\E]P%p1%x%p2%{256}%*%{1000}%/%02x%p3%{256}%*%{1000}%/%02x%p4%{256}%*%{1000}%/%02x,
        invis=\E[8m, kb2=\E[G, kbs=\177, kcbt=\E[Z, kcub1=\E[D,
        kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[3~,
        kend=\E[4~, kf1=\E[[A, kf10=\E[21~, kf11=\E[23~,
        kf12=\E[24~, kf13=\E[25~, kf14=\E[26~, kf15=\E[28~,
        kf16=\E[29~, kf17=\E[31~, kf18=\E[32~, kf19=\E[33~,
        kf2=\E[[B, kf20=\E[34~, kf3=\E[[C, kf4=\E[[D, kf5=\E[[E,
        kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~,
        khome=\E[1~, kich1=\E[2~, kmous=\E[M, knp=\E[6~, kpp=\E[5~,
        kspd=^Z, nel=^M^J, oc=\E]R, op=\E[39;49m, rc=\E8, rev=\E[7m,
        ri=\EM, rmacs=\E[10m, rmir=\E[4l, rmpch=\E[10m,
        rmso=\E[27m, rmul=\E[24m, rs1=\Ec\E]R, sc=\E7,
        setab=\E[4%p1%dm, setaf=\E[3%p1%dm,
        sgr=\E[0;10%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p5%t;2%;%?%p6%t;1%;%?%p7%t;8%;%?%p9%t;11%;m,
        sgr0=\E[0;10m, smacs=\E[11m, smir=\E[4h, smpch=\E[11m,
        smso=\E[7m, smul=\E[4m, tbc=\E[3g, u6=\E[%i%d;%dR,
        u7=\E[6n, u8=\E[?6c, u9=\E[c, vpa=\E[%i%p1%dd,


oh and the delete, home, end keys don't work as expected either, they just 
return a ~. 

strace:

capget(0x19980330, 0, {, , })           = 0
time(NULL)                              = 1079109960
ioctl(10, FIONREAD or FIONREAD, [0])    = 0
ioctl(10, TIOCSPGRP or TIOCSPGRP, [20268]) = 0
ioctl(10, TCGETS or TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(10, TCSETSW or TCSETSW, {B38400 opost isig -icanon -echo ...}) = 0
ioctl(10, TCGETS or TCGETS, {B38400 opost isig -icanon -echo ...}) = 0
write(10, "\r\33[0m\33[27m\33[24m\33[Jyes(simon@anub"..., 81) = 81
write(10, "\33[K\33[93G yesyes(04-03-12)yesyesy"..., 40) = 40
read(10, "l", 1)                        = 1




> -- 
> Thomas E. Dickey
> http://invisible-island.net
> ftp://invisible-island.net

-- 
@@-----------------------------------------------------------------@@
| ,''`.   http://www.debian.org/  | http://www.nuit.ca/             |
| : :' :  Debian GNU/Linux        | http://simonraven.nuit.ca/      |
| `. `'                           | PGP key fingerprint (new one):  |
|  `-                             | 7C49 FD9C 1054 7300 3B7B        |
|                                 | 8BF4 6A88 7AE2 711D F097        |
@@-----------------------------------------------------------------@@
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Daniel Jacobowitz <ncurses-maint@debian.org>:
Bug#237629; Package ncurses-term. Full text and rfc822 format available.

Acknowledgement sent to Thomas Dickey <dickey@his.com>:
Extra info received and forwarded to list. Copy sent to Daniel Jacobowitz <ncurses-maint@debian.org>. Full text and rfc822 format available.

Message #40 received at 237629@bugs.debian.org (full text, mbox):

From: Thomas Dickey <dickey@his.com>
To: simon@nuit.ca, 237629@bugs.debian.org
Cc: debian-bugs-dist@lists.debian.org, Daniel Jacobowitz <ncurses-maint@debian.org>
Subject: Re: Bug#237629: ncurses-term: shell terminfo FUBAR with new shells instances
Date: Fri, 12 Mar 2004 12:23:45 -0500 (EST)
On Fri, 12 Mar 2004 simon@nuit.ca wrote:

> oh and the delete, home, end keys don't work as expected either, they just
> return a ~.

that's a different issue (mismatch of $TERM vs terminal).

> strace:

strace of screen?

>
> capget(0x19980330, 0, {, , })           = 0

I don't recognize the capget call.  It's not used by ncurses.

> time(NULL)                              = 1079109960
> ioctl(10, FIONREAD or FIONREAD, [0])    = 0
> ioctl(10, TIOCSPGRP or TIOCSPGRP, [20268]) = 0
> ioctl(10, TCGETS or TCGETS, {B38400 opost isig icanon echo ...}) = 0
> ioctl(10, TCSETSW or TCSETSW, {B38400 opost isig -icanon -echo ...}) = 0
> ioctl(10, TCGETS or TCGETS, {B38400 opost isig -icanon -echo ...}) = 0
> write(10, "\r\33[0m\33[27m\33[24m\33[Jyes(simon@anub"..., 81) = 81
> write(10, "\33[K\33[93G yesyes(04-03-12)yesyesy"..., 40) = 40
> read(10, "l", 1)                        = 1

-- 
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net



Information forwarded to debian-bugs-dist@lists.debian.org, Daniel Jacobowitz <ncurses-maint@debian.org>:
Bug#237629; Package ncurses-term. Full text and rfc822 format available.

Acknowledgement sent to Daniel Jacobowitz <dan@debian.org>:
Extra info received and forwarded to list. Copy sent to Daniel Jacobowitz <ncurses-maint@debian.org>. Full text and rfc822 format available.

Message #45 received at 237629@bugs.debian.org (full text, mbox):

From: Daniel Jacobowitz <dan@debian.org>
To: Thomas Dickey <dickey@his.com>
Cc: simon@nuit.ca, 237629@bugs.debian.org
Subject: Re: Bug#237629: ncurses-term: shell terminfo FUBAR with new shells instances
Date: Fri, 12 Mar 2004 14:28:56 -0500
On Fri, Mar 12, 2004 at 12:23:45PM -0500, Thomas Dickey wrote:
> On Fri, 12 Mar 2004 simon@nuit.ca wrote:
> 
> > oh and the delete, home, end keys don't work as expected either, they just
> > return a ~.
> 
> that's a different issue (mismatch of $TERM vs terminal).
> 
> > strace:
> 
> strace of screen?

Of the shell it looks like.

> > capget(0x19980330, 0, {, , })           = 0
> 
> I don't recognize the capget call.  It's not used by ncurses.

No, zsh makes it.  It's a permissions thing (see libcap).

Simon, could I see enough of your .zshrc to actually reproduce your
prompt?  I want to see if I see the same behavior here.  What version
of zsh?

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer



Information forwarded to debian-bugs-dist@lists.debian.org, Daniel Jacobowitz <ncurses-maint@debian.org>:
Bug#237629; Package ncurses-term. Full text and rfc822 format available.

Acknowledgement sent to simon@nuit.ca:
Extra info received and forwarded to list. Copy sent to Daniel Jacobowitz <ncurses-maint@debian.org>. Full text and rfc822 format available.

Message #50 received at 237629@bugs.debian.org (full text, mbox):

From: simon@nuit.ca
To: Thomas Dickey <dickey@his.com>
Cc: 237629@bugs.debian.org, debian-bugs-dist@lists.debian.org, Daniel Jacobowitz <ncurses-maint@debian.org>
Subject: Re: Bug#237629: ncurses-term: shell terminfo FUBAR with new shells instances
Date: Fri, 12 Mar 2004 20:51:55 +0000
[Message part 1 (text/plain, inline)]
Le Fri, Mar 12, 2004 at 12:23:45 -0500, Thomas Dickey a écrit:
> On Fri, 12 Mar 2004 simon@nuit.ca wrote:
> 
> > oh and the delete, home, end keys don't work as expected either, they just
> > return a ~.
> 
> that's a different issue (mismatch of $TERM vs terminal).
> 
> > strace:
> 
> strace of screen?

duh sorry, strace of zsh

> 
> >
> > capget(0x19980330, 0, {, , })           = 0
> 
> I don't recognize the capget call.  It's not used by ncurses.
> 
> > time(NULL)                              = 1079109960
> > ioctl(10, FIONREAD or FIONREAD, [0])    = 0
> > ioctl(10, TIOCSPGRP or TIOCSPGRP, [20268]) = 0
> > ioctl(10, TCGETS or TCGETS, {B38400 opost isig icanon echo ...}) = 0
> > ioctl(10, TCSETSW or TCSETSW, {B38400 opost isig -icanon -echo ...}) = 0
> > ioctl(10, TCGETS or TCGETS, {B38400 opost isig -icanon -echo ...}) = 0
> > write(10, "\r\33[0m\33[27m\33[24m\33[Jyes(simon@anub"..., 81) = 81
> > write(10, "\33[K\33[93G yesyes(04-03-12)yesyesy"..., 40) = 40
> > read(10, "l", 1)                        = 1
> 
> -- 
> Thomas E. Dickey
> http://invisible-island.net
> ftp://invisible-island.net

-- 
@@-----------------------------------------------------------------@@
| ,''`.   http://www.debian.org/  | http://www.nuit.ca/             |
| : :' :  Debian GNU/Linux        | http://simonraven.nuit.ca/      |
| `. `'                           | PGP key fingerprint (new one):  |
|  `-                             | 7C49 FD9C 1054 7300 3B7B        |
|                                 | 8BF4 6A88 7AE2 711D F097        |
@@-----------------------------------------------------------------@@
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Daniel Jacobowitz <ncurses-maint@debian.org>:
Bug#237629; Package ncurses-term. Full text and rfc822 format available.

Acknowledgement sent to simon@nuit.ca:
Extra info received and forwarded to list. Copy sent to Daniel Jacobowitz <ncurses-maint@debian.org>. Full text and rfc822 format available.

Message #55 received at 237629@bugs.debian.org (full text, mbox):

From: simon@nuit.ca
To: Daniel Jacobowitz <dan@debian.org>
Cc: Thomas Dickey <dickey@his.com>, 237629@bugs.debian.org
Subject: Re: Bug#237629: ncurses-term: shell terminfo FUBAR with new shells instances
Date: Fri, 12 Mar 2004 20:56:59 +0000
[Message part 1 (text/plain, inline)]
Le Fri, Mar 12, 2004 at 14:28:56 -0500, Daniel Jacobowitz a écrit:
> On Fri, Mar 12, 2004 at 12:23:45PM -0500, Thomas Dickey wrote:
> > On Fri, 12 Mar 2004 simon@nuit.ca wrote:
> > 
> > > oh and the delete, home, end keys don't work as expected either, they just
> > > return a ~.
> > 
> > that's a different issue (mismatch of $TERM vs terminal).
> > 
> > > strace:
> > 
> > strace of screen?
> 
> Of the shell it looks like.
> 
> > > capget(0x19980330, 0, {, , })           = 0
> > 
> > I don't recognize the capget call.  It's not used by ncurses.
> 
> No, zsh makes it.  It's a permissions thing (see libcap).
> 
> Simon, could I see enough of your .zshrc to actually reproduce your
> prompt?  I want to see if I see the same behavior here.  What version
> of zsh?

ii  zsh                     4.1.1-9

sure, it's a little long though. i'm pasting it as is, so the offending
bits will be commented, and the working bits not.

function precmd {

    local TERMWIDTH
    (( TERMWIDTH = ${COLUMNS} - 1 ))

    ###
    # Truncate the path if it's too long.

    PR_FILLBAR=""
    PR_PWDLEN=""

    local promptsize=${#${(%):---(%n@%m:%l)---()--}}
    local pwdsize=${#${(%):-%~}}

    if [[ "$promptsize + $pwdsize" -gt $TERMWIDTH ]]; then
    ((PR_PWDLEN=$TERMWIDTH - $promptsize))
    else
    PR_FILLBAR="\${(l.(($TERMWIDTH - ($promptsize + $pwdsize)))..${PR_HBAR}.)}"
    fi

    ###
    # Get APM info.

    if which ibam > /dev/null; then
    PR_APM_RESULT=`ibam --percentbattery`
    elif which apm > /dev/null; then
    PR_APM_RESULT=`apm`
    fi

}

setopt extended_glob
preexec () {
    if [[ "$TERM" == "screen" ]]; then
    local CMD=${1[(wr)^(*=*|sudo|-*)]}
    echo -ne "\ek$CMD\e\\"
    fi
}

setprompt () {

    ###
    # Need this so the prompt will work.

    setopt prompt_subst

    ###
    # See if we can use colors.

#    autoload colors zsh/terminfo
#    if [[ "$terminfo[colors]" -ge 8 ]]; then
#    colors
#    fi
#    for color in RED GREEN YELLOW BLUE MAGENTA CYAN WHITE; do
#        eval PR_$color='%{$terminfo[bold]$fg[${(L)color}]%}'
#        eval PR_LIGHT_$color='%{$fg[${(L)color}]%}'
#        (( count = $count + 1 ))
#    done
#    PR_NO_COLOUR="%{$terminfo[sgr0]%}"

    ###
    # See if we can use extended characters to look nicer.

#    typeset -A altchar
#    set -A altchar "${(s..)terminfo[acsc]}"
#    PR_SET_CHARSET="%{$terminfo[enacs]%}"
#    PR_SHIFT_IN="%{$terminfo[smacs]%}"
#    PR_SHIFT_OUT="%{$terminfo[rmacs]%}"
#    PR_HBAR=${altchar[q]:--}
#    PR_ULCORNER=${altchar[l]:--}
#    PR_LLCORNER=${altchar[m]:--}
#    PR_LRCORNER=${altchar[j]:--}
#    PR_URCORNER=${altchar[k]:--}

    ###
    # Decide if we need to set titlebar text.

    case $TERM in
    xterm*)
        PR_TITLEBAR=$'%{\e]0;%(!.-=*[ROOT]*=- | .)%n@%m:%~ | ${COLUMNS}x${LINES} | %y\a%}'
    ;;
    uxterm*)
        PR_TITLEBAR=$'%{\e]0;%(!.-=*[ROOT]*=- | .)%n@%m:%~ | ${COLUMNS}x${LINES} | %y\a%}'
    ;;
    screen)
        PR_TITLEBAR=$'%{\e_screen \005 (\005t) | %(!.-=[ROOT]=- | .)%n@%m:%~ | ${COLUMNS}x${LINES} | %y\e\\%}'
    ;;
    *)  
        PR_TITLEBAR=''
    ;;
    esac

    ###
    # Decide whether to set a screen title
    if [[ "$TERM" == "screen" ]]; then
    PR_STITLE=$'%{\ekzsh\e\\%}'
    else
    PR_STITLE=''
    fi

    ###
    # APM detection

#    if which ibam > /dev/null; then
#   PR_APM='$PR_RED${${PR_APM_RESULT[(f)1]}[(w)-2]}%%(${${PR_APM_RESULT[(f)3]}[(w) - 1 ]})$PR_LIGHT_BLUE:'
#    elif which apm > /dev/null; then
#    PR_APM='$PR_RED${PR_APM_RESULT[(w)5,(w)6]/\% /%%}$PR_LIGHT_BLUE:'
#    else
#    PR_APM=''
#    fi

}
###
# Finally, the prompt.

    PS1='$PR_STITLE${(e)PR_TITLEBAR}\
(\
%(!.%SROOT%s.%n)@%m:%l\
)${(e)}(\
%$PR_PWDLEN<...<%~%<<\
)\

(\
%(?..%?:)\
${(e)PR_APM}%D{%H:%M}\
:%(!..)%#)\
\
 '

#      PS1='$PR_STITLE${(e)PR_TITLEBAR}\
#$PR_BLUE$PR_SHIFT_OUT(\
#$PR_GREEN%(!.%SROOT%s.%n)$PR_GREEN@%m:%l\
#$PR_BLUE)${(e)}$PR_BLUE$PR_SHIFT_OUT(\
#$PR_MAGENTA%$PR_PWDLEN<...<%~%<<\
#$PR_BLUE)$PR_SHIFT_IN$PR_SHIFT_OUT\

#$PR_CYAN$PR_SHIFT_IN$PR_BLUE$PR_SHIFT_OUT(\
#%(?..$PR_LIGHT_RED%?$PR_BLUE:)\
#${(e)PR_APM}$PR_YELLOW%D{%H:%M}\
#$PR_LIGHT_BLUE:%(!.$PR_RED.$PR_WHITE)%#$PR_BLUE)$PR_SHIFT_IN$PR_SHIFT_OUT\
#$PR_CYAN$PR_SHIFT_IN$PR_SHIFT_OUT\
#$PR_NO_COLOUR '

#    RPROMPT=' $PR_CYAN$PR_SHIFT_IN$PR_BLUE$PR_SHIFT_OUT\
#($PR_YELLOW%D$PR_BLUE)$PR_SHIFT_IN$PR_CYAN$PR_SHIFT_OUT$PR_NO_COLOUR'

    RPROMPT=' \
(%D)'

    PS2='\
(\
%_)\
 '

#    PS2='$PR_CYAN$PR_SHIFT_IN$PR_SHIFT_OUT\
#$PR_BLUE$PR_SHIFT_IN$PR_SHIFT_OUT(\
#$PR_LIGHT_GREEN%_$PR_BLUE)$PR_SHIFT_IN$PR_SHIFT_OUT\
#$PR_CYAN$PR_SHIFT_IN$PR_SHIFT_OUT$PR_NO_COLOUR '


setprompt




> -- 
> Daniel Jacobowitz
> MontaVista Software                         Debian GNU/Linux Developer

-- 
@@-----------------------------------------------------------------@@
| ,''`.   http://www.debian.org/  | http://www.nuit.ca/             |
| : :' :  Debian GNU/Linux        | http://simonraven.nuit.ca/      |
| `. `'                           | PGP key fingerprint (new one):  |
|  `-                             | 7C49 FD9C 1054 7300 3B7B        |
|                                 | 8BF4 6A88 7AE2 711D F097        |
@@-----------------------------------------------------------------@@
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Daniel Jacobowitz <ncurses-maint@debian.org>:
Bug#237629; Package ncurses-term. Full text and rfc822 format available.

Acknowledgement sent to Daniel Jacobowitz <dan@debian.org>:
Extra info received and forwarded to list. Copy sent to Daniel Jacobowitz <ncurses-maint@debian.org>. Full text and rfc822 format available.

Message #60 received at 237629@bugs.debian.org (full text, mbox):

From: Daniel Jacobowitz <dan@debian.org>
To: simon@nuit.ca
Cc: Thomas Dickey <dickey@his.com>, 237629@bugs.debian.org
Subject: Re: Bug#237629: ncurses-term: shell terminfo FUBAR with new shells instances
Date: Fri, 12 Mar 2004 16:05:22 -0500
On Fri, Mar 12, 2004 at 08:56:59PM +0000, simon@nuit.ca wrote:
> Le Fri, Mar 12, 2004 at 14:28:56 -0500, Daniel Jacobowitz a ?crit:
> > On Fri, Mar 12, 2004 at 12:23:45PM -0500, Thomas Dickey wrote:
> > > On Fri, 12 Mar 2004 simon@nuit.ca wrote:
> > > 
> > > > oh and the delete, home, end keys don't work as expected either, they just
> > > > return a ~.
> > > 
> > > that's a different issue (mismatch of $TERM vs terminal).
> > > 
> > > > strace:
> > > 
> > > strace of screen?
> > 
> > Of the shell it looks like.
> > 
> > > > capget(0x19980330, 0, {, , })           = 0
> > > 
> > > I don't recognize the capget call.  It's not used by ncurses.
> > 
> > No, zsh makes it.  It's a permissions thing (see libcap).
> > 
> > Simon, could I see enough of your .zshrc to actually reproduce your
> > prompt?  I want to see if I see the same behavior here.  What version
> > of zsh?
> 
> ii  zsh                     4.1.1-9
> 
> sure, it's a little long though. i'm pasting it as is, so the offending
> bits will be commented, and the working bits not.

I uncommented the "broken" bits and it works fine here:
drow@nevyn:~% source qzsh
setprompt:25: bad set of key/value pairs for associative array
(drow@nevyn:pts/20)(~)
(1:16:03:%)                     (04-03-12)

Not sure about the warning, I don't get it if I run the same command by
hand.  Full colors and all.

You get to figure out exactly what produces yes on your system.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer



Information forwarded to debian-bugs-dist@lists.debian.org, Daniel Jacobowitz <ncurses-maint@debian.org>:
Bug#237629; Package ncurses-term. Full text and rfc822 format available.

Acknowledgement sent to simon@nuit.ca:
Extra info received and forwarded to list. Copy sent to Daniel Jacobowitz <ncurses-maint@debian.org>. Full text and rfc822 format available.

Message #65 received at 237629@bugs.debian.org (full text, mbox):

From: simon@nuit.ca
To: Daniel Jacobowitz <dan@debian.org>
Cc: Thomas Dickey <dickey@his.com>, 237629@bugs.debian.org
Subject: Re: Bug#237629: ncurses-term: shell terminfo FUBAR with new shells instances
Date: Sat, 13 Mar 2004 08:12:00 +0000
[Message part 1 (text/plain, inline)]
Le Fri, Mar 12, 2004 at 16:05:22 -0500, Daniel Jacobowitz a écrit:
 
> I uncommented the "broken" bits and it works fine here:
> drow@nevyn:~% source qzsh
> setprompt:25: bad set of key/value pairs for associative array
> (drow@nevyn:pts/20)(~)
> (1:16:03:%)                     (04-03-12)
> 
> Not sure about the warning, I don't get it if I run the same command by
> hand.  Full colors and all.
> 
> You get to figure out exactly what produces yes on your system.

ooo, fun :). have any thoughts maybe, say, some .zlogin thing, or other
shell env.?

if not, well, wish me luck :).

simon

> -- 
> Daniel Jacobowitz
> MontaVista Software                         Debian GNU/Linux Developer

-- 
@@-----------------------------------------------------------------@@
| ,''`.   http://www.debian.org/  | http://www.nuit.ca/             |
| : :' :  Debian GNU/Linux        | http://simonraven.nuit.ca/      |
| `. `'                           | PGP key fingerprint (new one):  |
|  `-                             | 7C49 FD9C 1054 7300 3B7B        |
|                                 | 8BF4 6A88 7AE2 711D F097        |
@@-----------------------------------------------------------------@@
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Daniel Jacobowitz <ncurses-maint@debian.org>:
Bug#237629; Package ncurses-term. Full text and rfc822 format available.

Acknowledgement sent to Thomas Dickey <dickey@his.com>:
Extra info received and forwarded to list. Copy sent to Daniel Jacobowitz <ncurses-maint@debian.org>. Full text and rfc822 format available.

Message #70 received at 237629@bugs.debian.org (full text, mbox):

From: Thomas Dickey <dickey@his.com>
To: simon@nuit.ca
Cc: 237629@bugs.debian.org
Subject: Re: Bug#237629: ncurses-term: shell terminfo FUBAR with new shells instances
Date: Sat, 13 Mar 2004 07:25:50 -0500 (EST)
On Sat, 13 Mar 2004 simon@nuit.ca wrote:

> Le Fri, Mar 12, 2004 at 16:05:22 -0500, Daniel Jacobowitz a écrit:
>
> > I uncommented the "broken" bits and it works fine here:
> > drow@nevyn:~% source qzsh
> > setprompt:25: bad set of key/value pairs for associative array
> > (drow@nevyn:pts/20)(~)
> > (1:16:03:%)                     (04-03-12)
> >
> > Not sure about the warning, I don't get it if I run the same command by
> > hand.  Full colors and all.
> >
> > You get to figure out exactly what produces yes on your system.
>
> ooo, fun :). have any thoughts maybe, say, some .zlogin thing, or other
> shell env.?

no.  But strace can follow subprocesses (not always, but worth checking).

-- 
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net



Information forwarded to debian-bugs-dist@lists.debian.org, Daniel Jacobowitz <ncurses-maint@debian.org>:
Bug#237629; Package ncurses-term. Full text and rfc822 format available.

Acknowledgement sent to simon@nuit.ca:
Extra info received and forwarded to list. Copy sent to Daniel Jacobowitz <ncurses-maint@debian.org>. Full text and rfc822 format available.

Message #75 received at 237629@bugs.debian.org (full text, mbox):

From: simon@nuit.ca
To: Daniel Jacobowitz <dan@debian.org>
Cc: 237629@bugs.debian.org
Subject: Re: Bug#237629: ncurses-term: shell terminfo FUBAR with new shells instances
Date: Wed, 17 Mar 2004 06:16:02 +0000
[Message part 1 (text/plain, inline)]
Le Fri, Mar 12, 2004 at 11:24:03 -0500, Daniel Jacobowitz a écrit:

yes, i figured out what the problem is. i tried running various shells,
using setting to clear out crap read from rc files, and zsh seems to be
misparsing terminfo data. i just redid almost my whole terminfo db, and
it seems ok, no file corruption. but if i run a 'normal' zsh login or
zsh -f -l, it gets mangled - my home/end keys don't work, and i still
get that tangled mess of 'yes'es everywhere. i'll try manually replacing
all the zsh data, see what happens. if that doesn't work, i'll try a
local build.

thanks for all of your time.

simon

> -- 
> Daniel Jacobowitz
> MontaVista Software                         Debian GNU/Linux Developer

-- 
@@-----------------------------------------------------------------@@
| ,''`.   http://www.debian.org/  | http://www.nuit.ca/             |
| : :' :  Debian GNU/Linux        | http://simonraven.nuit.ca/      |
| `. `'                           | PGP key fingerprint (new one):  |
|  `-                             | 7C49 FD9C 1054 7300 3B7B        |
|                                 | 8BF4 6A88 7AE2 711D F097        |
@@-----------------------------------------------------------------@@
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Daniel Jacobowitz <ncurses-maint@debian.org>:
Bug#237629; Package ncurses-term. Full text and rfc822 format available.

Acknowledgement sent to Nathanael Nerode <neroden@twcny.rr.com>:
Extra info received and forwarded to list. Copy sent to Daniel Jacobowitz <ncurses-maint@debian.org>. Full text and rfc822 format available.

Message #80 received at 237629@bugs.debian.org (full text, mbox):

From: Nathanael Nerode <neroden@twcny.rr.com>
To: 237629@bugs.debian.org
Subject: Bug status report?
Date: Sun, 21 Mar 2004 03:19:28 -0500
So, this bug is about to hold up hundreds of packages from getting into 
'sarge'.  Status?  Is it downgradable, fixable, what?  How can we help?

Reply to bug trail please.



Information forwarded to debian-bugs-dist@lists.debian.org, Daniel Jacobowitz <ncurses-maint@debian.org>:
Bug#237629; Package ncurses-term. Full text and rfc822 format available.

Acknowledgement sent to Thomas Dickey <dickey@his.com>:
Extra info received and forwarded to list. Copy sent to Daniel Jacobowitz <ncurses-maint@debian.org>. Full text and rfc822 format available.

Message #85 received at 237629@bugs.debian.org (full text, mbox):

From: Thomas Dickey <dickey@his.com>
To: Nathanael Nerode <neroden@twcny.rr.com>, 237629@bugs.debian.org
Subject: Re: Bug#237629: Bug status report?
Date: Sun, 21 Mar 2004 06:33:03 -0500 (EST)
On Sun, 21 Mar 2004, Nathanael Nerode wrote:

> So, this bug is about to hold up hundreds of packages from getting into
> 'sarge'.  Status?  Is it downgradable, fixable, what?  How can we help?
>
> Reply to bug trail please.

The trail on this one points to either a problem in the user's zsh
configuration files or to some incompatibility in zsh which is made
visible here.  Nothing to do with ncurses.

-- 
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net



Information forwarded to debian-bugs-dist@lists.debian.org, Daniel Jacobowitz <ncurses-maint@debian.org>:
Bug#237629; Package ncurses-term. Full text and rfc822 format available.

Acknowledgement sent to Jordi Mallach <jordi@debian.org>:
Extra info received and forwarded to list. Copy sent to Daniel Jacobowitz <ncurses-maint@debian.org>. Full text and rfc822 format available.

Message #90 received at 237629@bugs.debian.org (full text, mbox):

From: Jordi Mallach <jordi@debian.org>
To: 237629@bugs.debian.org, control@bugs.debian.org
Subject: downgrading
Date: Mon, 22 Mar 2004 01:15:47 +0100
[Message part 1 (text/plain, inline)]
severity 237629 important
thanks

Downgrading so this doesn't affect testing anymore.

Jordi
-- 
Jordi Mallach Pérez  --  Debian developer     http://www.debian.org/
jordi@sindominio.net     jordi@debian.org     http://www.sindominio.net/
GnuPG public key information available at http://oskuro.net/~jordi/
[signature.asc (application/pgp-signature, inline)]

Severity set to `important'. Request was from Jordi Mallach <jordi@debian.org> to control@bugs.debian.org. Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Daniel Jacobowitz <ncurses-maint@debian.org>:
Bug#237629; Package ncurses-term. Full text and rfc822 format available.

Acknowledgement sent to Nathanael Nerode <neroden@twcny.rr.com>:
Extra info received and forwarded to list. Copy sent to Daniel Jacobowitz <ncurses-maint@debian.org>. Full text and rfc822 format available.

Message #97 received at 237629@bugs.debian.org (full text, mbox):

From: Nathanael Nerode <neroden@twcny.rr.com>
To: 237629@bugs.debian.org, control@bugs.debian.org
Subject: Making this 'important'.
Date: Sun, 21 Mar 2004 19:31:31 -0500
severity 237629 important
thanks

>The trail on this one points to either a problem in the user's zsh
>configuration files or to some incompatibility in zsh which is made
>visible here.  Nothing to do with ncurses.

Okay.  I'm unilaterally downgrading this, then, so that new ncurses can get 
into 'sarge' tomorrow; it's stalling well over a hundred packages, including
xfree86, and if this isn't really an ncurses problem, it seems unreasonable to 
let it do that.

--Nathanael



Information forwarded to debian-bugs-dist@lists.debian.org, Daniel Jacobowitz <ncurses-maint@debian.org>:
Bug#237629; Package ncurses-term. Full text and rfc822 format available.

Acknowledgement sent to Henning Makholm <henning@makholm.net>:
Extra info received and forwarded to list. Copy sent to Daniel Jacobowitz <ncurses-maint@debian.org>. Full text and rfc822 format available.

Message #102 received at 237629@bugs.debian.org (full text, mbox):

From: Henning Makholm <henning@makholm.net>
To: 237629@bugs.debian.org
Cc: simon raven <simon@nuit.ca>
Subject: Bug 237629: zsh/ncurses interaction on ppc
Date: Mon, 22 Mar 2004 00:33:07 +0000
I think this is a char signedness problem in libncurses5, and actually
the same bug as #237870 and #238718.

The code in zsh that produces "yes" is

    if (((num = tigetnum(name)) != -1) && (num != -2)) {
        pm->u.val = num;
        pm->flags |= PM_INTEGER;
        pm->sets.ifn = NULL;
        pm->gets.ifn = intgetfn;
    }
    else if ((num = tigetflag(name)) != -1) {
        pm->u.str = num ? dupstring("yes") : dupstring("no");
        pm->flags |= PM_SCALAR;
        pm->sets.cfn = NULL;
        pm->gets.cfn = strgetfn;
    }
    else if ((tistr = (char *)tigetstr(name)) != NULL && tistr != (char *)-1)
    {
      ...

tigetflag is documented to return -1 for non-boolean capabilities, and
indeed does on my i386 system (libncurses5 5.4-2). However, what the
source for ncurses actually says is (ncurses/tinfo/lib_ti.c):

NCURSES_EXPORT(int)
tigetflag(NCURSES_CONST char *str)
{
    /* snip: attempt to find the capability. Otherwise: */

    returnCode(ABSENT_BOOLEAN);
}

where ABSENT_BOOLEAN is defined in include/tic.h as

#define ABSENT_BOOLEAN          (char)(-1)      /* 255 */

On a system where char is signed, the (-1) survives being cast to char
and then (implicitly) back to int for the tigetflag return value.
However, if char is unsigned (which it is on powerpc!), tigetflag()
will actually return 255, which the zsh code above interprets as true.

The "(char)" cast was added between 5.3.20030719-5 and 5.4-2, which is
consistent with the problem showing up just days after the 5.4 was
uploaded to unstable.



I have not tried my hypothesis in practice, since I lack access to a
powerpc system with ncurses-dev installed. Simon, could you try to
compile and run the following program:

  #include <stdio.h>
  #include <curses.h>
  main(int argc,char **argv) {
    int i ;
    setupterm(NULL,1,NULL);
    i = (char) tigetflag("jabberwocky");
    printf("tigetflag returns %d\n",i);
  }

If it reports 255 instead of -1, we have the culprit. Please cc me on the
result, if any.

-- 
Henning Makholm                         "Al lykken er i ét ord: Overvægtig!"



Severity set to `important'. Request was from Nathanael Nerode <neroden@twcny.rr.com> to control@bugs.debian.org. Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Daniel Jacobowitz <ncurses-maint@debian.org>:
Bug#237629; Package ncurses-term. Full text and rfc822 format available.

Acknowledgement sent to Thomas Dickey <dickey@his.com>:
Extra info received and forwarded to list. Copy sent to Daniel Jacobowitz <ncurses-maint@debian.org>. Full text and rfc822 format available.

Message #109 received at 237629@bugs.debian.org (full text, mbox):

From: Thomas Dickey <dickey@his.com>
To: Henning Makholm <henning@makholm.net>, 237629@bugs.debian.org
Cc: simon raven <simon@nuit.ca>, debian-bugs-dist@lists.debian.org, Daniel Jacobowitz <ncurses-maint@debian.org>
Subject: Re: Bug#237629: Bug 237629: zsh/ncurses interaction on ppc
Date: Sun, 21 Mar 2004 20:35:08 -0500 (EST)
On Mon, 22 Mar 2004, Henning Makholm wrote:

> The "(char)" cast was added between 5.3.20030719-5 and 5.4-2, which is
> consistent with the problem showing up just days after the 5.4 was
> uploaded to unstable.

that would be this change

20030802
	+ modify casts used for ABSENT_BOOLEAN and CANCELLED_BOOLEAN (report by
	  Daniel Jacobowitz).

(not recent, but iirc, Solaris uses signed chars and no one using that
platform commented on this ;-)

-- 
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net



Information forwarded to debian-bugs-dist@lists.debian.org, Daniel Jacobowitz <ncurses-maint@debian.org>:
Bug#237629; Package ncurses-term. Full text and rfc822 format available.

Acknowledgement sent to Henning Makholm <henning@makholm.net>:
Extra info received and forwarded to list. Copy sent to Daniel Jacobowitz <ncurses-maint@debian.org>. Full text and rfc822 format available.

Message #114 received at 237629@bugs.debian.org (full text, mbox):

From: Henning Makholm <henning@makholm.net>
To: 237629@bugs.debian.org
Subject: Re: Bug#237629: zsh/ncurses interaction on ppc
Date: Mon, 22 Mar 2004 02:02:26 +0000
Scripsit Thomas Dickey
> On Mon, 22 Mar 2004, Henning Makholm wrote:

> > The "(char)" cast was added between 5.3.20030719-5 and 5.4-2, which is
> > consistent with the problem showing up just days after the 5.4 was
> > uploaded to unstable.

> that would be this change

> 20030802
> 	+ modify casts used for ABSENT_BOOLEAN and CANCELLED_BOOLEAN (report by
> 	  Daniel Jacobowitz).

Yes, I noticed this in the NEWS file. It suggests that there may be an
earlier Debian bug report related to the problem, but I couldn't
easily find one that looked relevant. Do either of you (Daniel, Thomas)
have records that document what the cast was supposed to fix?

It is fairly strange, given that all of the code in ncurses that
mentions ABSENT_BOOLEAN handles it as an int rather than a char.

> (not recent, but iirc, Solaris uses signed chars and no one using that
> platform commented on this ;-)

I imagine that zsh is fairly unique in depending on tigetflag()
returning -1 (as documented) for string capabilities.

Perhaps Solaris has fewer zsh users, or perhaps zsh binaries on
Solaris are usually linked against Sun's libcurses rather than
ncurses? Or people who run zsh on Solaris use the termcap interface
instead?

(The problem may also be especially visible because Debian's default
rc file for zsh uses the vulnerable terminfo interface to set up
function-key translations. This seems to be a Debian addition not
present in the vanilla zsh source).

-- 
Henning Makholm          "Ambiguous cases are defined as those for which the
                       compiler being used finds a legitimate interpretation
                   which is different from that which the user had in mind."



Information forwarded to debian-bugs-dist@lists.debian.org, Daniel Jacobowitz <ncurses-maint@debian.org>:
Bug#237629; Package ncurses-term. Full text and rfc822 format available.

Acknowledgement sent to Henning Makholm <henning@makholm.net>:
Extra info received and forwarded to list. Copy sent to Daniel Jacobowitz <ncurses-maint@debian.org>. Full text and rfc822 format available.

Message #119 received at 237629@bugs.debian.org (full text, mbox):

From: Henning Makholm <henning@makholm.net>
To: Nathanael Nerode <neroden@twcny.rr.com>
Cc: 237629@bugs.debian.org
Subject: Re: Making this 'important'.
Date: Mon, 22 Mar 2004 02:19:11 +0000
Nathanael Nerode writes:

> severity 237629 important

>> Nothing to do with ncurses.

> Okay.  I'm unilaterally downgrading this, then, so that new ncurses
> can get into 'sarge' tomorrow; it's stalling well over a hundred
> packages, including xfree86, and if this isn't really an ncurses
> problem, it seems unreasonable to let it do that.

It is a genuine ncurses problem all right - the return value from
tigetflag() is off-spec on powerpc; see my analysis in the bug logs.

Which is more important: Keeping zsh keybindings (etc) from breaking
on testing/powerpc, or getting xfree86 4.3 into testing? Personally
I'd favor the latter, and objectively "important" is probably the
right severity for this bug: It has a major effect on usability,
but does not render it completely unusable for everyone, except
zsh users.

-- 
Henning Makholm              "Det är alldeles för ansvarsfullt att skaffa en
                            flickvän. Det är ju som att skaffa en hundvalp."



Information forwarded to debian-bugs-dist@lists.debian.org, Daniel Jacobowitz <ncurses-maint@debian.org>:
Bug#237629; Package ncurses-term. Full text and rfc822 format available.

Acknowledgement sent to simon@nuit.ca:
Extra info received and forwarded to list. Copy sent to Daniel Jacobowitz <ncurses-maint@debian.org>. Full text and rfc822 format available.

Message #124 received at 237629@bugs.debian.org (full text, mbox):

From: simon@nuit.ca
To: Henning Makholm <henning@makholm.net>
Cc: 237629@bugs.debian.org
Subject: Re: Bug 237629: zsh/ncurses interaction on ppc
Date: Mon, 22 Mar 2004 02:24:05 +0000
[Message part 1 (text/plain, inline)]
Le Mon, Mar 22, 2004 at 00:33:07 +0000, Henning Makholm a �crit:

[big snip]

> The "(char)" cast was added between 5.3.20030719-5 and 5.4-2, which is
> consistent with the problem showing up just days after the 5.4 was
> uploaded to unstable.
> 
> 
> 
> I have not tried my hypothesis in practice, since I lack access to a
> powerpc system with ncurses-dev installed. Simon, could you try to
> compile and run the following program:

try is the operative word here ;):

gcc -fPIC -DPIC -o jabberwocky jabberwocky.c
/tmp/cc8KbfGj.o(.text+0x44): In function `main':
: undefined reference to `setupterm'
/tmp/cc8KbfGj.o(.text+0x4c): In function `main':
: undefined reference to `tigetflag'
collect2: ld returned 1 exit status

and with -I/usr/include added too. i currently have the 5.3.20030719-5
installed, and not 5.4. would that matter?

oh, and i tried without -*PIC, same error.

>   #include <stdio.h>
>   #include <curses.h>
>   main(int argc,char **argv) {
>     int i ;
>     setupterm(NULL,1,NULL);
>     i = (char) tigetflag("jabberwocky");
>     printf("tigetflag returns %d\n",i);
>   }
> 
> If it reports 255 instead of -1, we have the culprit. Please cc me on the
> result, if any.
 
> -- 
> Henning Makholm                         "Al lykken er i ét ord: Overvægtig!"

-- 
@@-----------------------------------------------------------------@@
| ,''`.   http://www.debian.org/  | http://www.nuit.ca/             |
| : :' :  Debian GNU/Linux        | http://simonraven.nuit.ca/      |
| `. `'                           | PGP key fingerprint (new one):  |
|  `-                             | 7C49 FD9C 1054 7300 3B7B        |
|                                 | 8BF4 6A88 7AE2 711D F097        |
@@-----------------------------------------------------------------@@
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Daniel Jacobowitz <ncurses-maint@debian.org>:
Bug#237629; Package ncurses-term. Full text and rfc822 format available.

Acknowledgement sent to Thomas Dickey <dickey@his.com>:
Extra info received and forwarded to list. Copy sent to Daniel Jacobowitz <ncurses-maint@debian.org>. Full text and rfc822 format available.

Message #129 received at 237629@bugs.debian.org (full text, mbox):

From: Thomas Dickey <dickey@his.com>
To: Henning Makholm <henning@makholm.net>, 237629@bugs.debian.org
Subject: Re: Bug#237629: zsh/ncurses interaction on ppc
Date: Mon, 22 Mar 2004 05:16:42 -0500 (EST)
On Mon, 22 Mar 2004, Henning Makholm wrote:

> Scripsit Thomas Dickey
> > On Mon, 22 Mar 2004, Henning Makholm wrote:
>
> > > The "(char)" cast was added between 5.3.20030719-5 and 5.4-2, which is
> > > consistent with the problem showing up just days after the 5.4 was
> > > uploaded to unstable.
>
> > that would be this change
>
> > 20030802
> > 	+ modify casts used for ABSENT_BOOLEAN and CANCELLED_BOOLEAN (report by
> > 	  Daniel Jacobowitz).
>
> Yes, I noticed this in the NEWS file. It suggests that there may be an
> earlier Debian bug report related to the problem, but I couldn't
> easily find one that looked relevant. Do either of you (Daniel, Thomas)
> have records that document what the cast was supposed to fix?

yes (my email at home).  The gist of it was that I noticed that the Debian
package made a fix in that area, and I made an analogous change (probably
breaking it).

Reverting just the definition of that symbol (removing the cast) should
work.

> It is fairly strange, given that all of the code in ncurses that
> mentions ABSENT_BOOLEAN handles it as an int rather than a char.

yes, but booleans are stored in a char.

-- 
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net



Information forwarded to debian-bugs-dist@lists.debian.org, Daniel Jacobowitz <ncurses-maint@debian.org>:
Bug#237629; Package ncurses-term. Full text and rfc822 format available.

Acknowledgement sent to Henning Makholm <henning@makholm.net>:
Extra info received and forwarded to list. Copy sent to Daniel Jacobowitz <ncurses-maint@debian.org>. Full text and rfc822 format available.

Message #134 received at 237629@bugs.debian.org (full text, mbox):

From: Henning Makholm <henning@makholm.net>
To: simon@nuit.ca
Cc: 237629@bugs.debian.org
Subject: Re: Bug 237629: zsh/ncurses interaction on ppc
Date: Mon, 22 Mar 2004 10:25:34 +0000
Scripsit simon@nuit.ca
> Le Mon, Mar 22, 2004 at 00:33:07 +0000, Henning Makholm a ?crit:

> > I have not tried my hypothesis in practice, since I lack access to a
> > powerpc system with ncurses-dev installed. Simon, could you try to
> > compile and run the following program:

> try is the operative word here ;):

> gcc -fPIC -DPIC -o jabberwocky jabberwocky.c
> /tmp/cc8KbfGj.o(.text+0x44): In function `main':
> : undefined reference to `setupterm'

Oops, sorry for being too terse. It needs to be linked with ncurses;
the gcc invocation that worked for me on i386 is

  gcc foo.c -lncurses

> i currently have the 5.3.20030719-5 installed, and not 5.4. would
> that matter?


It shouldn't matter for your linker errors, but since we're trying to
confirm a bug in 5.4, the interesting *output* is what you get when
you run it in 5.4 installed.

-- 
Henning Makholm                        "I ... I have to return some videos."



Information forwarded to debian-bugs-dist@lists.debian.org, Daniel Jacobowitz <ncurses-maint@debian.org>:
Bug#237629; Package ncurses-term. Full text and rfc822 format available.

Acknowledgement sent to Thomas Dickey <dickey@his.com>:
Extra info received and forwarded to list. Copy sent to Daniel Jacobowitz <ncurses-maint@debian.org>. Full text and rfc822 format available.

Message #139 received at 237629@bugs.debian.org (full text, mbox):

From: Thomas Dickey <dickey@his.com>
To: 237629@bugs.debian.org
Cc: Henning Makholm <henning@makholm.net>
Subject: Re: Bug#237629: zsh/ncurses interaction on ppc
Date: Mon, 22 Mar 2004 05:49:54 -0500 (EST)
On Mon, 22 Mar 2004, Thomas Dickey wrote:

> yes (my email at home).  The gist of it was that I noticed that the Debian
> package made a fix in that area, and I made an analogous change (probably
> breaking it).
>
> Reverting just the definition of that symbol (removing the cast) should
> work.

Thinking a little more - I seem to recall that the difference between my
change and Daniel's was that his package used a cast in the C code to
fix a problem (not clear whether it was a compiler-warning or a
sign-extension bug).  The ftp for that version (20030719) isn't responding
right now, I'd check that otherwise:

http://ftp.debian.org/debian/pool/main/n/ncurses/ncurses_5.3.20030719-5.diff.gz

-- 
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net



Information forwarded to debian-bugs-dist@lists.debian.org, Daniel Jacobowitz <ncurses-maint@debian.org>:
Bug#237629; Package ncurses-term. Full text and rfc822 format available.

Acknowledgement sent to Henning Makholm <henning@makholm.net>:
Extra info received and forwarded to list. Copy sent to Daniel Jacobowitz <ncurses-maint@debian.org>. Full text and rfc822 format available.

Message #144 received at 237629@bugs.debian.org (full text, mbox):

From: Henning Makholm <henning@makholm.net>
To: Thomas Dickey <dickey@his.com>
Cc: 237629@bugs.debian.org
Subject: Re: Bug#237629: zsh/ncurses interaction on ppc
Date: Mon, 22 Mar 2004 11:00:28 +0000
Scripsit Thomas Dickey

> The ftp for that version (20030719) isn't responding right now, I'd
> check that otherwise:

> http://ftp.debian.org/debian/pool/main/n/ncurses/ncurses_5.3.20030719-5.diff.gz

ftp.dk.debian.org had it; the most relevant chunks seem to be

--- ncurses-5.3.20030719.orig/include/MKterm.h.awk.in
+++ ncurses-5.3.20030719/include/MKterm.h.awk.in
@@ -199,7 +199,7 @@
                        print  "typedef struct termtype {       /* in-core form
of terminfo data */"
                        print  "    char  *term_names;          /* str_table off
set of term names */"
                        print  "    char  *str_table;           /* pointer to st
ring table */"
-                       print  "    char  *Booleans;            /* array of bool
ean values */"
+                       print  "    signed char  *Booleans;     /* array of bool
ean values */"
                        print  "    short *Numbers;             /* array of inte
ger values */"
                        print  "    char  **Strings;            /* array of stri
ng offsets */"
                        print  ""
--- ncurses-5.3.20030719.orig/include/tic.h
+++ ncurses-5.3.20030719/include/tic.h
@@ -220,7 +220,7 @@
 #define ABSENT_STRING          (char *)0

 /* out-of-band values for representing cancels */
-#define CANCELLED_BOOLEAN      (char)(-2)      /* 254 */
+#define CANCELLED_BOOLEAN      (signed char)(-2)       /* 254 */
 #define CANCELLED_NUMERIC      (-2)
 #define CANCELLED_STRING       (char *)(-1)

-- 
Henning Makholm                            "What a hideous colour khaki is."



Information forwarded to debian-bugs-dist@lists.debian.org, Daniel Jacobowitz <ncurses-maint@debian.org>:
Bug#237629; Package ncurses-term. Full text and rfc822 format available.

Acknowledgement sent to Thomas Dickey <dickey@his.com>:
Extra info received and forwarded to list. Copy sent to Daniel Jacobowitz <ncurses-maint@debian.org>. Full text and rfc822 format available.

Message #149 received at 237629@bugs.debian.org (full text, mbox):

From: Thomas Dickey <dickey@his.com>
To: Henning Makholm <henning@makholm.net>
Cc: 237629@bugs.debian.org
Subject: Re: Bug#237629: zsh/ncurses interaction on ppc
Date: Mon, 22 Mar 2004 06:26:35 -0500 (EST)
On Mon, 22 Mar 2004, Henning Makholm wrote:

> Scripsit Thomas Dickey
>
> > The ftp for that version (20030719) isn't responding right now, I'd
> > check that otherwise:
>
> > http://ftp.debian.org/debian/pool/main/n/ncurses/ncurses_5.3.20030719-5.diff.gz
>
> ftp.dk.debian.org had it; the most relevant chunks seem to be

yes - the issue that I had with it was that some old compilers would not
recognize the "signed char".  But for fixing this problem, it would be
needed.

-- 
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net



Information forwarded to debian-bugs-dist@lists.debian.org, Daniel Jacobowitz <ncurses-maint@debian.org>:
Bug#237629; Package ncurses-term. Full text and rfc822 format available.

Acknowledgement sent to Daniel Jacobowitz <dan@debian.org>:
Extra info received and forwarded to list. Copy sent to Daniel Jacobowitz <ncurses-maint@debian.org>. Full text and rfc822 format available.

Message #154 received at 237629@bugs.debian.org (full text, mbox):

From: Daniel Jacobowitz <dan@debian.org>
To: Thomas Dickey <dickey@his.com>, 237629@bugs.debian.org
Cc: Henning Makholm <henning@makholm.net>
Subject: Re: Bug#237629: zsh/ncurses interaction on ppc
Date: Mon, 22 Mar 2004 09:35:43 -0500
On Mon, Mar 22, 2004 at 06:26:35AM -0500, Thomas Dickey wrote:
> On Mon, 22 Mar 2004, Henning Makholm wrote:
> 
> > Scripsit Thomas Dickey
> >
> > > The ftp for that version (20030719) isn't responding right now, I'd
> > > check that otherwise:
> >
> > > http://ftp.debian.org/debian/pool/main/n/ncurses/ncurses_5.3.20030719-5.diff.gz
> >
> > ftp.dk.debian.org had it; the most relevant chunks seem to be
> 
> yes - the issue that I had with it was that some old compilers would not
> recognize the "signed char".  But for fixing this problem, it would be
> needed.

Precisely.  The problem is that I didn't notice the change in
ABSENT_BOOLEAN when I upgraded to 5.4.  I'll re-add the signed char
cast to the Debian package later today.

I'm not sure why the char casts are necessary in the first place...

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer



Information forwarded to debian-bugs-dist@lists.debian.org, Daniel Jacobowitz <ncurses-maint@debian.org>:
Bug#237629; Package ncurses-term. Full text and rfc822 format available.

Acknowledgement sent to Thomas Dickey <dickey@his.com>:
Extra info received and forwarded to list. Copy sent to Daniel Jacobowitz <ncurses-maint@debian.org>. Full text and rfc822 format available.

Message #159 received at 237629@bugs.debian.org (full text, mbox):

From: Thomas Dickey <dickey@his.com>
To: Daniel Jacobowitz <dan@debian.org>
Cc: 237629@bugs.debian.org, Henning Makholm <henning@makholm.net>
Subject: Re: Bug#237629: zsh/ncurses interaction on ppc
Date: Mon, 22 Mar 2004 09:49:34 -0500 (EST)
On Mon, 22 Mar 2004, Daniel Jacobowitz wrote:

> Precisely.  The problem is that I didn't notice the change in
> ABSENT_BOOLEAN when I upgraded to 5.4.  I'll re-add the signed char
> cast to the Debian package later today.

thanks

> I'm not sure why the char casts are necessary in the first place...

iirc, it was to quiet compiler-warnings in the fallback.c module

-- 
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net



Information forwarded to debian-bugs-dist@lists.debian.org, Daniel Jacobowitz <ncurses-maint@debian.org>:
Bug#237629; Package ncurses-term. Full text and rfc822 format available.

Acknowledgement sent to simon@nuit.ca:
Extra info received and forwarded to list. Copy sent to Daniel Jacobowitz <ncurses-maint@debian.org>. Full text and rfc822 format available.

Message #164 received at 237629@bugs.debian.org (full text, mbox):

From: simon@nuit.ca
To: Henning Makholm <henning@makholm.net>
Cc: 237629@bugs.debian.org
Subject: Re: Bug 237629: zsh/ncurses interaction on ppc
Date: Mon, 22 Mar 2004 15:11:27 +0000
[Message part 1 (text/plain, inline)]
Le Mon, Mar 22, 2004 at 10:25:34 +0000, Henning Makholm a écrit:
> Scripsit simon@nuit.ca
> > Le Mon, Mar 22, 2004 at 00:33:07 +0000, Henning Makholm a ?crit:
> 
> > > I have not tried my hypothesis in practice, since I lack access to a
> > > powerpc system with ncurses-dev installed. Simon, could you try to
> > > compile and run the following program:
> 
> > try is the operative word here ;):
> 
> > gcc -fPIC -DPIC -o jabberwocky jabberwocky.c
> > /tmp/cc8KbfGj.o(.text+0x44): In function `main':
> > : undefined reference to `setupterm'
> 
> Oops, sorry for being too terse. It needs to be linked with ncurses;
> the gcc invocation that worked for me on i386 is
> 
>   gcc foo.c -lncurses

aah, ok. thank you.

> > i currently have the 5.3.20030719-5 installed, and not 5.4. would
> > that matter?
> 
> 
> It shouldn't matter for your linker errors, but since we're trying to
> confirm a bug in 5.4, the interesting *output* is what you get when
> you run it in 5.4 installed.

np. i'll do that now... (installs 5.4..)

(builds..)

results:
% gcc -o jabberwocky jabberwocky.c -lcurses 
[lun 2004/03/22 15:10 UTC][pts/8]
<simon@anubis(2):~>
% ./jabberwocky
tigetflag returns 255

*ding*

looks like we have a winner

> -- 
> Henning Makholm                        "I ... I have to return some videos."

-- 
@@-----------------------------------------------------------------@@
| ,''`.   http://www.debian.org/  | http://www.nuit.ca/             |
| : :' :  Debian GNU/Linux        | http://simonraven.nuit.ca/      |
| `. `'                           | PGP key fingerprint (new one):  |
|  `-                             | 7C49 FD9C 1054 7300 3B7B        |
|                                 | 8BF4 6A88 7AE2 711D F097        |
@@-----------------------------------------------------------------@@
[signature.asc (application/pgp-signature, inline)]

Changed Bug title. Request was from Henning Makholm <henning@makholm.net> to control@bugs.debian.org. Full text and rfc822 format available.

Bug reassigned from package `ncurses-term' to `libncurses5'. Request was from Henning Makholm <henning@makholm.net> to control@bugs.debian.org. Full text and rfc822 format available.

Merged 237629 237870. Request was from Henning Makholm <henning@makholm.net> to control@bugs.debian.org. Full text and rfc822 format available.

Reply sent to Daniel Jacobowitz <dan@debian.org>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to simon raven <simon@nuit.ca>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #175 received at 237629-close@bugs.debian.org (full text, mbox):

From: Daniel Jacobowitz <dan@debian.org>
To: 237629-close@bugs.debian.org
Subject: Bug#237629: fixed in ncurses 5.4-3
Date: Mon, 22 Mar 2004 17:17:15 -0500
Source: ncurses
Source-Version: 5.4-3

We believe that the bug you reported is fixed in the latest version of
ncurses, which is due to be installed in the Debian FTP archive:

libncurses5-dbg_5.4-3_i386.deb
  to pool/main/n/ncurses/libncurses5-dbg_5.4-3_i386.deb
libncurses5-dev_5.4-3_i386.deb
  to pool/main/n/ncurses/libncurses5-dev_5.4-3_i386.deb
libncurses5_5.4-3_i386.deb
  to pool/main/n/ncurses/libncurses5_5.4-3_i386.deb
libncursesw5-dbg_5.4-3_i386.deb
  to pool/main/n/ncurses/libncursesw5-dbg_5.4-3_i386.deb
libncursesw5-dev_5.4-3_i386.deb
  to pool/main/n/ncurses/libncursesw5-dev_5.4-3_i386.deb
libncursesw5_5.4-3_i386.deb
  to pool/main/n/ncurses/libncursesw5_5.4-3_i386.deb
ncurses-base_5.4-3_all.deb
  to pool/main/n/ncurses/ncurses-base_5.4-3_all.deb
ncurses-bin_5.4-3_i386.deb
  to pool/main/n/ncurses/ncurses-bin_5.4-3_i386.deb
ncurses-term_5.4-3_all.deb
  to pool/main/n/ncurses/ncurses-term_5.4-3_all.deb
ncurses_5.4-3.diff.gz
  to pool/main/n/ncurses/ncurses_5.4-3.diff.gz
ncurses_5.4-3.dsc
  to pool/main/n/ncurses/ncurses_5.4-3.dsc



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 237629@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Daniel Jacobowitz <dan@debian.org> (supplier of updated ncurses package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Mon, 22 Mar 2004 16:12:36 -0500
Source: ncurses
Binary: ncurses-base lib64ncurses5 libncursesw5-dev libncursesw5-dbg ncurses-bin libncurses5 libncursesw5 libncurses5-dev ncurses-term libncurses5-dbg lib64ncurses5-dev
Architecture: source i386 all
Version: 5.4-3
Distribution: unstable
Urgency: low
Maintainer: Daniel Jacobowitz <ncurses-maint@debian.org>
Changed-By: Daniel Jacobowitz <dan@debian.org>
Description: 
 libncurses5 - Shared libraries for terminal handling
 libncurses5-dbg - Debugging/profiling libraries for ncurses
 libncurses5-dev - Developer's libraries and docs for ncurses
 libncursesw5 - Shared libraries for terminal handling (wide character support)
 libncursesw5-dbg - Debugging/profiling libraries for ncurses
 libncursesw5-dev - Developer's libraries for ncursesw
 ncurses-base - Descriptions of common terminal types
 ncurses-bin - Terminal-related programs and man pages
 ncurses-term - Additional terminal type definitions
Closes: 227879 237629 237831 237870 237997 238718
Changes: 
 ncurses (5.4-3) unstable; urgency=low
 .
   * Apply 20040313 and 20040320 patches from upstream
     (Closes: #237831, #227879).
   * Fix some remaining casts to "char" which need to be "signed char"
     (Closes: #237629, #237870, #238718).
   * Update Eterm terminfo entry to agree with the Debian practice of
     kbs=\177 (Closes: #237997).
Files: 
 cde5b1c7972734b57d07462fe4528b0d 807 libs standard ncurses_5.4-3.dsc
 eee38ef539b6537faa3091ccc85e7e7e 32093 libs standard ncurses_5.4-3.diff.gz
 d178372ed531e3746a6c18699f723b3b 274722 base required libncurses5_5.4-3_i386.deb
 21f17fb618246ccbde3d7659de025306 1038566 libdevel optional libncurses5-dev_5.4-3_i386.deb
 7c43f181148896fa84d5134b8ea4455d 3970426 libdevel extra libncurses5-dbg_5.4-3_i386.deb
 0e75db34ab29234cbac1aa52670ee994 286736 libs standard libncursesw5_5.4-3_i386.deb
 43dfffa864b7cb30b54aa9279f25da5e 396580 libdevel optional libncursesw5-dev_5.4-3_i386.deb
 afb076e1964ce67db180854a796f9395 4437712 libdevel extra libncursesw5-dbg_5.4-3_i386.deb
 7530b24333b0ad8f89ca229b3150e25e 205204 base required ncurses-bin_5.4-3_i386.deb
 75fe6df5354ade22aa515c0e84e23cae 11078 base required ncurses-base_5.4-3_all.deb
 b2ac932b7fb140638f8863fd0702d9ea 278980 admin standard ncurses-term_5.4-3_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAX2HbbgOPXuCjg3cRAv4vAKCNInN350tU8blIC4HlXRgs3vAlcgCfa64y
u0897iD5W8g9nEoKhFEFA7w=
=mwJO
-----END PGP SIGNATURE-----




Information forwarded to debian-bugs-dist@lists.debian.org, Daniel Jacobowitz <ncurses-maint@debian.org>:
Bug#237629; Package libncurses5. Full text and rfc822 format available.

Acknowledgement sent to dickey@his.com:
Extra info received and forwarded to list. Copy sent to Daniel Jacobowitz <ncurses-maint@debian.org>. Full text and rfc822 format available.

Message #180 received at 237629@bugs.debian.org (full text, mbox):

From: Thomas Dickey <dickey@his.com>
To: Daniel Jacobowitz <dan@debian.org>, 237629@bugs.debian.org
Subject: Re: Bug#237629: zsh/ncurses interaction on ppc
Date: Sat, 27 Mar 2004 16:41:41 -0500
[Message part 1 (text/plain, inline)]
On Mon, Mar 22, 2004 at 09:35:43AM -0500, Daniel Jacobowitz wrote:
> I'm not sure why the char casts are necessary in the first place...

I think I misread this comment before - the casts are needed because in
some cases there'll be a comparison between the char value (might be
unsigned) and a signed value.  For whatever reason, the promotion rule
makes the comparison as if both are unsigned.  There's nothing to first
sign-extend an unsigned char value, so
	(char)(-1) < (-1)
There are other odd effects like this - when I can get the compiler to
tell me, I prefer to adjust types rather than use casts, since the latter
don't always work as intended.

-- 
Thomas E. Dickey <dickey@invisible-island.net>
http://invisible-island.net
ftp://invisible-island.net
[signature.asc (application/pgp-signature, inline)]

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Mon Apr 21 10:02:19 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.