[PATCH 14/19] Rename puts_filtered_tabular

Tom Tromey tom@tromey.com
Sat Jan 22 01:37:56 GMT 2022


puts_filtered_tabular is now misnamed, because whether filtering
happens is now up to the stream.  So, rename it.  (This function is
pretty weird, and should probably be rewritten to avoid using the
chars_printed global, and moved into objc-lang.c.  However, I haven't
done so.)
---
 gdb/objc-lang.c |  4 ++--
 gdb/utils.c     | 13 ++++++-------
 gdb/utils.h     |  2 +-
 3 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/gdb/objc-lang.c b/gdb/objc-lang.c
index 0ef1973a6f9..9a834ff504a 100644
--- a/gdb/objc-lang.c
+++ b/gdb/objc-lang.c
@@ -666,7 +666,7 @@ info_selectors_command (const char *regexp, int from_tty)
 	    *p++ = *name++;
 	  *p++ = '\0';
 	  /* Print in columns.  */
-	  puts_filtered_tabular(asel, maxlen + 1, 0);
+	  puts_tabular(asel, maxlen + 1, 0);
 	}
       begin_line();
     }
@@ -800,7 +800,7 @@ info_classes_command (const char *regexp, int from_tty)
 	    *p++ = *name++;
 	  *p++ = '\0';
 	  /* Print in columns.  */
-	  puts_filtered_tabular(aclass, maxlen + 1, 0);
+	  puts_tabular(aclass, maxlen + 1, 0);
 	}
       begin_line();
     }
diff --git a/gdb/utils.c b/gdb/utils.c
index 46b061ea6cf..d00f72ba0a5 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -1504,15 +1504,14 @@ pager_file::wrap_here (int indent)
     }
 }
 
-/* Print input string to gdb_stdout, filtered, with wrap, 
-   arranging strings in columns of n chars.  String can be
-   right or left justified in the column.  Never prints 
-   trailing spaces.  String should never be longer than
-   width.  FIXME: this could be useful for the EXAMINE 
-   command, which currently doesn't tabulate very well.  */
+/* Print input string to gdb_stdout arranging strings in columns of n
+   chars.  String can be right or left justified in the column.  Never
+   prints trailing spaces.  String should never be longer than width.
+   FIXME: this could be useful for the EXAMINE command, which
+   currently doesn't tabulate very well.  */
 
 void
-puts_filtered_tabular (char *string, int width, int right)
+puts_tabular (char *string, int width, int right)
 {
   int spaces = 0;
   int stringlen;
diff --git a/gdb/utils.h b/gdb/utils.h
index e43ce3bcbd0..e899e899238 100644
--- a/gdb/utils.h
+++ b/gdb/utils.h
@@ -238,7 +238,7 @@ extern int gdb_putc (int c);
 
 extern void gdb_puts (const char *);
 
-extern void puts_filtered_tabular (char *string, int width, int right);
+extern void puts_tabular (char *string, int width, int right);
 
 extern void gdb_vprintf (const char *, va_list) ATTRIBUTE_PRINTF (1, 0);
 
-- 
2.31.1



More information about the Gdb-patches mailing list