From 7016a382b0dc48001cb5c36e56b42fc41b1303a8 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Thu, 30 Dec 2021 10:23:18 -0700 Subject: Add ui_file::wrap_here Right now, wrap_here is a global function. In the long run, we'd like output streams to be relatively self-contained objects, and having a global function like this is counter to that goal. Also, existing code freely mixes writes to some parameterized stream with calls to wrap_here -- but wrap_here only really affects gdb_stdout, so this is also incoherent. This step is a patch toward making wrap_here more sane. It adds a wrap_here method to ui_file and changes ui_out implementations to use it. --- gdb/mi/mi-out.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/mi') diff --git a/gdb/mi/mi-out.c b/gdb/mi/mi-out.c index 72ae36d..53f7206 100644 --- a/gdb/mi/mi-out.c +++ b/gdb/mi/mi-out.c @@ -174,7 +174,7 @@ mi_ui_out::do_message (const ui_file_style &style, void mi_ui_out::do_wrap_hint (int indent) { - wrap_here (indent); + m_streams.back ()->wrap_here (indent); } void -- cgit v1.1