On Wed, Aug 24, 2005 at 11:20:16PM +0200, Samuel Thibault wrote: > Package: apt-get > Version: apt > Severity: minor > Tags: patch > > Hi, > > Some terminals can't print 80 characters on a single line without > opening a new line (those with the "sam" terminfo capability rather than > "am"). So by default, apt-get should only use 79 characters, leaving > the 80th for the cursor and hence avoiding spurious newlines. (See the > SigWinch() handler, which already subtracts 1 to the value obtained via > ioctl()). (Yes, the ioctl may _always_ fail on some terminals, so the > default value _is_ important).
man -s 4 terminfo (Solaris) explains implicitly why using "sam" for a video terminal is not expected. It's described in the section for printers. (ncurses doesn't do much with printers). Here's some text from Solaris's manpage: auto_right_margin am am Terminal has automatic margins semi_auto_right_margin sam YE Printing in last column causes cr What Happens After Character Printed in Rightmost Position sam Automatic move to beginning of same line Some printers can be put in a mode where the normal direc- tion of motion is reversed. This mode can be especially use- ful when there are no capabilities for leftward or upward motion, because those capabilities can be built from the motion reversal capability and the rightward or downward motion capabilities. It is best to leave it up to an appli- cation to build the leftward or upward capabilities, though, and not enter them in the terminfo database. This allows several reverse motions to be strung together without inter- vening wasted steps that leave and reenter reverse mode. apt-get doesn't appear to use terminfo or termcap anyway. What happens if the terminal isn't 80 columns wide? Actually - reading the code - it appears that this initialization is overridden by the SigWinch() function. So the modification should go there. -- Thomas E. Dickey http://invisible-island.net ftp://invisible-island.net
pgpgBr4802kE1.pgp
Description: PGP signature