Patchwork [17/20] Remove strcat_to_buf

login
register
mail settings
Submitter Tom Tromey
Date Sept. 10, 2019, 7:08 p.m.
Message ID <20190910190857.6562-18-tom@tromey.com>
Download mbox | patch
Permalink /patch/34483/
State New
Headers show

Comments

Tom Tromey - Sept. 10, 2019, 7:08 p.m.
An earlier patch in the series removed the last call to strcat_to_buf,
so this patch removes the function entirely.

gdb/ChangeLog
2019-09-10  Tom Tromey  <tom@tromey.com>

	* tui/tui.h (strcat_to_buf): Don't declare.
	* tui/tui.c (strcat_to_buf): Remove.
---
 gdb/ChangeLog |  5 +++++
 gdb/tui/tui.c | 13 -------------
 gdb/tui/tui.h |  2 --
 3 files changed, 5 insertions(+), 15 deletions(-)

Patch

diff --git a/gdb/tui/tui.c b/gdb/tui/tui.c
index 35a7ec70532..e1f65f17326 100644
--- a/gdb/tui/tui.c
+++ b/gdb/tui/tui.c
@@ -567,19 +567,6 @@  tui_disable_command (const char *args, int from_tty)
   tui_disable ();
 }
 
-void
-strcat_to_buf (char *buf, int buflen, 
-	       const char *item_to_add)
-{
-  if (item_to_add != NULL && buf != NULL)
-    {
-      if ((strlen (buf) + strlen (item_to_add)) <= buflen)
-	strcat (buf, item_to_add);
-      else
-	strncat (buf, item_to_add, (buflen - strlen (buf)));
-    }
-}
-
 #if 0
 /* Solaris <sys/termios.h> defines CTRL.  */
 #ifndef CTRL
diff --git a/gdb/tui/tui.h b/gdb/tui/tui.h
index 25ae0c5e471..baf4a813b60 100644
--- a/gdb/tui/tui.h
+++ b/gdb/tui/tui.h
@@ -24,8 +24,6 @@ 
 
 struct ui_file;
 
-extern void strcat_to_buf (char *, int, const char *);
-
 /* Types of error returns.  */
 enum tui_status
 {