From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gproxy1-pub.mail.unifiedlayer.com (gproxy1-pub.mail.unifiedlayer.com [69.89.25.95]) by sourceware.org (Postfix) with ESMTPS id 0E5523858C50 for ; Wed, 8 Feb 2023 07:17:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0E5523858C50 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com Received: from cmgw11.mail.unifiedlayer.com (unknown [10.0.90.126]) by progateway3.mail.pro1.eigbox.com (Postfix) with ESMTP id 4A1F61003F23E for ; Wed, 8 Feb 2023 07:17:44 +0000 (UTC) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTP id Pei8pbPBozuwQPei8pBJBp; Wed, 08 Feb 2023 07:17:44 +0000 X-Authority-Reason: nr=8 X-Authority-Analysis: v=2.4 cv=Jts0EO0C c=1 sm=1 tr=0 ts=63e34c98 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=m04uMKEZRckA:10:nop_rcvd_month_year a=Qbun_eYptAEA:10:endurance_base64_authed_username_1 a=pGLkceISAAAA:8 a=zstS-IiYAAAA:8 a=8y2lh6vX7my8G-upan4A:9 a=4G6NA9xxw8l3yy4pmD5M:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=gEv+OORh19IA+v+7pzVI97OBCiQmqkF4kTy3IOGOJlc=; b=pgHcFouSboN8ovMIq4NscBG0QE +L7SM200SLsnCv+M0qBBPOYhNqPWRo08PhY+P3c3EBbfkZSr3XxkJW2YCO3fzeoNeKXqhXJXUY1aI V5nasbzPhIVC9JW/Fs8hEdVzh; Received: from 75-166-130-93.hlrn.qwest.net ([75.166.130.93]:55392 helo=localhost.localdomain) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1pPei7-002znH-Uq; Wed, 08 Feb 2023 00:17:43 -0700 From: Tom Tromey To: binutils@sourceware.org Cc: Tom Tromey Subject: [PATCH 4/8] Remove the paramstuff word Date: Wed, 8 Feb 2023 00:17:21 -0700 Message-Id: <20230208071725.3668898-5-tom@tromey.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230208071725.3668898-1-tom@tromey.com> References: <20230208071725.3668898-1-tom@tromey.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 75.166.130.93 X-Source-L: No X-Exim-ID: 1pPei7-002znH-Uq X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 75-166-130-93.hlrn.qwest.net (localhost.localdomain) [75.166.130.93]:55392 X-Source-Auth: tom+tromey.com X-Email-Count: 5 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-Spam-Status: No, score=-3028.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,GIT_PATCH_0,JMQ_SPF_NEUTRAL,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: The chew "paramstuff" word has been a no-op since: commit c58b95236ce4c9345c4fa76e7ef16762e5229380 Author: Alan Modra Date: Sun Jun 29 10:06:40 2003 +0000 Convert to C90 and a few tweaks. Remove it and its one use. 2023-02-07 Tom Tromey * doc/proto.str (SYNOPSIS): Don't use paramstuff. * doc/chew.c (paramstuff): Remove. (main): Don't add paramstuff intrinsic. --- bfd/ChangeLog | 6 ++++ bfd/doc/chew.c | 80 ----------------------------------------------- bfd/doc/proto.str | 1 - 3 files changed, 6 insertions(+), 81 deletions(-) diff --git a/bfd/doc/chew.c b/bfd/doc/chew.c index 8ada35fdcec..df522225b3f 100644 --- a/bfd/doc/chew.c +++ b/bfd/doc/chew.c @@ -65,7 +65,6 @@ exit - fn chew_exit swap outputdots - strip out lines without leading dots - paramstuff - convert full declaration into "PARAMS" form if not already maybecatstr - do catstr if internal_mode == internal_wanted, discard value in any case translatecomments - turn {* and *} into comment delimiters @@ -453,84 +452,6 @@ print_stack_level (void) pc++; } -/* turn: - foobar name(stuff); - into: - foobar - name PARAMS ((stuff)); - and a blank line. - */ - -static void -paramstuff (void) -{ - unsigned int openp; - unsigned int fname; - unsigned int idx; - unsigned int len; - string_type out; - init_string (&out); - -#define NO_PARAMS 1 - - /* Make sure that it's not already param'd or proto'd. */ - if (NO_PARAMS - || find (tos, "PARAMS") || find (tos, "PROTO") || !find (tos, "(")) - { - catstr (&out, tos); - } - else - { - /* Find the open paren. */ - for (openp = 0; at (tos, openp) != '(' && at (tos, openp); openp++) - ; - - fname = openp; - /* Step back to the fname. */ - fname--; - while (fname && isspace ((unsigned char) at (tos, fname))) - fname--; - while (fname - && !isspace ((unsigned char) at (tos,fname)) - && at (tos,fname) != '*') - fname--; - - fname++; - - /* Output type, omitting trailing whitespace character(s), if - any. */ - for (len = fname; 0 < len; len--) - { - if (!isspace ((unsigned char) at (tos, len - 1))) - break; - } - for (idx = 0; idx < len; idx++) - catchar (&out, at (tos, idx)); - - cattext (&out, "\n"); /* Insert a newline between type and fnname */ - - /* Output function name, omitting trailing whitespace - character(s), if any. */ - for (len = openp; 0 < len; len--) - { - if (!isspace ((unsigned char) at (tos, len - 1))) - break; - } - for (idx = fname; idx < len; idx++) - catchar (&out, at (tos, idx)); - - cattext (&out, " PARAMS ("); - - for (idx = openp; at (tos, idx) && at (tos, idx) != ';'; idx++) - catchar (&out, at (tos, idx)); - - cattext (&out, ");\n\n"); - } - overwrite_string (tos, &out); - pc++; - -} - /* turn {* and *} into comments */ @@ -1504,7 +1425,6 @@ main (int ac, char *av[]) add_intrinsic ("exit", chew_exit); add_intrinsic ("swap", swap); add_intrinsic ("outputdots", outputdots); - add_intrinsic ("paramstuff", paramstuff); add_intrinsic ("maybecatstr", maybecatstr); add_intrinsic ("translatecomments", translatecomments); add_intrinsic ("kill_bogus_lines", kill_bogus_lines); diff --git a/bfd/doc/proto.str b/bfd/doc/proto.str index a9533526d6c..7bebbc26f8f 100644 --- a/bfd/doc/proto.str +++ b/bfd/doc/proto.str @@ -19,7 +19,6 @@ : SYNOPSIS skip_past_newline get_stuff_in_command - paramstuff indent maybecatstr ; -- 2.39.1