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: David Levine
Subject: Re: [Nmh-workers] Thoughts: header/address parsing
Date: Sat, 16 Aug 2014 10:49:04 -0400

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



reply via email to

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