Implement putstr and putstrn in ui_file
authorTom Tromey <tom@tromey.com>
Fri, 31 Dec 2021 17:40:02 +0000 (10:40 -0700)
committerTom Tromey <tom@tromey.com>
Wed, 5 Jan 2022 18:01:02 +0000 (11:01 -0700)
commitd53fd721a18f8c827aa69ffbd15abd99641b5e20
tree436641845129a7eb9eb38733a456656da9312366
parent28a4e64dd1b17b0d9f267c3466d7da3e8a41afd8
Implement putstr and putstrn in ui_file

In my tour of the ui_file subsystem, I found that fputstr and fputstrn
can be simplified.  The _filtered forms are never used (and IMO
unlikely to ever be used) and so can be removed.  And, the interface
can be simplified by removing a callback function and moving the
implementation directly to ui_file.

A new self-test is included.  Previously, I think nothing was testing
this code.

Regression tested on x86-64 Fedora 34.
gdb/Makefile.in
gdb/guile/scm-ports.c
gdb/mi/mi-console.c
gdb/mi/mi-main.c
gdb/mi/mi-out.c
gdb/ui-file.c
gdb/ui-file.h
gdb/unittests/ui-file-selftests.c [new file with mode: 0644]
gdb/utils.c
gdb/utils.h