IMO it looks a little nicer if cli-style.c:do_show uses a single
printf to display its output. This is also slightly more
i18-friendly.
I noticed this while debugging a case where multiple redundant ANSI
escapes were sent. In conjunction with a subsequent patch, this
approach happens to fix that problem. FWIW I don't consider such
redundancies to be bugs, but it was convenient to change this one.
Approved-By: Andrew Burgess <aburgess@redhat.com>
const char *value)
{
cli_style_option *cso = (cli_style_option *) cmd->context ();
- gdb_puts (_("The "), file);
- fprintf_styled (file, cso->style (), _("\"%s\" style"), cso->name ());
- gdb_printf (file, _(" %s is: %s\n"), what, value);
+ gdb_printf (file, _("The %p[\"%s\" style%p] %s is: %s\n"),
+ cso->style ().ptr (), cso->name (), nullptr, what, value);
}
/* See cli-style.h. */