]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Remove the paramstuff word
authorTom Tromey <tom@tromey.com>
Tue, 7 Feb 2023 18:52:24 +0000 (11:52 -0700)
committerTom Tromey <tom@tromey.com>
Wed, 15 Feb 2023 17:27:34 +0000 (10:27 -0700)
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
bfd/doc/chew.c
bfd/doc/proto.str

index a1f975392b738c9fbacc4681e63eb54fde1e22c7..9b8e1fc637370eefe5fd2ddd2ff1c029e66baca9 100644 (file)
@@ -1,3 +1,9 @@
+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.
+
 2023-02-07  Tom Tromey  <tom@tromey.com>
 
        * doc/doc.str, doc/proto.str: Add copyright header.
index 8ada35fdcec360dd91d30c85738ee9376ffd4ece..df522225b3fe9729fe2b04be995790632ee9bcb2 100644 (file)
@@ -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);
index a9533526d6c2f78a653be5b014aff27dca37806f..7bebbc26f8f54ed719bd593eaebb072ae3671732 100644 (file)
@@ -19,7 +19,6 @@
 : SYNOPSIS
        skip_past_newline
        get_stuff_in_command    
-       paramstuff
        indent
        maybecatstr
 ;