Libxo bugs and fixes.
Alfred Perlstein
bright at mu.org
Mon Jan 5 00:52:27 UTC 2015
> On Jan 4, 2015, at 4:33 PM, Phil Shafer <phil at juniper.net> wrote:
>
> Alfred Perlstein writes:
>> I think we REALLY want to have the fflush be a callback offered by libxo, otherwise the
>> layering violations are pretty difficult to deal with. Consider if libxo is outputting
>> to a non-stdio buffer, then what is the paradigm? Is it not better to give libxo a "flu
>> sh" callback and have that exposed via the xop interface?
>
> The problem is divining when to flush. If you are whiffling thru a list,
> does the app want to flush after each list member, or when the complete
> list is done.
>
> Or maybe you are just looking at the case when pretty output
> is made to the terminal?
I am more thinking of the case where you pass a libxo handle down to a subsystem that shouldn't have to know if it is a studio object or not.
Consider the code sample you gave me, but instead of using the handleless version xo_flush() you are writing a routine that takes a handle so instead you would be calling xo_flush_h().
In the case of xo_flush_h() how does a subroutine know how to flush the backing object of the handle?
-ap
More information about the freebsd-arch
mailing list