Debian Bug report logs - #318621
libncurses5: sgr0 actually gets empty when trimmed

version graph

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

Reported by: Samuel Thibault <samuel.thibault@ens-lyon.org>

Date: Sat, 16 Jul 2005 15:33:20 UTC

Severity: normal

Found in version 5.4-7

Fixed in version ncurses/5.5-1

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#318621; Package libncurses5. Full text and rfc822 format available.

Acknowledgement sent to Samuel Thibault <samuel.thibault@ens-lyon.org>:
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: Samuel Thibault <samuel.thibault@ens-lyon.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: libncurses5: sgr0 actually gets empty when trimmed
Date: Sat, 16 Jul 2005 17:21:56 +0200
Package: libncurses5
Version: 5.4-7
Severity: normal

Hi,

On hurd terminals, sgr0 gets emptied so that all sort of funny effects
happen. As a reminder, here are hurd's sgr and sgr0:

	sgr=\E[0%?%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[0m

A trace shows what happens in ncurses/tinfo/lib_termcap.c:tgetent():

checking if we can trim sgr0 based on sgr
sgr0       "\e[0m"
sgr(9:off) "\e[0m"
sgr(9:on)  "\e[0;11m"
similar_sgr:
	"\e[0m"
	"\e[0m"
...similar_sgr: 1
	"0m"
	"0m"
similar_sgr:
	"\e[0m"
	"\e[0;11m"
...similar_sgr: 0
	"0m"
	"0;11m"
adjusting sgr0 : "\e[0m"
looking for SGR 10 in "\e[0m"
chop_out 0..4 from "\e[0m"
...adjusted sgr0 : ""

The SGR 10 finding correctly fails, so that the "if (!found..."
statement is executed (of course 'off' is contained in 'end': they are
equal!) Hence it removes the content of 'off' from sgr0, this latter
thus becomes empty...

A quick and dirty fix would be to modify hurd's terminfo this way:
	sgr0=\E[0;10m
(i.e. like ansi's sgr0 entry), so that things work by luck (like ansi's
entry). But this is not a good solution: \E[0m _is_ sufficient.

Maybe checking that 'off' is not merely equal to 'end', but really
_strictly_ contained in 'end' would be a better way?

Regards,
Samuel



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

Acknowledgement sent to Thomas Dickey <dickey@radix.net>:
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 318621@bugs.debian.org (full text, mbox):

From: Thomas Dickey <dickey@radix.net>
To: Samuel Thibault <samuel.thibault@ens-lyon.org>, 318621@bugs.debian.org
Subject: Re: Bug#318621: libncurses5: sgr0 actually gets empty when trimmed
Date: Sat, 16 Jul 2005 12:16:42 -0400
[Message part 1 (text/plain, inline)]
On Sat, Jul 16, 2005 at 05:50:06PM +0200, Samuel Thibault wrote:
> Package: libncurses5
> Version: 5.4-7
> Severity: normal
...
> Maybe checking that 'off' is not merely equal to 'end', but really
> _strictly_ contained in 'end' would be a better way?

something like that, I guess (I did make a set of tests last year when I
implemented this change - looks like I overlooked this one).

-- 
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
[Message part 2 (application/pgp-signature, inline)]

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

Notification sent to Samuel Thibault <samuel.thibault@ens-lyon.org>:
Bug acknowledged by developer. Full text and rfc822 format available.

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

From: Daniel Jacobowitz <dan@debian.org>
To: 318621-close@bugs.debian.org
Subject: Bug#318621: fixed in ncurses 5.5-1
Date: Fri, 14 Oct 2005 16:17:13 -0700
Source: ncurses
Source-Version: 5.5-1

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:

lib64ncurses5-dev_5.5-1_i386.deb
  to pool/main/n/ncurses/lib64ncurses5-dev_5.5-1_i386.deb
lib64ncurses5_5.5-1_i386.deb
  to pool/main/n/ncurses/lib64ncurses5_5.5-1_i386.deb
libncurses5-dbg_5.5-1_i386.deb
  to pool/main/n/ncurses/libncurses5-dbg_5.5-1_i386.deb
libncurses5-dev_5.5-1_i386.deb
  to pool/main/n/ncurses/libncurses5-dev_5.5-1_i386.deb
libncurses5_5.5-1_i386.deb
  to pool/main/n/ncurses/libncurses5_5.5-1_i386.deb
libncursesw5-dbg_5.5-1_i386.deb
  to pool/main/n/ncurses/libncursesw5-dbg_5.5-1_i386.deb
libncursesw5-dev_5.5-1_i386.deb
  to pool/main/n/ncurses/libncursesw5-dev_5.5-1_i386.deb
libncursesw5_5.5-1_i386.deb
  to pool/main/n/ncurses/libncursesw5_5.5-1_i386.deb
ncurses-base_5.5-1_all.deb
  to pool/main/n/ncurses/ncurses-base_5.5-1_all.deb
ncurses-bin_5.5-1_i386.deb
  to pool/main/n/ncurses/ncurses-bin_5.5-1_i386.deb
ncurses-term_5.5-1_all.deb
  to pool/main/n/ncurses/ncurses-term_5.5-1_all.deb
ncurses_5.5-1.diff.gz
  to pool/main/n/ncurses/ncurses_5.5-1.diff.gz
ncurses_5.5-1.dsc
  to pool/main/n/ncurses/ncurses_5.5-1.dsc
ncurses_5.5.orig.tar.gz
  to pool/main/n/ncurses/ncurses_5.5.orig.tar.gz



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 318621@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: Fri, 14 Oct 2005 21:13:00 +0000
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.5-1
Distribution: unstable
Urgency: low
Maintainer: Daniel Jacobowitz <ncurses-maint@debian.org>
Changed-By: Daniel Jacobowitz <dan@debian.org>
Description: 
 lib64ncurses5 - Shared libraries for terminal handling (64-bit)
 lib64ncurses5-dev - Developer's libraries for ncurses (64-bit)
 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: 316663 318621 325481 333749
Changes: 
 ncurses (5.5-1) unstable; urgency=low
 .
   * New upstream release.
     - inwstr-manpage-section.patch and tack-manpage.patch merged.
     - Remove reference to non-existant BUGS section (Closes: #325481).
     - Wide character repainting fix (Closes: #316663).
     - Hurd sgr0 trimming fix (Closes: #318621).
   * Set the expected libgpm SONAME in debian/rules to avoid cross compilation
     checks.
   * Build 64-bit libraries on i386 and powerpc (Closes: #333749).
   * Correct the type of NCURSES_BOOL in 64-bit biarch builds.
Files: 
 0e90da1b386cbaa6a50a8aff81063001 993 libs standard ncurses_5.5-1.dsc
 e73c1ac10b4bfc46db43b2ddfd6244ef 2314030 libs standard ncurses_5.5.orig.tar.gz
 81ae9e65329fdc8db8f399f39841c04a 35116 libs standard ncurses_5.5-1.diff.gz
 5a0e0279a0d32e95521943488ff300d8 293500 base required libncurses5_5.5-1_i386.deb
 94b5a00ad800322bc9e4afde5f4d71b9 1312330 libdevel optional libncurses5-dev_5.5-1_i386.deb
 f2adc6f8c9dce5c1d85268760ba41228 1251174 libdevel extra libncurses5-dbg_5.5-1_i386.deb
 dcf43a81ed801f42137442eb4818e585 310556 libs important libncursesw5_5.5-1_i386.deb
 642c75064c0fbc4a130e0a3e4a3ddb3d 426198 libdevel optional libncursesw5-dev_5.5-1_i386.deb
 190ecaea9d07222bc4a9bf65c0b2a54f 1406412 libdevel extra libncursesw5-dbg_5.5-1_i386.deb
 5652fbf86560fc6f4f9f60986d34959c 318712 libs optional lib64ncurses5_5.5-1_i386.deb
 33281f2bd1c6d6f5847c866e99908ba3 381892 libdevel optional lib64ncurses5-dev_5.5-1_i386.deb
 ed50853689395ab78a7cec898d20fcd8 210164 base required ncurses-bin_5.5-1_i386.deb
 60c1c2cdaf869ea034a8c5af26a2ff15 12838 base required ncurses-base_5.5-1_all.deb
 149bad2b9aedaba8597ae2c53535bdc1 276684 admin standard ncurses-term_5.5-1_all.deb

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

iD8DBQFDUDn3bgOPXuCjg3cRAsOQAJ9y0NcKyIY/ZN6MRSGxUfaFq7LbAwCgx2Z9
cVKQd0aj5fBJr1+G5xPweZw=
=FX8k
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sun, 24 Jun 2007 20:21:49 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sat Apr 19 02:29:25 2014; Machine Name: beach.debian.org

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