nmh-workers
[Top][All Lists]
Advanced

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

Re: [Nmh-workers] Thoughts: header/address parsing


From: Ralph Corderoy
Subject: Re: [Nmh-workers] Thoughts: header/address parsing
Date: Tue, 26 Aug 2014 13:02:40 +0100

Hi Ken,

> I am not the expert here ... but it looks like to me (after some
> experimentation with exactly 1 data point, an xterm), if you print a
> character in the last column but follow it with a newline, you don't
> get two newlines.

That's on `xenl', AKA `eat_newline_glitch', terminals, AIUI, yes.
terminfo(5):

    Glitches and Braindamage
    ...
    Terminals which ignore a line-feed immediately after an am wrap,
    such as the Concept and vt100, should indicate xenl.

Wrapping,
https://www.gnu.org/software/termutils/manual/termcap-1.3/html_chapter/termcap_4.html#IDX69
has some useful background.

> I think it should work out the same even if automatic margins are on
> or off, right?

I think it depends on the terminal, and whether we're on its last line.
Code does try and make allowances, e.g.
http://sources.debian.net/src/procps/1:3.3.9-7/top/top.c/#L146

> I have the feeling that there was no concious decision to make the
> format engine print columns one less than the terminal width, it was
> just that they counted every byte as one character and a newline was a
> byte.

Sounds plausible.  I'm +1 to stop counting the \n.  If any code is
trying to avoid the last column, they can adjust;  as you've pointed out
elsewhere, multi-byte-handling changes have already broken this.

Cheers, Ralph.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]