aboutsummaryrefslogtreecommitdiff
path: root/gdb/utils.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2021-12-31 15:04:58 -0700
committerTom Tromey <tom@tromey.com>2022-01-26 15:19:13 -0700
commit27d326da434d60056eae0d14c1f0175d0e121c2a (patch)
treef03d0251eee87288cc2b0a06a761af0bcd0d3d70 /gdb/utils.c
parent1285ce8629b37f800bf21731ee7c7a8b1b8d0233 (diff)
downloadgdb-27d326da434d60056eae0d14c1f0175d0e121c2a.zip
gdb-27d326da434d60056eae0d14c1f0175d0e121c2a.tar.gz
gdb-27d326da434d60056eae0d14c1f0175d0e121c2a.tar.bz2
Remove global wrap_here function
This removes the global wrap_here function, so that future calls cannot be introduced. Instead, all callers must use the method on the appropriate ui_file. This temporarily moves the implementation of this method to utils.c. This will change once the remaining patches to untangle the pager have been written.
Diffstat (limited to 'gdb/utils.c')
-rw-r--r--gdb/utils.c20
1 files changed, 3 insertions, 17 deletions
diff --git a/gdb/utils.c b/gdb/utils.c
index 96e81c8..152fa9b 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -1519,29 +1519,15 @@ get_chars_per_line ()
return chars_per_line;
}
-/* Indicate that if the next sequence of characters overflows the
- line, a newline should be inserted here rather than when it hits
- the end. If INDENT is non-zero, it is a number of spaces to be
- printed to indent the wrapped part on the next line.
-
- If the line is already overfull, we immediately print a newline and
- the indentation, and disable further wrapping.
-
- If we don't know the width of lines, but we know the page height,
- we must not wrap words, but should still keep track of newlines
- that were explicitly printed.
-
- This routine is guaranteed to force out any output which has been
- squirreled away in the wrap_buffer, so wrap_here (0) can be
- used to force out output from the wrap_buffer. */
+/* See ui-file.h. */
void
-wrap_here (int indent)
+ui_file::wrap_here (int indent)
{
/* This should have been allocated, but be paranoid anyway. */
gdb_assert (filter_initialized);
- flush_wrap_buffer (gdb_stdout);
+ flush_wrap_buffer (this);
if (chars_per_line == UINT_MAX) /* No line overflow checking. */
{
wrap_column = 0;