This is the mail archive of the
mailing list for the GDB project.
Re: ui_out format strings for fields and styles (Re: [PATCH] Style "pwd" output)
>>>>> "Pedro" == Pedro Alves <email@example.com> writes:
Pedro> Prototype time!
Pedro> I reserved "%pS" and "%pN" for styling, but haven't really prototyped that.
Pedro> Is there a global current style stack we can push a style to/from?
No, there's only a way to set the current style. However, it's not
really intended for callers to set the style and then just leave it set
-- all the existing calls should set the style, then later set it back
to the default style.
It seems to me that this could be enforced by our printf. Or, if we
really do want stacking, the stack could just be local to this function.
I wouldn't mind some kind of brackets being used as the characters here,
like %p[ ... %p]. It's too bad that we still have to pass some pointer
value for the closer.