mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-14 20:46:12 +08:00

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.
151 lines
3.1 KiB
Plaintext
151 lines
3.1 KiB
Plaintext
- Source extraction program for chew.
|
|
- Copyright (C) 1990-2023 Free Software Foundation, Inc.
|
|
- This file is part of BFD, the Binary File Descriptor library.
|
|
|
|
- This program is free software; you can redistribute it and/or modify
|
|
- it under the terms of the GNU General Public License as published by
|
|
- the Free Software Foundation; either version 3 of the License, or
|
|
- (at your option) any later version.
|
|
|
|
- This program is distributed in the hope that it will be useful,
|
|
- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
- GNU General Public License for more details.
|
|
|
|
- You should have received a copy of the GNU General Public License
|
|
- along with this program; if not, write to the Free Software
|
|
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
: SYNOPSIS
|
|
skip_past_newline
|
|
get_stuff_in_command
|
|
indent
|
|
maybecatstr
|
|
;
|
|
|
|
: ignore
|
|
skip_past_newline
|
|
get_stuff_in_command
|
|
outputdots
|
|
maybecatstr
|
|
;
|
|
|
|
: CODE_FRAGMENT
|
|
ignore ;
|
|
|
|
: external
|
|
0 internalmode ! ignore ;
|
|
|
|
: internal
|
|
1 internalmode ! ignore ;
|
|
|
|
- input stack { a b } output b if internal, a if external
|
|
: ifinternal
|
|
"" swap 1 internalmode ! maybecatstr
|
|
swap
|
|
"" swap 0 internalmode ! maybecatstr
|
|
catstr
|
|
;
|
|
|
|
- Put note in output string, regardless of internal mode.
|
|
: COMMENT
|
|
skip_past_newline
|
|
get_stuff_in_command
|
|
translatecomments
|
|
catstr
|
|
;
|
|
|
|
- SENUM enum-type-name
|
|
- ENUM enum-name
|
|
- ENUMX addl-enum-name
|
|
- ENUMDOC doc for preceding enums
|
|
- ENDSENUM max-enum-name
|
|
|
|
: make_enum_header
|
|
dup
|
|
"enum " swap catstr
|
|
" {\n" catstr
|
|
swap " _dummy_first_" swap catstr catstr
|
|
",\n" catstr
|
|
;
|
|
: make_string_table_header
|
|
dup
|
|
"#ifdef _BFD_MAKE_TABLE_" swap catstr swap
|
|
"\n\nstatic const char *const " swap catstr catstr
|
|
"_names[] = { \"@@uninitialized@@\",\n" catstr
|
|
;
|
|
: SENUM
|
|
skip_past_newline
|
|
copy_past_newline
|
|
remchar
|
|
dup
|
|
make_enum_header
|
|
swap
|
|
make_string_table_header
|
|
ifinternal
|
|
catstr
|
|
get_stuff_in_command catstr
|
|
translatecomments ;
|
|
: ENDSENUM
|
|
skip_past_newline
|
|
copy_past_newline strip_trailing_newlines
|
|
dup
|
|
" " swap catstr " };\n" catstr swap
|
|
" \"@@overflow: " swap catstr "@@\",\n};\n#endif\n\n" catstr
|
|
ifinternal
|
|
catstr
|
|
;
|
|
: make_enumerator
|
|
" " swap catstr
|
|
",\n" catstr
|
|
;
|
|
: make_enumerator_string
|
|
" \"" swap catstr
|
|
"\",\n" catstr
|
|
;
|
|
: ENUM
|
|
skip_past_newline
|
|
copy_past_newline
|
|
remchar
|
|
dup
|
|
make_enumerator
|
|
swap
|
|
make_enumerator_string
|
|
ifinternal
|
|
;
|
|
: ENUMX ENUM catstr ;
|
|
: ENUMEQ
|
|
skip_past_newline
|
|
"#define "
|
|
copy_past_newline remchar
|
|
catstr
|
|
" "
|
|
catstr
|
|
copy_past_newline
|
|
catstr
|
|
"" swap 0 internalmode ! maybecatstr
|
|
;
|
|
: ENUMEQX ENUMEQ catstr ;
|
|
: ENUMDOC
|
|
skip_past_newline
|
|
get_stuff_in_command
|
|
strip_trailing_newlines
|
|
"\n{* " swap catstr " *}\n" catstr
|
|
translatecomments
|
|
- discard it if we're doing internal mode
|
|
"" swap 0 internalmode ! maybecatstr
|
|
swap
|
|
catstr catstr
|
|
;
|
|
: ENDDD external ;
|
|
: SECTION ignore ;
|
|
: SUBSECTION ignore ;
|
|
: SUBSUBSECTION ignore ;
|
|
: INTERNAL_DEFINITION internal ;
|
|
: DESCRIPTION ignore ;
|
|
: FUNCTION external ;
|
|
: TYPEDEF external ;
|
|
: INTERNAL_FUNCTION internal ;
|
|
: INTERNAL internal ;
|
|
: INODE ignore ;
|