public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] gdb/completion: make completion_find_completion_word static
@ 2024-03-25 18:30 Andrew Burgess
  0 siblings, 0 replies; only message in thread
From: Andrew Burgess @ 2024-03-25 18:30 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=10c58fd8df4b3cbdadd536fbccb39ed111c594c2

commit 10c58fd8df4b3cbdadd536fbccb39ed111c594c2
Author: Andrew Burgess <aburgess@redhat.com>
Date:   Tue Feb 13 12:19:00 2024 +0000

    gdb/completion: make completion_find_completion_word static
    
    I noticed that completion_find_completion_word is only used within
    completer.c, so lets make it static.
    
    There should be no user visible changes after this commit.

Diff:
---
 gdb/completer.c | 14 ++++++++++++--
 gdb/completer.h | 11 -----------
 2 files changed, 12 insertions(+), 13 deletions(-)

diff --git a/gdb/completer.c b/gdb/completer.c
index 04354120621..2fee90503db 100644
--- a/gdb/completer.c
+++ b/gdb/completer.c
@@ -46,6 +46,11 @@
 
 #include "completer.h"
 
+/* Forward declarations.  */
+static const char *completion_find_completion_word (completion_tracker &tracker,
+						    const char *text,
+						    int *quote_char);
+
 /* See completer.h.  */
 
 class completion_tracker::completion_hash_entry
@@ -1955,9 +1960,14 @@ gdb_completion_word_break_characters ()
   return NULL;
 }
 
-/* See completer.h.  */
+/* Find the bounds of the word in TEXT for completion purposes, and return
+   a pointer to the end of the word.  Calls the completion machinery for a
+   handle_brkchars phase (using TRACKER) to figure out the right work break
+   characters for the command in TEXT.  QUOTE_CHAR, if non-null, is set to
+   the opening quote character if we found an unclosed quoted substring,
+   '\0' otherwise.  */
 
-const char *
+static const char *
 completion_find_completion_word (completion_tracker &tracker, const char *text,
 				 int *quote_char)
 {
diff --git a/gdb/completer.h b/gdb/completer.h
index 0a95ced8a80..9011ba778a7 100644
--- a/gdb/completer.h
+++ b/gdb/completer.h
@@ -556,17 +556,6 @@ extern void complete_line (completion_tracker &tracker,
 extern completion_result
   complete (const char *line, char const **word, int *quote_char);
 
-/* Find the bounds of the word in TEXT for completion purposes, and
-   return a pointer to the end of the word.  Calls the completion
-   machinery for a handle_brkchars phase (using TRACKER) to figure out
-   the right work break characters for the command in TEXT.
-   QUOTE_CHAR, if non-null, is set to the opening quote character if
-   we found an unclosed quoted substring, '\0' otherwise.  */
-extern const char *completion_find_completion_word (completion_tracker &tracker,
-						    const char *text,
-						    int *quote_char);
-
-
 /* Assuming TEXT is an expression in the current language, find the
    completion word point for TEXT, emulating the algorithm readline
    uses to find the word point, using the current language's word

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-03-25 18:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-25 18:30 [binutils-gdb] gdb/completion: make completion_find_completion_word static Andrew Burgess

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).