nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] colorized/highlighted scan output?

2012-11-02 14:18:01
We already have \-processing, though output functions like putstr strip
them.

Careful ... how that's implemented is a bit wonky.

Technically \-processing doesn't happen in the format code; it
happens in a function called new_fs() (sbr/fmt_new.c).  Well,
new_fs() calls normalize(), but you get the idea.  My point is that
by the time fmt_compile() is called all of the \-escapes have been
processed, so fmt_compile() doesn't "see" them.

   $ scan -format '%(lit a\tb\bc)' last | cat -A
   a b c$
   $

How about adding \x1b to that with a new zputstr function that doesn't
adjust column or filter the string.

We already have putlit that doesn't do the whitespace compression, so I
think zputlit makes more sense.

--Ken

_______________________________________________
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>