From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2126) id F191D3858D35; Wed, 15 Feb 2023 17:28:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F191D3858D35 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Tom Tromey To: bfd-cvs@sourceware.org Subject: [binutils-gdb] Remove the paramstuff word X-Act-Checkin: binutils-gdb X-Git-Author: Tom Tromey X-Git-Refname: refs/heads/master X-Git-Oldrev: 910081a313017d880733c9405ac0f58648da7b6a X-Git-Newrev: 2e60790cf7c27d79f90f2dcb81e1930dc980bc1c Message-Id: <20230215172835.F191D3858D35@sourceware.org> Date: Wed, 15 Feb 2023 17:28:35 +0000 (GMT) X-BeenThere: binutils-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Feb 2023 17:28:36 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D2e60790cf7c2= 7d79f90f2dcb81e1930dc980bc1c commit 2e60790cf7c27d79f90f2dcb81e1930dc980bc1c Author: Tom Tromey Date: Tue Feb 7 11:52:24 2023 -0700 Remove the paramstuff word =20 The chew "paramstuff" word has been a no-op since: =20 commit c58b95236ce4c9345c4fa76e7ef16762e5229380 Author: Alan Modra Date: Sun Jun 29 10:06:40 2003 +0000 =20 Convert to C90 and a few tweaks. =20 Remove it and its one use. =20 2023-02-07 Tom Tromey =20 * doc/proto.str (SYNOPSIS): Don't use paramstuff. * doc/chew.c (paramstuff): Remove. (main): Don't add paramstuff intrinsic. Diff: --- bfd/ChangeLog | 6 +++++ bfd/doc/chew.c | 80 ---------------------------------------------------= ---- bfd/doc/proto.str | 1 - 3 files changed, 6 insertions(+), 81 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index a1f975392b7..9b8e1fc6373 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2023-02-07 Tom Tromey + + * doc/proto.str (SYNOPSIS): Don't use paramstuff. + * doc/chew.c (paramstuff): Remove. + (main): Don't add paramstuff intrinsic. + 2023-02-07 Tom Tromey =20 * doc/doc.str, doc/proto.str: Add copyright header. 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 =3D=3D internal_wanted, discard value in any case translatecomments - turn {* and *} into comment delimiters @@ -453,84 +452,6 @@ print_stack_level (void) pc++; } =20 -/* 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 =3D 0; at (tos, openp) !=3D '(' && at (tos, openp); openp= ++) - ; - - fname =3D 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) !=3D '*') - fname--; - - fname++; - - /* Output type, omitting trailing whitespace character(s), if - any. */ - for (len =3D fname; 0 < len; len--) - { - if (!isspace ((unsigned char) at (tos, len - 1))) - break; - } - for (idx =3D 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 =3D openp; 0 < len; len--) - { - if (!isspace ((unsigned char) at (tos, len - 1))) - break; - } - for (idx =3D fname; idx < len; idx++) - catchar (&out, at (tos, idx)); - - cattext (&out, " PARAMS ("); - - for (idx =3D openp; at (tos, idx) && at (tos, idx) !=3D ';'; idx++) - catchar (&out, at (tos, idx)); - - cattext (&out, ");\n\n"); - } - overwrite_string (tos, &out); - pc++; - -} - /* turn {* and *} into comments */ =20 @@ -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=09 - paramstuff indent maybecatstr ;