]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
bfd-in2.h BFD_RELOC_* comments
authorAlan Modra <amodra@gmail.com>
Sat, 21 Oct 2023 07:24:59 +0000 (17:54 +1030)
committerAlan Modra <amodra@gmail.com>
Sun, 22 Oct 2023 23:32:53 +0000 (10:02 +1030)
commit23cdc1d6da5841510166cb5ee08ac97c0a388dcb
treee5f9f0575669a1a88fd25850f40bdc6dea5a8575
parente2c04ee000796100890bd176eeb2412f722b7e3f
bfd-in2.h BFD_RELOC_* comments

I noticed the regenerated BFD_RELOC_MICROBLAZE_32_NONE comment didn't
match that committed to bfd-in2.h, and was just going to regen
bfd-in2.h but then decided to do something about the silly formatting
of these comments in bfd-in2.h.  eg. the BFD_RELOC_MICROBLAZE_32_NONE
comment:

-/* This is a 32 bit reloc that stores the 32 bit pc relative
-value in two words (with an imm instruction).No relocation is
-done here - only used for relaxing  */
+  /* This is a 32 bit reloc that stores the 32 bit pc relative value in
+     two words (with an imm instruction).  No relocation is done here -
+     only used for relaxing.  */
   BFD_RELOC_MICROBLAZE_32_NONE,

You'll notice how the second and third line of the original comment
aren't indented properly relative to the first line, and the whole
comment needs to be indented to match the code.

I've also edited reloc.c ENUMDOC paragraphs.  Some of these had excess
indentation, presumably in an attempt to properly indent bfd-in2.h
comments but that fails due to chew.c removing leading whitespace
early by skip_white_and_stars.  COMMENT was used in reloc.c to add
extra blank lines in bfd-in2.h.  I've removed them too as I don't
think they add anything to readability of that file.  (Perhaps more
usefully, they also add blank lines to libbfd.h separating relocs for
one target from others, but this isn't done consistently.)

* doc/chew.c (drop, idrop): Move earlier.
(strip_trailing_newlines): Check index before accessing array,
not after.
(wrap_comment): New function.
(main): Add "wrap_comment" intrinsic.
* doc/proto.str (ENUMDOC): Use wrap_comment.
(make_enum_header, ENDSENUM): Put start and end braces on
separate lines.
* reloc.c: Remove uses of COMMENT and edit ENUMDOC paragraphs.
* libbfd.h: Regenerate.
* bfd-in2.h: Regenerate.
bfd/bfd-in2.h
bfd/doc/chew.c
bfd/doc/proto.str
bfd/libbfd.h
bfd/reloc.c