nmh-workers
[Top] [All Lists]

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

2014-08-25 05:09:32
Hi Ken,

So ... what would break if the newline _wasn't_ counted?  I am leaning
towards going the wcwidth() route and simply not counting things like
that as printable.  I will note that isprint('\n') returns 0.

There's been many detours along the way so I could be confused, but I
think including it means formatting that attempts to fill the rest of
the terminal's line stops one short of the end, thus not triggering the
terminal's automatic right margin, assuming it has `am' or `sam'
terminfo capability.  You can see the difference by turning them off.

    $ printf '%*dfoo\n' `tput cols` 42
                                                                      42
    foo
    $ tput rmam; printf '%*dfoo\n' `tput cols` 42; tput smam
                                                                      4o
    $

How aware of the terminal are output routines?

Cheers, Ralph.

_______________________________________________
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>