]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Fix formatting of long function description in chew output
authorTom Tromey <tom@tromey.com>
Fri, 17 Feb 2023 19:12:11 +0000 (12:12 -0700)
committerTom Tromey <tom@tromey.com>
Mon, 20 Feb 2023 21:35:15 +0000 (14:35 -0700)
commitee0e1723013527bfea4116f2fb8428add2e5343c
treedf514dc1de0c75108fab81b483bf45925d47e41a
parentc22ff449275c91e4842bb10c650e83c572580f65
Fix formatting of long function description in chew output

Currently, if a function description spans a line, the resulting info
can look like this:

 -- Function: long bfd_canonicalize_reloc
     (bfd *abfd, asection *sec, arelent **loc, asymbol **syms); Call the
     back end associated with the open BFD ABFD and translate the
     external form of the relocation information attached to SEC into
     the internal canonical form.  Place the table into memory at LOC,

That is, the function prototype runs together with the text in an ugly
way.  This patch fixes this by introducing a new primitive, so that
the generated Texinfo can be a bit nicer.  Now this output looks like:

 -- Function: long bfd_canonicalize_reloc (bfd *abfd, asection *sec,
          arelent **loc, asymbol **syms);
     Call the back end associated with the open BFD ABFD and translate
     the external form of the relocation information attached to SEC

2023-02-17  Tom Tromey  <tom@tromey.com>

* doc/doc.str (SYNOPSIS): Use collapse_whitespace.
* doc/chew.c (collapse_whitespace): New function.
(main): Register collapse_whitespace.
bfd/ChangeLog
bfd/doc/chew.c
bfd/doc/doc.str