From: Tom Tromey <tom@tromey.com>
To: binutils@sourceware.org
Cc: Tom Tromey <tom@tromey.com>
Subject: [PATCH 4/8] Remove the paramstuff word
Date: Wed, 8 Feb 2023 00:17:21 -0700 [thread overview]
Message-ID: <20230208071725.3668898-5-tom@tromey.com> (raw)
In-Reply-To: <20230208071725.3668898-1-tom@tromey.com>
The chew "paramstuff" word has been a no-op since:
commit c58b95236ce4c9345c4fa76e7ef16762e5229380
Author: Alan Modra <amodra@gmail.com>
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 <tom@tromey.com>
* 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
next prev parent reply other threads:[~2023-02-08 7:17 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-08 7:17 [PATCH 0/8] Make the BFD info manual a bit prettier Tom Tromey
2023-02-08 7:17 ` [PATCH 1/8] Remove H_CFLAGS from doc/local.mk Tom Tromey
2023-02-08 7:17 ` [PATCH 2/8] Simplify @node use in BFD documentation Tom Tromey
2023-03-03 8:20 ` Jan Beulich
2023-03-03 23:08 ` Tom Tromey
2023-03-06 7:07 ` Jan Beulich
2023-02-08 7:17 ` [PATCH 3/8] Add copyright headers to the .str files Tom Tromey
2023-02-08 7:17 ` Tom Tromey [this message]
2023-02-08 7:17 ` [PATCH 5/8] Use intptr_t rather than long in chew Tom Tromey
2023-02-08 7:17 ` [PATCH 6/8] Change internalmode to be an intrinsic variable Tom Tromey
2023-02-08 7:17 ` [PATCH 7/8] Use @deftypefn in chew output Tom Tromey
2023-02-15 17:55 ` Simon Marchi
2023-02-15 23:11 ` Tom Tromey
2023-02-16 1:29 ` Simon Marchi
2023-02-19 3:46 ` Alan Modra
2023-02-08 7:17 ` [PATCH 8/8] Remove RETURNS from BFD chew comments Tom Tromey
2023-02-15 9:54 ` [PATCH 0/8] Make the BFD info manual a bit prettier Nick Clifton
2023-02-15 21:51 ` Tom Tromey
2023-02-16 9:40 ` Nick Clifton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230208071725.3668898-5-tom@tromey.com \
--to=tom@tromey.com \
--cc=binutils@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).