[Top][All Lists]

[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: Mon, 01 Sep 2014 22:36:43 -0400

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


reply via email to

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