nmh-workers
[Top] [All Lists]

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

2014-09-01 21:37:10
Ken wrote:

[David:]
3) To not break existing user scripts, width would continue to
   include the trailing newline.  Add support for an optional
   profile setting to not include the trailing newline.

I don't think we ever resolved how to handle this:  wcwidth()
returns -1 for the width of newlines, and other non-printable
characters.  And the profile setting idea didn't fly.  And I
don't know if it's worth adding another switch just to not count
the newline.

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.

I removed the trailing newline from the width count.  And
I didn't add that optional profile setting.  It sure looks
to me like this was a bug.

There was also this:

4) Add support for 0 width indicating infinite width.

Done.  Though "infinite" is now about 8K bytes.  While the
format engine now supports variable-sized buffers, scan(1)
still depends on fixed-sized buffers elsewhere, including
m_getfld().

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>
  • Re: [Nmh-workers] Thoughts: header/address parsing, David Levine <=