1- Documentation extraction program for chew.
2-  Copyright (C) 1990-2024 Free Software Foundation, Inc.
3-  This file is part of BFD, the Binary File Descriptor library.
4
5-  This program is free software; you can redistribute it and/or modify
6-  it under the terms of the GNU General Public License as published by
7-  the Free Software Foundation; either version 3 of the License, or
8-  (at your option) any later version.
9
10-  This program is distributed in the hope that it will be useful,
11-  but WITHOUT ANY WARRANTY; without even the implied warranty of
12-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13-  GNU General Public License for more details.
14
15-  You should have received a copy of the GNU General Public License
16-  along with this program; if not, write to the Free Software
17-  Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
18
19- chew.c keywords defined here put output into doc/*.texi files
20- from comments in the source.  See also proto.str.
21
22-  True if SYNOPSIS was seen.
23variable synopsis_seen
24
25: DOCDD
26          skip_past_newline
27          get_stuff_in_command kill_bogus_lines catstr
28          ;
29
30: ENDDD
31          skip_past_newline
32          ;
33
34: EXAMPLE
35          skip_past_newline
36          get_stuff_in_command kill_bogus_lines do_fancy_stuff translatecomments
37          courierize catstr
38          ;
39
40: INODE
41          "@node " catstr skip_past_newline copy_past_newline catstr
42          ;
43
44: CODE_FRAGMENT
45          EXAMPLE
46          ;
47
48: COMMENT
49          skip_past_newline
50          get_stuff_in_command
51          drop
52          ;
53
54: SYNOPSIS
55          skip_past_newline
56          1 synopsis_seen !
57          "@deftypefn {Function} " catstr
58          get_stuff_in_command
59          kill_bogus_lines
60          collapse_whitespace
61          indent
62          catstr
63          "\n" catstr
64          ;
65
66: func
67          "@findex "          - a
68          skip_past_newline
69          copy_past_newline
70          dup                 - a x x
71          "@subsubsection @code{" - a x x b
72          swap
73          remchar
74          "}\n" - a x b x c
75          catstr    catstr    catstr    catstr    catstr
76          ;
77
78: bodytext
79          get_stuff_in_command
80          bulletize
81          kill_bogus_lines
82          do_fancy_stuff
83          courierize
84          catstr
85          "\n" catstr
86          ;
87
88: asection
89          skip_past_newline
90          catstr
91          copy_past_newline
92          do_fancy_stuff catstr
93          bodytext
94          ;
95
96: SECTION
97          "@section " asection  ;
98
99: SUBSECTION
100          "@subsection " asection  ;
101
102: SUBSUBSECTION
103          "@subsubsection " asection  ;
104
105: subhead
106          skip_past_newline
107          bodytext
108          ;
109
110: DESCRIPTION
111          subhead
112          "@end deftypefn\n" synopsis_seen @ catstrif
113          0 synopsis_seen !
114          ;
115
116: FUNCTION
117          func ;
118
119: INTERNAL_FUNCTION
120          func ;
121
122: DEFINITION
123          func ;
124
125: INTERNAL_DEFINITION
126          func ;
127
128: EXTERNAL
129          COMMENT ;
130
131: INTERNAL
132          COMMENT ;
133
134: SENUM
135          skip_past_newline
136          "Here are the possible values for @code{enum "
137          copy_past_newline remchar catstr
138          "}:\n\n" catstr catstr
139          ;
140: ENUM
141          skip_past_newline
142          "@deffn {} "
143          copy_past_newline catstr catstr
144          ;
145: ENUMX
146          skip_past_newline
147          "@deffnx {} "
148          copy_past_newline catstr
149          catstr
150          ;
151: ENUMEQ
152          skip_past_newline
153          "@deffn {} "
154          copy_past_newline catstr catstr
155          skip_past_newline
156          ;
157: ENUMEQX
158          skip_past_newline
159          "@deffnx {} "
160          copy_past_newline catstr
161          catstr
162          skip_past_newline
163          ;
164: ENUMDOC
165          skip_past_newline
166          get_stuff_in_command
167          strip_trailing_newlines
168          catstr
169          "\n@end deffn\n" catstr
170          ;
171