bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 0/3] Various clean up in preparation for libtextstyle


From: Akim Demaille
Subject: Re: [PATCH 0/3] Various clean up in preparation for libtextstyle
Date: Sat, 16 Feb 2019 07:23:33 +0100

Hi Bruno!

> Le 16 févr. 2019 à 00:14, Bruno Haible <address@hidden> a écrit :
> 
> If many people report the same thing, we could have a single environment
> variable for all libtextstyle-enabled programs, that would turn off styled
> output.

That would probably make sense.

>> But moving all the output functions on top of ostream would be
>> quite painful.  I really wonder if I should not try to synchronize
>> the ostream for style, and the FILE* for output.
> 
> What I can offer are two methods on the styled ostreams:
>  - a flush method that puts the target into the default state, so that
>    you can print any string you like (including newlines) through a
>    FILE*,
>  - a flush_to_current_style method that puts the target into the style
>    that corresponds to the currently active CSS classes, so that you
>    can print any string that does NOT contain newlines.

That sounds like a good option.

>> I will try to play with flush and simultaneous
>> uses of stderr and styled_ostream and see how it goes.
> 
> I can implement the above mentioned methods within a couple of days.

No pressure, there's no commitment to release anything soon :)
Take your time, and thanks for the effort!


Cheers!


reply via email to

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