From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id OPpTEIZE6GXOyToAWB0awg (envelope-from ) for ; Wed, 06 Mar 2024 05:25:10 -0500 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=OBf/XvDf; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 3B36A1E0D2; Wed, 6 Mar 2024 05:25:10 -0500 (EST) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 278BE1E092 for ; Wed, 6 Mar 2024 05:25:08 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A22483858012 for ; Wed, 6 Mar 2024 10:25:07 +0000 (GMT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 5FBAF3858032 for ; Wed, 6 Mar 2024 10:24:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5FBAF3858032 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 5FBAF3858032 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709720647; cv=none; b=rkB8m9Nk+3zbKHfJtjqrJpTxuv0fyD6hpiAW/fU2fK8WhYq81HMEXAA0g3p6whtc21UjxxUOH5X+WvDKqgDR0xfz74lcjRBjvOPYiKH6R7hBKgpp12mpbWnJSyCEE+841ggqYGpM/RPlh10DqK/1u9iJNUgPc+i+1inuprL9u+k= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709720647; c=relaxed/simple; bh=PVnjcS7IzxSnDc7baZve6gpGeulwFBYQwirAC4Lgias=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=aViweMbWjT2H3Bj83IbcgqWfIz+As+dx7c/6NzPNtxHsoffnSB3M4KYEb2S8Hmb8ds6la9YL9l6YPpnxyalJzX0/hQWk0TkhZAqRneAN9VKqeMSVK/sdN59BP3x4mfcEUvHIeAhSB5GyUbVv8kfeDMoj0Q09yXAvov6PuIFHUdk= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1709720645; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JHD3E/ia7Bb4ql10ZjRjpuIp8lVPthuoAuZOlntU3CE=; b=OBf/XvDf+RZoVvvUS+Eyuy27aZddDVR0vArr26UQjoQwYWVIS09LEFlLzUjk1bfpRz4atk 0///ydZ79QOzsHyqWtomUjHQ20jAejnwE2Wlc1CS6B+qLu143lY8IMHPM4MxSl5CO1rZKm ctk8i98XVO4WRHNzT1yNGvNDIrsuWFg= Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-654-zRmMFqR4NuuO2ZJT_qyEZA-1; Wed, 06 Mar 2024 05:24:03 -0500 X-MC-Unique: zRmMFqR4NuuO2ZJT_qyEZA-1 Received: by mail-ej1-f69.google.com with SMTP id a640c23a62f3a-a449be9db59so283937366b.1 for ; Wed, 06 Mar 2024 02:24:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709720641; x=1710325441; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JHD3E/ia7Bb4ql10ZjRjpuIp8lVPthuoAuZOlntU3CE=; b=Z+SV9FRwSs/H5I2Ic1321euNxPbLZoX3R3wzbx4nl1GfkMUbwPLZIv7We/WmP3p4Pr oM9eSafwgV9+TqcehaD7SrJvnS+xPhPGG2q5kGj0vK5NIvd82YORGvPNH0I7WhYQNzfV iK0GCh1alLihNtf/YU8Aa7h/MYnPv3xJxCdVvhz9SLX5uemTllDlN5Dk7Yi4ZVv5fFXZ 9WbBH/knju7gXUn+uM8x+cYzdQvg+BXyvwfRalX0+jDJZ/0RTvunb5wUyQqtQJElk3op SBNsb+brtyMrFzLGCZGg4A3pcTH2i2x2ZfS4OfVRBxj8ympEjNUHcsNIcqtQUw0atMsA Fhtg== X-Gm-Message-State: AOJu0YwBKJD/VYAkLW3PT1bPWp17ITw9VXsxbyOae4zi/tfMVKWeo6oL MdbeQVz/WM4T7ntnaogxQrc/bmBb/TP34ghub4PYTu4LrHBfdGzUEqxajKEWairzoOwpZ4CnDxr 7gZp4FzFb+UtINcmnHc/bP+BB7lIdLArZ7I9fw8lIw5Y3aMDAX6TK73uXTRr/GwG+RE/83f3VRw pyh8u7VAA6d2wohYMVdoX14BxNyat8rCEXmStrbR/nRVY= X-Received: by 2002:a17:906:5795:b0:a45:bdd9:c2cc with SMTP id k21-20020a170906579500b00a45bdd9c2ccmr696084ejq.41.1709720641436; Wed, 06 Mar 2024 02:24:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IFtTBdMB+MZbS8bRTkyRdR1x0dY9B6HLPm4c7r76G6GOt3vfHs+JA0gBM88obRx0ppw/4ClHg== X-Received: by 2002:a17:906:5795:b0:a45:bdd9:c2cc with SMTP id k21-20020a170906579500b00a45bdd9c2ccmr696069ejq.41.1709720640984; Wed, 06 Mar 2024 02:24:00 -0800 (PST) Received: from localhost (185.223.159.143.dyn.plus.net. [143.159.223.185]) by smtp.gmail.com with ESMTPSA id d1-20020a170906544100b00a45bda3cbb8sm403919ejp.134.2024.03.06.02.24.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Mar 2024 02:24:00 -0800 (PST) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCHv2 6/7] gdb/completion: make completion_find_completion_word static Date: Wed, 6 Mar 2024 10:23:38 +0000 Message-Id: X-Mailer: git-send-email 2.25.4 In-Reply-To: References: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org 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. --- 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 -- 2.25.4