From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1726) id 488393858408; Mon, 25 Mar 2024 18:30:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 488393858408 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1711391405; bh=2u5THahaqnwEXQdkNF0ZRmwvK4ibXG4DP0qkh5RDAAQ=; h=From:To:Subject:Date:From; b=a6it2n5O7E8EWdANeuC1hwLE6DWzZKf/gbVkxUaTmySlT41s7cVfv3JY1ndpwqzBy 4G6/4V9mWE8H4W0JvHkwISIVF1ShMH1qntSZrmTs5iq4kKey8MJ5QhuZxYOPNb+Yfq 8BLwIs+tXBZJ5XnQnf3PeVI1DnuHNYpWpsALNXgk= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Andrew Burgess To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb/completion: make completion_find_completion_word static X-Act-Checkin: binutils-gdb X-Git-Author: Andrew Burgess X-Git-Refname: refs/heads/master X-Git-Oldrev: c66e8e5c8d2a0bf68d9af65f3e4823eb01862f56 X-Git-Newrev: 10c58fd8df4b3cbdadd536fbccb39ed111c594c2 Message-Id: <20240325183005.488393858408@sourceware.org> Date: Mon, 25 Mar 2024 18:30:05 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D10c58fd8df4b= 3cbdadd536fbccb39ed111c594c2 commit 10c58fd8df4b3cbdadd536fbccb39ed111c594c2 Author: Andrew Burgess Date: Tue Feb 13 12:19:00 2024 +0000 gdb/completion: make completion_find_completion_word static =20 I noticed that completion_find_completion_word is only used within completer.c, so lets make it static. =20 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 @@ =20 #include "completer.h" =20 +/* Forward declarations. */ +static const char *completion_find_completion_word (completion_tracker &tr= acker, + const char *text, + int *quote_char); + /* See completer.h. */ =20 class completion_tracker::completion_hash_entry @@ -1955,9 +1960,14 @@ gdb_completion_word_break_characters () return NULL; } =20 -/* 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. */ =20 -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); =20 -/* 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 &tr= acker, - 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