nmh-workers
[Top] [All Lists]

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

2014-08-10 11:17:54
Hi David,

OK, so we're normally after columnar output.  How about `-columns
C', where the string is output, as measured by wcwidth(), until
either the string ends or C would be exceeded.

How about -outsize, to be consistent with fmttest(1):

    The -outsize switch controls the maximum number of printable
    characters that the format engine will produce.  Characters marked
    as non-printing by the format engine with `%(zputlit)', characters
    with zero width, and extra bytes that are part of a multibyte
    character are not counted against this total.  Two special values
    are supported: “max”, which will set the value to the size of the
    output buffer, and “width”, which will set the value to the width
    of the terminal.

I know there are few nmh programmers that haven't coded assember, but
-outsize is something only a programmer could like.  :-)

The functionality sounds OK, though it needs to know `Foo' is 2+1+1;
there's no mention of wider-than-one runes above AFAICS.  Also, is
`width' the value of `tput cols' this time, or one less again?

Then pad with ASCII space until C is met.

I don't think that we should add trailing space.  The output need not
be columnar.

No, you're right.  I was confusing it with `%42(decode{subject})'.

Cheers, Ralph.

_______________________________________________
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

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