Thomas Dickey, le Wed 24 Aug 2005 18:51:08 -0400, a écrit : > > 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"). > > 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
Well, this is both explicit (the "sam" word is cited) and very implicit (nothing tells more about it) :) But I indeed misunderstood sam: no new line is added, the cursor is just put at the beginning of the current line. > apt-get doesn't appear to use terminfo or termcap anyway. No indeed, so it should default to the least capable possibility. > What happens if the terminal isn't 80 columns wide? The ioctl() (hopefully) gets the current size, to which 1 is subtracted. > Actually - reading the code - it appears that this initialization > is overridden by the SigWinch() function. So the modification should > go there. The modification is already there. But the ioctl() may fail (if it's not available in the kernel for instance), so this is not sufficient, the default value should be modified too (at least for coherency...). Regards, Samuel -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]