]>
Commit | Line | Data |
---|---|---|
910081a3 TT |
1 | - Documentation extraction program for chew. |
2 | - Copyright (C) 1990-2023 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 | ||
b8e81f19 TT |
19 | - True if SYNOPSIS was seen. |
20 | variable synopsis_seen | |
21 | ||
252b5132 RH |
22 | : DOCDD |
23 | skip_past_newline | |
24 | get_stuff_in_command kill_bogus_lines catstr | |
25 | ; | |
26 | ||
27 | : ENDDD | |
28 | skip_past_newline | |
29 | ; | |
30 | ||
31 | : EXAMPLE | |
32 | skip_past_newline | |
33 | get_stuff_in_command kill_bogus_lines do_fancy_stuff translatecomments | |
34 | courierize catstr | |
35 | ||
36 | ; | |
37 | ||
38 | : INODE | |
39 | "@node " catstr skip_past_newline copy_past_newline catstr | |
40 | ; | |
41 | ||
42 | : CODE_FRAGMENT | |
43 | EXAMPLE | |
44 | ; | |
45 | ||
46 | : COMMENT | |
47 | skip_past_newline | |
48 | get_stuff_in_command | |
49 | drop | |
50 | ; | |
51 | ||
52 | : SYNOPSIS | |
53 | skip_past_newline | |
b8e81f19 TT |
54 | 1 synopsis_seen ! |
55 | "@deftypefn {Function} " catstr | |
252b5132 RH |
56 | get_stuff_in_command |
57 | kill_bogus_lines | |
ee0e1723 | 58 | collapse_whitespace |
252b5132 RH |
59 | indent |
60 | catstr | |
ee0e1723 | 61 | "\n" catstr |
252b5132 RH |
62 | ; |
63 | ||
64 | : func | |
65 | "@findex " - a | |
66 | skip_past_newline | |
67 | copy_past_newline | |
68 | dup - a x x | |
69 | "@subsubsection @code{" - a x x b | |
70 | swap | |
71 | remchar | |
72 | "}\n" - a x b x c | |
73 | catstr catstr catstr catstr catstr | |
74 | ; | |
75 | ||
76 | : FUNCTION | |
dbe7ee1a | 77 | func |
252b5132 RH |
78 | ; |
79 | ||
80 | : bodytext | |
81 | get_stuff_in_command | |
82 | bulletize | |
83 | kill_bogus_lines | |
84 | do_fancy_stuff | |
85 | courierize | |
86 | catstr | |
87 | "\n" catstr | |
88 | ; | |
89 | ||
90 | : asection | |
91 | skip_past_newline | |
92 | catstr | |
93 | copy_past_newline | |
94 | do_fancy_stuff catstr | |
95 | bodytext | |
96 | ; | |
97 | ||
98 | : SECTION | |
99 | "@section " asection ; | |
100 | ||
101 | : SUBSECTION | |
102 | "@subsection " asection ; | |
103 | ||
104 | : SUBSUBSECTION | |
105 | "@subsubsection " asection ; | |
106 | ||
107 | : subhead | |
108 | skip_past_newline | |
109 | bodytext | |
110 | ; | |
111 | ||
112 | ||
113 | ||
114 | ||
115 | : DESCRIPTION | |
b8e81f19 TT |
116 | subhead |
117 | "@end deftypefn\n" synopsis_seen @ catstrif | |
118 | 0 synopsis_seen ! | |
119 | ; | |
252b5132 | 120 | |
252b5132 RH |
121 | : INTERNAL_FUNCTION |
122 | func ; | |
123 | ||
124 | ||
125 | : INTERNAL_DEFINITION | |
126 | func ; | |
127 | ||
128 | ||
129 | : INTERNAL | |
130 | func ; | |
131 | ||
132 | : TYPEDEF | |
133 | FUNCTION ; | |
134 | ||
135 | : SENUM | |
136 | skip_past_newline | |
137 | "Here are the possible values for @code{enum " | |
138 | copy_past_newline remchar catstr | |
139 | "}:\n\n" catstr catstr | |
140 | ; | |
141 | : ENUM | |
142 | skip_past_newline | |
143 | "@deffn {} " | |
144 | copy_past_newline catstr catstr | |
145 | ; | |
146 | : ENUMX | |
147 | skip_past_newline | |
148 | "@deffnx {} " | |
149 | copy_past_newline catstr | |
150 | catstr | |
151 | ; | |
152 | : ENUMEQ | |
153 | skip_past_newline | |
154 | "@deffn {} " | |
155 | copy_past_newline catstr catstr | |
156 | skip_past_newline | |
157 | ; | |
158 | : ENUMEQX | |
159 | skip_past_newline | |
160 | "@deffnx {} " | |
161 | copy_past_newline catstr | |
162 | catstr | |
163 | skip_past_newline | |
164 | ; | |
165 | : ENUMDOC | |
166 | skip_past_newline | |
167 | get_stuff_in_command | |
168 | strip_trailing_newlines | |
169 | catstr | |
170 | "\n@end deffn\n" catstr | |
171 | ; |