/[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 71 - (show annotations)
Fri Dec 22 22:31:50 2000 UTC (19 years, 2 months ago) by frodo
File MIME type: text/plain
File size: 9498 byte(s)
(Frodo) First generate routines! Reshuffled a few things to make it all work out

1 /*
2 parse_routines.h - Part of psiconv, a PSION 5 file formats converter
3 Copyright (c) 1999, 2000 Frodo Looijaard <frodol@dds.nl>
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/general.h>
24 #include <psiconv/common.h>
25 #include <psiconv/data.h>
26
27 #ifdef __cplusplus
28 extern "C" {
29 #endif /* __cplusplus */
30
31
32 /* ******************
33 * parse_simple.c *
34 ****************** */
35
36 extern psiconv_u8 psiconv_read_u8(const psiconv_buffer buf,int lev,
37 psiconv_u32 off, int *status);
38 extern psiconv_u16 psiconv_read_u16(const psiconv_buffer buf,int lev,
39 psiconv_u32 off, int *status);
40 extern psiconv_u32 psiconv_read_u32(const psiconv_buffer buf,int lev,
41 psiconv_u32 off, int *status);
42
43 extern psiconv_S_t psiconv_read_S(const psiconv_buffer buf, int lev,
44 psiconv_u32 off, int *length, int *status);
45 extern psiconv_X_t psiconv_read_X(const psiconv_buffer buf, int lev,
46 psiconv_u32 off, int *length, int *status);
47 extern psiconv_length_t psiconv_read_length(const psiconv_buffer buf, int lev,
48 psiconv_u32 off, int *length,
49 int *status);
50 extern psiconv_size_t psiconv_read_size (const psiconv_buffer buf, int lev,
51 psiconv_u32 off, int *length,
52 int *status);
53 extern psiconv_string_t psiconv_read_string(const psiconv_buffer buf,int lev,
54 psiconv_u32 off,int *length,
55 int *status);
56
57 extern int psiconv_parse_bool(const psiconv_buffer buf, int lev,
58 psiconv_u32 off, int *length,
59 psiconv_bool_t *result);
60
61
62 /* ******************
63 * parse_layout.c *
64 ****************** */
65
66 extern int psiconv_parse_color(const psiconv_buffer buf, int lev,
67 psiconv_u32 off, int *length,
68 psiconv_color *result);
69
70 extern int psiconv_parse_font(const psiconv_buffer buf, int lev,
71 psiconv_u32 off, int *length,
72 psiconv_font *result);
73
74 extern int psiconv_parse_border(const psiconv_buffer buf,int lev,
75 psiconv_u32 off, int *length,
76 psiconv_border *result);
77
78 extern int psiconv_parse_bullet(const psiconv_buffer buf,int lev,
79 psiconv_u32 off, int *length,
80 psiconv_bullet *result);
81
82 extern int psiconv_parse_tab(const psiconv_buffer buf, int lev,
83 psiconv_u32 off, int *length,
84 psiconv_tab *result);
85
86 /* Note: the next two are special, because they modify an existing
87 layout structure! If it exits due to an unexpected error, part
88 of the structure may be modified, but it is still safe to call
89 psiconv_free_{paragraph,character}_layout_list on it (and that
90 is the only safe thing to do!) */
91
92 extern int psiconv_parse_paragraph_layout_list(const psiconv_buffer buf,
93 int lev, psiconv_u32 off, int *length,
94 psiconv_paragraph_layout result);
95
96 extern int psiconv_parse_character_layout_list(const psiconv_buffer buf,
97 int lev, psiconv_u32 off, int *length,
98 psiconv_character_layout result);
99
100
101 /* ****************
102 * parse_page.c *
103 **************** */
104
105 extern int psiconv_parse_page_header(const psiconv_buffer buf,int lev,
106 psiconv_u32 off, int *length,
107 psiconv_page_header *result);
108
109 extern int psiconv_parse_page_layout_section(const psiconv_buffer buf,int lev,
110 psiconv_u32 off, int *length,
111 psiconv_page_layout_section *result);
112
113 /* ******************
114 * parse_common.c *
115 ****************** */
116
117 extern int psiconv_parse_header_section(const psiconv_buffer buf,int lev,
118 psiconv_u32 off, int *length,
119 psiconv_header_section *result);
120
121 extern int psiconv_parse_section_table_section(const psiconv_buffer buf,
122 int lev, psiconv_u32 off,
123 int *length,
124 psiconv_section_table_section *result);
125
126 extern int psiconv_parse_application_id_section(const psiconv_buffer buf,
127 int lev, psiconv_u32 off, int *length,
128 psiconv_application_id_section *result);
129
130 extern int psiconv_parse_text_section(const psiconv_buffer buf,int lev,
131 psiconv_u32 off, int *length,
132 psiconv_text_and_layout *result);
133
134 extern int psiconv_parse_styled_layout_section(const psiconv_buffer buf,
135 int lev,psiconv_u32 off,
136 int *length,
137 psiconv_text_and_layout result,
138 psiconv_word_styles_section styles);
139 extern int psiconv_parse_styleless_layout_section(const psiconv_buffer buf,
140 int lev,psiconv_u32 off,
141 int *length,
142 psiconv_text_and_layout result,
143 psiconv_character_layout base_char,
144 psiconv_paragraph_layout base_para);
145
146
147 /* ******************
148 * parse_texted.c *
149 ****************** */
150
151 extern int psiconv_parse_texted_section(const psiconv_buffer buf,int lev,
152 psiconv_u32 off, int *length,
153 psiconv_texted_section *result,
154 psiconv_character_layout base_char,
155 psiconv_paragraph_layout base_para);
156
157
158 /* ****************
159 * parse_word.c *
160 **************** */
161
162 extern int psiconv_parse_word_status_section(const psiconv_buffer buf, int lev,
163 psiconv_u32 off, int *length,
164 psiconv_word_status_section *result);
165
166 extern int psiconv_parse_word_styles_section(const psiconv_buffer buf, int lev,
167 psiconv_u32 off, int *length,
168 psiconv_word_styles_section *result);
169
170
171 /* *****************
172 * parse_image.c *
173 ***************** */
174
175 extern int psiconv_parse_paint_data_section(const psiconv_buffer buf,int lev,
176 psiconv_u32 off, int *length,
177 int isclipart,
178 psiconv_paint_data_section *result);
179
180 extern int psiconv_parse_jumptable_section(const psiconv_buffer buf,int lev,
181 psiconv_u32 off, int *length,
182 psiconv_jumptable_section *result);
183 extern int psiconv_parse_sketch_section(const psiconv_buffer buf, int lev,
184 psiconv_u32 off, int *length, int is_object,
185 psiconv_sketch_section *result);
186 extern int psiconv_parse_clipart_section(const psiconv_buffer buf, int lev,
187 psiconv_u32 off, int *length,
188 psiconv_clipart_section *result);
189
190
191
192
193
194 /* ****************
195 * parse_driver.c *
196 **************** */
197
198 extern int psiconv_parse_texted_file(const psiconv_buffer buf,int lev,
199 psiconv_u32 off, psiconv_texted_f *result);
200
201 extern int psiconv_parse_word_file(const psiconv_buffer buf,int lev,
202 psiconv_u32 off, psiconv_word_f *result);
203
204 extern int psiconv_parse_mbm_file(const psiconv_buffer buf,int lev,
205 psiconv_u32 off, psiconv_mbm_f *result);
206
207 extern int psiconv_parse_sketch_file(const psiconv_buffer buf,int lev,
208 psiconv_u32 off, psiconv_sketch_f *result);
209
210 extern int psiconv_parse_clipart_file(const psiconv_buffer buf,int lev,
211 psiconv_u32 off, psiconv_clipart_f *result);
212 #ifdef __cplusplus
213 }
214 #endif /* __cplusplus */
215
216 #endif /* PSICONV_PARSE_ROUTINES_H */

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