Oliver wrote:

> Multiplying maximum width by MB_CUR_MAX is one way to determine a
> suitable buffer size though that doesn't allow for escape seqences for
> colours. Is it too ugly to have the function allocate the buffer and
> rely on the caller to free it?

fmt_compile() does that, but not fmt_scan().

In scan, at least, the caller of fmt_scan() allocates the
buffer but doesn't bother to free it.  So, no, I don't think
it'd be too ugly.

> The same code change could also address the following request which is
> for -width 0 to be unlimited:
>   http://savannah.nongnu.org/bugs/?15274

I had noticed that a while ago but wondered if there's
really a need for -width 0.  Though getting rid of fixed
size buffers would be helpful.

David

_______________________________________________
Nmh-workers mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/nmh-workers

Reply via email to