nmh-workers
[Top] [All Lists]

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

2014-08-16 09:49:32
Ralph wrote:

Hi David,

Also, is `width' the value of `tput cols' this time, or one less
again?

Currently, it looks like -outsize counts the newline as one, like
-width.  If we don't want to change that, then we should call it
something else.

That's what seems wrong.  fmttest(1) says "characters with zero width...
are not counted against this total".  Does linefeed, U+0A have zero
width?

Good question.  I'd say no, if I define width as the difference
between the column position before and after printing the character.

The format engine doesn't check for negative width, maybe it should.
U+08 is another one, though it gets output as a space, so the width is
consistent.  U+09 is translated to a newline, though that's easier
than dealing with a variable width.  We should probably revisit how
control characters are handled.

I'm looking now at replacing the use of fixed buffers with dynamic
allocation in the format engine so that we could interpret -width 0
(or -width max?) as infinite.

David

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

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