NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

lib/39175: Curses regression causes disoptimal and confusing output



>Number:         39175
>Category:       lib
>Synopsis:       Curses regression causes disoptimal and confusing output
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jul 20 18:55:00 +0000 2008
>Originator:     Andreas Gustafsson
>Release:        NetBSD 4.99.69 (-current source date 2008.07.04.15.51.35)
>Organization:
>Environment:
System: NetBSD 4.99.69
Architecture: i386
Machine: i386
>Description:

When running sysinst from -current source date 2008.07.04.15.51.35
(UTC) or newer, the sysinst output uses ANSI terminal escape
sequences in wasteful and confusing ways.  For example, where earlier
versions would output

  Welcome to sysinst, the NetBSD-4.99.69 system installation tool.

sysinst will now output

  
Welcome^[[Cto^[[Csysinst,^[[Cthe^[[CNetBSD-4.99.69^[[Csystem^[[Cinstallation^[[Ctool.

where ^[[C is the ANSI terminal escape sequence for "move cursor
right".  Although this will render correctly on the ANSI terminal, it
is inefficient as it generates three bytes of output where a single
ASCII space would do.  It also makes the output harder to read or
screen-scrape for purposes of debugging or automated testing (the
latter is how I ran into the problem).

The problem is not limited to space characters as in the above
example; any character that happens to be identical to the prior
screen contents will be replaced by a "move cursor right" sequence.
For example, instead of

  Please enter a name for your NetBSD disk

sysinst will now output

  Please^[[Cent^[[Cr a name for your NetBSD d^[[Csk

replacing the letter "e" with a "move cursor right" sequence in two
places.

I assume other curses-based applications are similarly affected.

I have narrowed down the appearance of the problem to the
a specific commit: src/lib/libcurses/cr_put.c revision 1.25 -> 1.26.

>How-To-Repeat:

Run sysinst in an emulator using an emulated serial console and
capture the output.  Presumably you can also run some other
curses application and/or capture the output using "script",
but I haven't tried that myself.

>Fix:

Perhaps the commit identified above can be reverted.



Home | Main Index | Thread Index | Old Index