/[public]/psiconv/trunk/lib/psiconv/parse_routines.h
ViewVC logotype

Contents of /psiconv/trunk/lib/psiconv/parse_routines.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 351 - (show annotations)
Wed Oct 22 19:53:40 2014 UTC (5 years, 8 months ago) by frodo
File MIME type: text/plain
File size: 20451 byte(s)
(Frodo) Update copyright year in all source files

1 /*
2 parse_routines.h - Part of psiconv, a PSION 5 file formats converter
3 Copyright (c) 1999-2014 Frodo Looijaard <frodo@frodo.looijaard.name>
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 2 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., 675 Mass Ave, Cambridge, MA 02139, USA.
18 */
19
20 #ifndef PSICONV_PARSE_ROUTINES_H
21 #define PSICONV_PARSE_ROUTINES_H
22
23 #include <psiconv/configuration.h>
24 #include <psiconv/general.h>
25 #include <psiconv/data.h>
26 #include <psiconv/buffer.h>
27 #include <psiconv/common.h>
28 #include <psiconv/parse.h>
29
30 #ifdef __cplusplus
31 extern "C" {
32 #endif /* __cplusplus */
33
34
35 /* ******************
36 * parse_simple.c *
37 ****************** */
38
39 extern psiconv_u8 psiconv_read_u8(const psiconv_config config,
40 const psiconv_buffer buf,int lev,
41 psiconv_u32 off, int *status);
42 extern psiconv_u16 psiconv_read_u16(const psiconv_config config,
43 const psiconv_buffer buf,int lev,
44 psiconv_u32 off, int *status);
45 extern psiconv_u32 psiconv_read_u32(const psiconv_config config,
46 const psiconv_buffer buf,int lev,
47 psiconv_u32 off, int *status);
48 extern psiconv_s32 psiconv_read_sint(const psiconv_config config,
49 const psiconv_buffer buf,int lev,
50 psiconv_u32 off, int *length, int *status);
51
52 extern psiconv_u32 psiconv_read_S(const psiconv_config config,
53 const psiconv_buffer buf, int lev,
54 psiconv_u32 off, int *length, int *status);
55 extern psiconv_u32 psiconv_read_X(const psiconv_config config,
56 const psiconv_buffer buf, int lev,
57 psiconv_u32 off, int *length, int *status);
58 extern psiconv_length_t psiconv_read_length(const psiconv_config config,
59 const psiconv_buffer buf, int lev,
60 psiconv_u32 off, int *length,
61 int *status);
62 extern psiconv_size_t psiconv_read_size (const psiconv_config config,
63 const psiconv_buffer buf, int lev,
64 psiconv_u32 off, int *length,
65 int *status);
66 extern psiconv_string_t psiconv_read_string(const psiconv_config config,
67 const psiconv_buffer buf,int lev,
68 psiconv_u32 off,int *length,
69 int *status);
70 extern psiconv_string_t psiconv_read_short_string(const psiconv_config config,
71 const psiconv_buffer buf,
72 int lev,psiconv_u32 off,
73 int *length,int *status);
74 extern psiconv_string_t psiconv_read_charlist(const psiconv_config config,
75 const psiconv_buffer buf, int lev,
76 psiconv_u32 off, int nrofchars,
77 int *status);
78
79 extern int psiconv_parse_bool(const psiconv_config config,
80 const psiconv_buffer buf, int lev,
81 psiconv_u32 off, int *length,
82 psiconv_bool_t *result);
83
84 extern psiconv_float_t psiconv_read_float(const psiconv_config config,
85 const psiconv_buffer buf, int lev,
86 psiconv_u32 off, int *length, int *status);
87
88
89
90 /* ******************
91 * parse_layout.c *
92 ****************** */
93
94 extern int psiconv_parse_color(const psiconv_config config,
95 const psiconv_buffer buf, int lev,
96 psiconv_u32 off, int *length,
97 psiconv_color *result);
98
99 extern int psiconv_parse_font(const psiconv_config config,
100 const psiconv_buffer buf, int lev,
101 psiconv_u32 off, int *length,
102 psiconv_font *result);
103
104 extern int psiconv_parse_border(const psiconv_config config,
105 const psiconv_buffer buf,int lev,
106 psiconv_u32 off, int *length,
107 psiconv_border *result);
108
109 extern int psiconv_parse_bullet(const psiconv_config config,
110 const psiconv_buffer buf,int lev,
111 psiconv_u32 off, int *length,
112 psiconv_bullet *result);
113
114 extern int psiconv_parse_tab(const psiconv_config config,
115 const psiconv_buffer buf, int lev,
116 psiconv_u32 off, int *length,
117 psiconv_tab *result);
118
119 /* Note: the next two are special, because they modify an existing
120 layout structure! If it exits due to an unexpected error, part
121 of the structure may be modified, but it is still safe to call
122 psiconv_free_{paragraph,character}_layout_list on it (and that
123 is the only safe thing to do!) */
124
125 extern int psiconv_parse_paragraph_layout_list(const psiconv_config config,
126 const psiconv_buffer buf,
127 int lev, psiconv_u32 off, int *length,
128 psiconv_paragraph_layout result);
129
130 extern int psiconv_parse_character_layout_list(const psiconv_config config,
131 const psiconv_buffer buf,
132 int lev, psiconv_u32 off, int *length,
133 psiconv_character_layout result);
134
135
136 /* ****************
137 * parse_page.c *
138 **************** */
139
140 extern int psiconv_parse_page_header(const psiconv_config config,
141 const psiconv_buffer buf,int lev,
142 psiconv_u32 off, int *length,
143 psiconv_page_header *result);
144
145 extern int psiconv_parse_page_layout_section(const psiconv_config config,
146 const psiconv_buffer buf,int lev,
147 psiconv_u32 off, int *length,
148 psiconv_page_layout_section *result);
149
150 /* ******************
151 * parse_common.c *
152 ****************** */
153
154 extern int psiconv_parse_header_section(const psiconv_config config,
155 const psiconv_buffer buf,int lev,
156 psiconv_u32 off, int *length,
157 psiconv_header_section *result);
158
159 extern int psiconv_parse_section_table_section(const psiconv_config config,
160 const psiconv_buffer buf,
161 int lev, psiconv_u32 off,
162 int *length,
163 psiconv_section_table_section *result);
164
165 extern int psiconv_parse_application_id_section(const psiconv_config config,
166 const psiconv_buffer buf,
167 int lev, psiconv_u32 off, int *length,
168 psiconv_application_id_section *result);
169
170 extern int psiconv_parse_text_section(const psiconv_config config,
171 const psiconv_buffer buf,int lev,
172 psiconv_u32 off, int *length,
173 psiconv_text_and_layout *result);
174
175 extern int psiconv_parse_styled_layout_section(const psiconv_config config,
176 const psiconv_buffer buf,
177 int lev,psiconv_u32 off,
178 int *length,
179 psiconv_text_and_layout result,
180 const psiconv_word_styles_section styles);
181
182 extern int psiconv_parse_styleless_layout_section(const psiconv_config config,
183 const psiconv_buffer buf,
184 int lev,psiconv_u32 off,
185 int *length,
186 psiconv_text_and_layout result,
187 const psiconv_character_layout base_char,
188 const psiconv_paragraph_layout base_para);
189
190 extern int psiconv_parse_embedded_object_section
191 (const psiconv_config config,
192 const psiconv_buffer buf, int lev,
193 psiconv_u32 off, int *length,
194 psiconv_embedded_object_section *result);
195
196 extern int psiconv_parse_object_display_section(const psiconv_config config,
197 const psiconv_buffer buf,
198 int lev,
199 psiconv_u32 off, int *length,
200 psiconv_object_display_section *result);
201
202 extern int psiconv_parse_object_icon_section(const psiconv_config config,
203 const psiconv_buffer buf,int lev,
204 psiconv_u32 off, int *length,
205 psiconv_object_icon_section *result);
206
207
208
209
210
211 /* ******************
212 * parse_texted.c *
213 ****************** */
214
215 extern int psiconv_parse_texted_section(const psiconv_config config,
216 const psiconv_buffer buf,int lev,
217 psiconv_u32 off, int *length,
218 psiconv_texted_section *result,
219 psiconv_character_layout base_char,
220 psiconv_paragraph_layout base_para);
221
222
223 /* ****************
224 * parse_word.c *
225 **************** */
226
227 extern int psiconv_parse_word_status_section(const psiconv_config config,
228 const psiconv_buffer buf, int lev,
229 psiconv_u32 off, int *length,
230 psiconv_word_status_section *result);
231
232 extern int psiconv_parse_word_styles_section(const psiconv_config config,
233 const psiconv_buffer buf, int lev,
234 psiconv_u32 off, int *length,
235 psiconv_word_styles_section *result);
236
237
238 /* *****************
239 * parse_sheet.c *
240 ***************** */
241
242 extern int psiconv_parse_sheet_status_section(const psiconv_config config,
243 const psiconv_buffer buf, int lev,
244 psiconv_u32 off, int *length,
245 psiconv_sheet_status_section *result);
246
247 extern int psiconv_parse_sheet_formula_list(const psiconv_config config,
248 const psiconv_buffer buf, int lev,
249 psiconv_u32 off, int *length,
250 psiconv_formula_list *result);
251
252 extern int psiconv_parse_formula(const psiconv_config config,
253 const psiconv_buffer buf, int lev,
254 psiconv_u32 off, int *length,
255 psiconv_formula *result);
256
257 extern int psiconv_parse_sheet_workbook_section(const psiconv_config config,
258 const psiconv_buffer buf,
259 int lev,
260 psiconv_u32 off, int *length,
261 psiconv_sheet_workbook_section *result);
262 extern int psiconv_parse_sheet_cell(const psiconv_config config,
263 const psiconv_buffer buf, int lev,
264 psiconv_u32 off, int *length,
265 psiconv_sheet_cell *result,
266 const psiconv_sheet_cell_layout default_layout,
267 const psiconv_sheet_line_list row_default_layouts,
268 const psiconv_sheet_line_list col_default_layouts);
269
270 extern int psiconv_parse_sheet_cell_list(const psiconv_config config,
271 const psiconv_buffer buf, int lev,
272 psiconv_u32 off, int *length,
273 psiconv_sheet_cell_list *result,
274 const psiconv_sheet_cell_layout default_layout,
275 const psiconv_sheet_line_list row_default_layouts,
276 const psiconv_sheet_line_list col_default_layouts);
277
278 extern int psiconv_parse_sheet_worksheet_list(const psiconv_config config,
279 const psiconv_buffer buf,
280 int lev,
281 psiconv_u32 off, int *length,
282 psiconv_sheet_worksheet_list *result);
283
284 extern int psiconv_parse_sheet_worksheet(const psiconv_config config,
285 const psiconv_buffer buf, int lev,
286 psiconv_u32 off, int *length,
287 psiconv_sheet_worksheet *result);
288
289 extern int psiconv_parse_sheet_numberformat(const psiconv_config config,
290 const psiconv_buffer buf, int lev,
291 psiconv_u32 off, int *length,
292 psiconv_sheet_numberformat result);
293
294 extern int psiconv_parse_sheet_cell_layout(const psiconv_config config,
295 const psiconv_buffer buf, int lev,
296 psiconv_u32 off, int *length,
297 psiconv_sheet_cell_layout result);
298
299 extern int psiconv_parse_sheet_line(const psiconv_config config,
300 const psiconv_buffer buf, int lev,
301 psiconv_u32 off, int *length,
302 psiconv_sheet_line *result,
303 const psiconv_sheet_cell_layout default_layout);
304
305 extern int psiconv_parse_sheet_line_list(const psiconv_config config,
306 const psiconv_buffer buf, int lev,
307 psiconv_u32 off, int *length,
308 psiconv_sheet_line_list *result,
309 const psiconv_sheet_cell_layout default_layout);
310
311 extern int psiconv_parse_sheet_name_section(const psiconv_config config,
312 const psiconv_buffer buf, int lev,
313 psiconv_u32 off, int *length,
314 psiconv_sheet_name_section *result);
315
316 extern int psiconv_parse_sheet_info_section(const psiconv_config config,
317 const psiconv_buffer buf, int lev,
318 psiconv_u32 off, int *length,
319 psiconv_sheet_info_section *result);
320
321 extern int psiconv_parse_sheet_variable(const psiconv_config config,
322 const psiconv_buffer buf, int lev,
323 psiconv_u32 off, int *length,
324 psiconv_sheet_variable *result);
325
326 extern int psiconv_parse_sheet_variable_list(const psiconv_config config,
327 const psiconv_buffer buf, int lev,
328 psiconv_u32 off, int *length,
329 psiconv_sheet_variable_list *result);
330
331 extern int psiconv_parse_sheet_grid_section(const psiconv_config config,
332 const psiconv_buffer buf, int lev,
333 psiconv_u32 off, int *length,
334 psiconv_sheet_grid_section *result);
335
336 extern int psiconv_parse_sheet_grid_size_list(const psiconv_config config,
337 const psiconv_buffer buf, int lev,
338 psiconv_u32 off, int *length,
339 psiconv_sheet_grid_size_list *result);
340
341 extern int psiconv_parse_sheet_grid_size(const psiconv_config config,
342 const psiconv_buffer buf, int lev,
343 psiconv_u32 off, int *length,
344 psiconv_sheet_grid_size *result);
345
346 extern int psiconv_parse_sheet_grid_break_list(const psiconv_config config,
347 const psiconv_buffer buf,
348 int lev, psiconv_u32 off, int *length,
349 psiconv_sheet_grid_break_list *result);
350
351
352
353
354 /* *****************
355 * parse_image.c *
356 ***************** */
357
358 extern int psiconv_parse_paint_data_section(const psiconv_config config,
359 const psiconv_buffer buf,int lev,
360 psiconv_u32 off, int *length,
361 int isclipart,
362 psiconv_paint_data_section *result);
363
364 extern int psiconv_parse_jumptable_section(const psiconv_config config,
365 const psiconv_buffer buf,int lev,
366 psiconv_u32 off, int *length,
367 psiconv_jumptable_section *result);
368
369 extern int psiconv_parse_sketch_section(const psiconv_config config,
370 const psiconv_buffer buf, int lev,
371 psiconv_u32 off, int *length,
372 psiconv_sketch_section *result);
373
374 extern int psiconv_parse_clipart_section(const psiconv_config config,
375 const psiconv_buffer buf, int lev,
376 psiconv_u32 off, int *length,
377 psiconv_clipart_section *result);
378
379
380
381
382
383 /* ****************
384 * parse_driver.c *
385 **************** */
386
387 extern int psiconv_parse_texted_file(const psiconv_config config,
388 const psiconv_buffer buf,int lev,
389 psiconv_u32 off, psiconv_texted_f *result);
390
391 extern int psiconv_parse_word_file(const psiconv_config config,
392 const psiconv_buffer buf,int lev,
393 psiconv_u32 off, psiconv_word_f *result);
394
395 extern int psiconv_parse_mbm_file(const psiconv_config config,
396 const psiconv_buffer buf,int lev,
397 psiconv_u32 off, psiconv_mbm_f *result);
398
399 extern int psiconv_parse_sketch_file(const psiconv_config config,
400 const psiconv_buffer buf,int lev,
401 psiconv_u32 off, psiconv_sketch_f *result);
402
403 extern int psiconv_parse_clipart_file(const psiconv_config config,
404 const psiconv_buffer buf,int lev,
405 psiconv_u32 off, psiconv_clipart_f *result);
406 extern int psiconv_parse_sheet_file(const psiconv_config config,
407 const psiconv_buffer buf,int lev,
408 psiconv_u32 off, psiconv_sheet_f *result);
409
410 #ifdef __cplusplus
411 }
412 #endif /* __cplusplus */
413
414 #endif /* PSICONV_PARSE_ROUTINES_H */

frodo@frodo.looijaard.name
ViewVC Help
Powered by ViewVC 1.1.26