Age | Commit message (Collapse) | Author | Files | Lines |
|
The "drop" call in wrap_comment already increments pc. Defining DOCDD
in proto.str is a warning fix.
PR 31314
* chew.c (wrap_comment): Don't increment pc.
* proto.str (DOCDD): Define.
|
|
Adds two new external authors to etc/update-copyright.py to cover
bfd/ax_tls.m4, and adds gprofng to dirs handled automatically, then
updates copyright messages as follows:
1) Update cgen/utils.scm emitted copyrights.
2) Run "etc/update-copyright.py --this-year" with an extra external
author I haven't committed, 'Kalray SA.', to cover gas testsuite
files (which should have their copyright message removed).
3) Build with --enable-maintainer-mode --enable-cgen-maint=yes.
4) Check out */po/*.pot which we don't update frequently.
|
|
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/doc/chew.c extracts documentation from source code comments
annotated with keywords, and generates much of bfd.h and libbfd.h from
those same comments. The docs have suffered from people (me too)
adding things like CODE_FRAGMENT to the source to put code into bfd.h
without realising that CODE_FRAGMENT also puts @example around said
code into the docs. So we have random senseless things in the docs.
This patch fixes that problem (well, the senseless things from
CODE_FRAGMENT), moves most of the code out of bfd-in.h, and improves a
few chew.c features. libbfd.h now automatically gets ATTRIBUTE_HIDDEN
prototypes, and indentation in bfd.h and libbfd.h is better.
|
|
When reading the BFD manual, I noticed text like this:
-- Function: bool bfd_close (bfd *abfd);
Close a BFD. If the BFD was open for writing, then pending
operations are completed and the file written out and closed. If
...
*Returns*
'TRUE' is returned if all is ok, otherwise 'FALSE'.
The *Returns*, like the *Synopsis* in the earlier patch, is
un-info-like. It's also used inconsistently.
This patch removes all the uses of the RETURNS word and removes it
entirely from the chew scripts. Now this example reads:
-- Function: bool bfd_close (bfd *abfd);
Close a BFD. If the BFD was open for writing, then pending
operations are completed and the file written out and closed. If
...
'TRUE' is returned if all is ok, otherwise 'FALSE'.
In a few cases I had to slightly reword the comment. There were also
a couple of cases where there was redundant text. In these cases I
just dropped the RETURNS copy.
2023-02-07 Tom Tromey <tom@tromey.com>
* bfd.c, cache.c, compress.c, opncls.c: Remove RETURNS from
documentation comments.
* doc/doc.str, doc/proto.str (RETURNS): Remove.
|
|
Currently, internalmode is a special word to set an internal state
variable. Because this series adds variables anyway, change this to
be a variable instead.
I saw some commits in the history that made sure that chew did not
leak memory, so I put some extra effort into trying to handle this for
variables as well.
2023-02-07 Tom Tromey <tom@tromey.com>
* doc/proto.str (external, internal, ifinternal, ENUMEQ, ENUMDOC):
Update.
* doc/chew.c (internalmode): Remove.
(add_intrinsic_variable): New function.
(main): Add internalmode as intrinsic.
(internal_mode): Remove global.
(maybecatstr): Update.
(free_words): Free variables.
|
|
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.
|
|
The .str script files don't have copyright headers, but I think they
should. I used the same dates that chew.c uses, which I think makes
sense because these are inputs to chew.
2023-02-07 Tom Tromey <tom@tromey.com>
* doc/doc.str, doc/proto.str: Add copyright header.
|
|
|
|
|