Added options to make Robodoc more customizable.
[robodoc.git] / Source / headers.h
1 #ifndef ROBODOC_HEADERS_H
2 #define ROBODOC_HEADERS_H
3
4 /*
5 Copyright (C) 1994-2007  Frans Slothouber, Jacco van Weert, Petteri Kettunen,
6 Bernd Koesling, Thomas Aglassinger, Anthon Pang, Stefan Kost, David Druffner,
7 Sasha Vasko, Kai Hofmann, Thierry Pierron, Friedrich Haase, and Gergely Budai.
8
9 This file is part of ROBODoc
10
11 ROBODoc is free software; you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by
13 the Free Software Foundation; either version 3 of the License, or
14 (at your option) any later version.
15
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 GNU General Public License for more details.
20
21 You should have received a copy of the GNU General Public License
22 along with this program.  If not, see <http://www.gnu.org/licenses/>.
23
24 */
25
26
27 /****s* Headers/RB_header
28  *  FUNCTION
29  *    This structure is used to store the headers that are extracted
30  *    from the source files.
31  *  MODIFICATION HISTORY
32  *    * 8. August 1995: Koessi changed int version to char *version
33  *  ATTRIBUTES
34  *    * next          -- used to store RB_headers in a RB_Part as
35  *                     a linked list.
36  *    * parent        -- the parent of this header
37  *    * name          -- the full name of the header
38  *                     modulename/functionname [versioninfo]
39  *    * owner         -- the Part that owns this header.
40  *    * htype         -- the type of this header.
41  *    * items         -- pointers to the items in this header.
42  *    * version       -- unused
43  *    * function_name -- the functionname ( a better name would
44  *                       be objectname or  thingy name,
45  *                     it is the name of the thing that is
46  *                     being documented ).
47  *    * module_name   -- the modulename
48  *    * unique_name   -- unique name used for labels.
49  *    * file_name     -- documentation file of this header.
50  *    * lines         -- content of the header
51  *    * no_lines      -- number of lines in the content.
52  *    * line_number   -- the line number at which the header was
53  *                     found in the source file.
54  *  SOURCE
55  */
56
57 struct RB_header
58 {
59     struct RB_header   *next;
60     struct RB_header   *parent;
61     struct RB_Part     *owner;
62     struct RB_HeaderType *htype;
63     struct RB_Item     *items;
64     int                 is_internal;
65     char               *name;
66     char              **names;
67     int                 no_names;
68     char               *version;
69     char               *function_name;
70     char               *module_name;
71     char               *unique_name;
72     char               *file_name;
73     char              **lines;
74     int                 no_lines;
75     int                 line_number;
76 };
77
78 /*********/
79
80 /****d* Headers/src_constants
81  * NAME
82  *   src_constants -- numerals for header_markers
83  * NOTE
84  *   Most of them seem to be unused at the moment.
85  *   But it's better to keep it up to date for the
86  *   eventuality of a later use by robohdrs.
87  * SOURCE
88  */
89
90 #define SRC_C        0
91 #define SRC_ACM      1          /* Added by David White for Aspen Custom Modeller */
92 #define SRC_CPP      2          /* All values incremented 1 to allow for ACM */
93 #define SRC_PASCAL   3
94 #define SRC_PASCAL2  4
95 #define SRC_APLUS    5          /* David White for Aspen Plus */
96 #define SRC_ASM      6
97 #define SRC_ASM2     7
98 #define SRC_FORTRAN  8
99 #define SRC_BASIC    9
100 #define SRC_TEX      10
101 #define SRC_SCRIPT   11
102 #define SRC_COBOL    12
103 #define SRC_OCCAM    13
104 #define SRC_HTML     14
105 #define SRC_HTML2    15
106 #define SRC_GNUASM   16
107 #define SRC_F902     17
108 #define SRC_F90      18
109 #define SRC_VB       20
110 #define SRC_DBC      21
111
112 /*********/
113
114 /****d* Headers/src_remark_constants
115  * NAME
116  *   src_remark_constants -- numerals for remark_markers
117  * NOTE
118  *   Most of them seem to be unused at the moment.
119  *   But it's better to keep it up to date for the
120  *   eventuality of a later use by robohdrs.
121  * SOURCE
122  */
123
124 #define SRC_R_C        0
125 #define SRC_R_ACM      1        /* Added by David White for Aspen Custom Modeller */
126 #define SRC_R_CPP      2        /* All values incremented 1 to allow for ACM */
127 #define SRC_R_PASCAL   3        /* PASCAL and PASCAL2 were 1, should have been 2, incr to 3 */
128 #define SRC_R_PASCAL2  3
129 #define SRC_R_APLUS    4        /* David White for Aspen Plus */
130 #define SRC_R_ASM      5
131 #define SRC_R_ASM2     6
132 #define SRC_R_FORTRAN  7
133 #define SRC_R_BASIC    8
134 #define SRC_R_TEX      9
135 #define SRC_R_SCRIPT   10
136 #define SRC_R_COBOL    11
137 #define SRC_R_OCCAM    12
138 #define SRC_R_GNUASM   13
139 #define SRC_R_F902     14
140 #define SRC_R_F90      15
141 #define SRC_R_VB       17
142 #define SRC_R_DBC      18
143 #define SRC_R_HTML     19       /* NULL */
144 #define SRC_R_HTML2    19       /* NULL */
145
146 /*********/
147
148 /****d* Headers/end_remark_constants [3.0h]
149  * NAME
150  *   end_remark_constants -- numerals for end_markers
151  * NOTE
152  *   Most of them seem to be unused at the moment.  But it's better to
153  *   keep it up to date for the eventuality of a later use by
154  *   robohdrs.
155  * SOURCE
156  */
157
158 #define SRC_E_C        0
159 #define SRC_E_ACM      1        /* Added by David White for Aspen Custom Modeller */
160 #define SRC_E_CPP      2        /* All values incremented 1 to allow for ACM */
161 #define SRC_E_PASCAL   4
162 #define SRC_E_PASCAL2  5
163 #define SRC_E_APLUS    6        /* David White for Aspen Plus */
164 #define SRC_E_ASM      7
165 #define SRC_E_ASM2     8
166 #define SRC_E_FORTRAN  9
167 #define SRC_E_BASIC    10
168 #define SRC_E_TEX      11
169 #define SRC_E_SCRIPT   12
170 #define SRC_E_COBOL    13
171 #define SRC_E_OCCAM    14
172 #define SRC_E_HTML     15
173 #define SRC_E_HTML2    16
174 #define SRC_E_GNUASM   17
175 #define SRC_E_F902     18
176 #define SRC_E_F90      19
177 #define SRC_E_VB       21
178 #define SRC_E_DBC      22
179
180
181 /*********/
182
183 extern char        *robo_header;        /* Added by DavidCD */
184 extern char        *robo_end[]; /* Added by DavidCD */
185 extern char        *header_markers[];
186 extern char        *remark_markers[];
187 extern char        *end_markers[];
188 extern char        *end_remark_markers[];
189 extern char        *RB_header_type_names[];
190 extern char        *RB_internal_header_type_names[];
191
192 int                 RB_Is_Begin_Marker(
193     char *cur_line,
194     char **type );
195 int                 RB_Is_End_Marker(
196     char *cur_line );
197 void                RB_Header_Lock_Reset(
198     void );
199 void                RB_Item_Lock_Reset(
200     void );
201 char               *RB_Skip_Remark_Marker(
202     char *lline_buffer );
203 int                 RB_Has_Remark_Marker(
204     char *lline_buffer );
205
206 int                 RB_Is_Remark_End_Marker(
207     char *cur_line );
208 int                 RB_Is_Remark_Begin_Marker(
209     char *cur_line );
210 char               *RB_Skip_Remark_Begin_Marker(
211     char *cur_line );
212 char               *RB_Skip_Remark_End_Marker(
213     char *cur_line );
214
215 #endif /* ROBODOC_HEADERS_H */