1 |
/* |
2 |
parse_routines.h - Part of psiconv, a PSION 5 file formats converter |
3 |
Copyright (c) 1999 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/parse.h> |
24 |
|
25 |
#ifdef __cplusplus |
26 |
extern "C" { |
27 |
#endif /* __cplusplus */ |
28 |
|
29 |
|
30 |
/* *************** |
31 |
* misc.c * |
32 |
*************** */ |
33 |
|
34 |
/* This function returns a copy of a string, that contains no ASCII codes |
35 |
that are not printable. You should free this string yourself when you are |
36 |
done with it. Returns NULL if there is not enough memory left. */ |
37 |
extern char *psiconv_make_printable(const char *s); |
38 |
|
39 |
/* ************** |
40 |
* checkuid.c * |
41 |
************** */ |
42 |
|
43 |
extern psiconv_u32 psiconv_checkuid(psiconv_u32 uid1, |
44 |
psiconv_u32 uid2,psiconv_u32 uid3); |
45 |
|
46 |
/* ****************** |
47 |
* parse_simple.c * |
48 |
****************** */ |
49 |
|
50 |
extern psiconv_u8 psiconv_read_u8(const psiconv_buffer buf,int lev, |
51 |
psiconv_u32 off); |
52 |
extern psiconv_u16 psiconv_read_u16(const psiconv_buffer buf,int lev, |
53 |
psiconv_u32 off); |
54 |
extern psiconv_u32 psiconv_read_u32(const psiconv_buffer buf,int lev, |
55 |
psiconv_u32 off); |
56 |
|
57 |
extern psiconv_S_t psiconv_read_S(const psiconv_buffer buf, int lev, |
58 |
psiconv_u32 off, int *length); |
59 |
extern psiconv_X_t psiconv_read_X(const psiconv_buffer buf, int lev, |
60 |
psiconv_u32 off, int *length); |
61 |
extern psiconv_length_t psiconv_read_length(const psiconv_buffer buf, int lev, |
62 |
psiconv_u32 off, int *length); |
63 |
extern psiconv_size_t psiconv_read_size (const psiconv_buffer buf, int lev, |
64 |
psiconv_u32 off, int *length); |
65 |
extern psiconv_string_t psiconv_read_string(const psiconv_buffer buf,int lev, |
66 |
psiconv_u32 off,int *length); |
67 |
|
68 |
extern int psiconv_parse_bool(const psiconv_buffer buf, int lev, |
69 |
psiconv_u32 off, int *length, |
70 |
psiconv_bool_t *result); |
71 |
|
72 |
|
73 |
/* ****************** |
74 |
* parse_layout.c * |
75 |
****************** */ |
76 |
|
77 |
extern int psiconv_parse_color(const psiconv_buffer buf, int lev, |
78 |
psiconv_u32 off, int *length, |
79 |
psiconv_color *result); |
80 |
|
81 |
extern int psiconv_parse_font(const psiconv_buffer buf, int lev, |
82 |
psiconv_u32 off, int *length, |
83 |
psiconv_font *result); |
84 |
|
85 |
extern int psiconv_parse_border(const psiconv_buffer buf,int lev, |
86 |
psiconv_u32 off, int *length, |
87 |
psiconv_border *result); |
88 |
|
89 |
extern int psiconv_parse_bullet(const psiconv_buffer buf,int lev, |
90 |
psiconv_u32 off, int *length, |
91 |
psiconv_bullet *result); |
92 |
|
93 |
extern int psiconv_parse_tab(const psiconv_buffer buf, int lev, |
94 |
psiconv_u32 off, int *length, |
95 |
psiconv_tab *result); |
96 |
|
97 |
extern int psiconv_parse_paragraph_layout_list(const psiconv_buffer buf, |
98 |
int lev, psiconv_u32 off, int *length, |
99 |
psiconv_paragraph_layout result); |
100 |
|
101 |
extern int psiconv_parse_character_layout_list(const psiconv_buffer buf, |
102 |
int lev, psiconv_u32 off, int *length, |
103 |
psiconv_character_layout result); |
104 |
|
105 |
|
106 |
/* **************** |
107 |
* parse_page.c * |
108 |
**************** */ |
109 |
|
110 |
extern int psiconv_parse_page_header(const psiconv_buffer buf,int lev, |
111 |
psiconv_u32 off, int *length, |
112 |
psiconv_page_header *result); |
113 |
|
114 |
extern int psiconv_parse_page_layout_section(const psiconv_buffer buf,int lev, |
115 |
psiconv_u32 off, int *length, |
116 |
psiconv_page_layout_section *result); |
117 |
|
118 |
/* ****************** |
119 |
* parse_common.c * |
120 |
****************** */ |
121 |
|
122 |
extern int psiconv_parse_header_section(const psiconv_buffer buf,int lev, |
123 |
psiconv_u32 off, int *length, |
124 |
psiconv_header_section *result); |
125 |
|
126 |
extern int psiconv_parse_section_table_section(const psiconv_buffer buf, |
127 |
int lev, psiconv_u32 off, |
128 |
int *length, |
129 |
psiconv_section_table_section *result); |
130 |
|
131 |
extern int psiconv_parse_application_id_section(const psiconv_buffer buf, |
132 |
int lev, psiconv_u32 off, int *length, |
133 |
psiconv_application_id_section *result); |
134 |
|
135 |
extern int psiconv_parse_text_section(const psiconv_buffer buf,int lev, |
136 |
psiconv_u32 off, int *length, |
137 |
psiconv_text_and_layout *result); |
138 |
|
139 |
extern int psiconv_parse_styled_layout_section(const psiconv_buffer buf, |
140 |
int lev,psiconv_u32 off, |
141 |
int *length, |
142 |
psiconv_text_and_layout result, |
143 |
psiconv_word_styles_section styles); |
144 |
extern int psiconv_parse_styleless_layout_section(const psiconv_buffer buf, |
145 |
int lev,psiconv_u32 off, |
146 |
int *length, |
147 |
psiconv_text_and_layout result, |
148 |
psiconv_character_layout base_char, |
149 |
psiconv_paragraph_layout base_para); |
150 |
|
151 |
|
152 |
/* ****************** |
153 |
* parse_texted.c * |
154 |
****************** */ |
155 |
|
156 |
extern int psiconv_parse_texted_section(const psiconv_buffer buf,int lev, |
157 |
psiconv_u32 off, int *length, |
158 |
psiconv_texted_section *result, |
159 |
psiconv_character_layout base_char, |
160 |
psiconv_paragraph_layout base_para); |
161 |
|
162 |
|
163 |
/* **************** |
164 |
* parse_word.c * |
165 |
**************** */ |
166 |
|
167 |
extern int psiconv_parse_word_status_section(const psiconv_buffer buf, int lev, |
168 |
psiconv_u32 off, int *length, |
169 |
psiconv_word_status_section *result); |
170 |
|
171 |
extern int psiconv_parse_word_styles_section(const psiconv_buffer buf, int lev, |
172 |
psiconv_u32 off, int *length, |
173 |
psiconv_word_styles_section *result); |
174 |
|
175 |
|
176 |
/* ***************** |
177 |
* parse_image.c * |
178 |
***************** */ |
179 |
|
180 |
extern int psiconv_parse_paint_data_section(const psiconv_buffer buf,int lev, |
181 |
psiconv_u32 off, int *length, |
182 |
int isclipart, |
183 |
psiconv_paint_data_section *result); |
184 |
|
185 |
extern int psiconv_parse_jumptable_section(const psiconv_buffer buf,int lev, |
186 |
psiconv_u32 off, int *length, |
187 |
psiconv_jumptable_section *result); |
188 |
extern int psiconv_parse_sketch_section(const psiconv_buffer buf, int lev, |
189 |
psiconv_u32 off, int *length, int is_object, |
190 |
psiconv_sketch_section *result); |
191 |
extern int psiconv_parse_clipart_section(const psiconv_buffer buf, int lev, |
192 |
psiconv_u32 off, int *length, |
193 |
psiconv_clipart_section *result); |
194 |
|
195 |
|
196 |
|
197 |
|
198 |
|
199 |
/* **************** |
200 |
* parse_driver.c * |
201 |
**************** */ |
202 |
|
203 |
extern int psiconv_parse_texted_file(const psiconv_buffer buf,int lev, |
204 |
psiconv_u32 off, psiconv_texted_f *result); |
205 |
|
206 |
extern int psiconv_parse_word_file(const psiconv_buffer buf,int lev, |
207 |
psiconv_u32 off, psiconv_word_f *result); |
208 |
|
209 |
extern int psiconv_parse_mbm_file(const psiconv_buffer buf,int lev, |
210 |
psiconv_u32 off, psiconv_mbm_f *result); |
211 |
|
212 |
extern int psiconv_parse_sketch_file(const psiconv_buffer buf,int lev, |
213 |
psiconv_u32 off, psiconv_sketch_f *result); |
214 |
|
215 |
extern int psiconv_parse_clipart_file(const psiconv_buffer buf,int lev, |
216 |
psiconv_u32 off, psiconv_clipart_f *result); |
217 |
#ifdef __cplusplus |
218 |
} |
219 |
#endif /* __cplusplus */ |
220 |
|
221 |
#endif /* PSICONV_PARSE_ROUTINES_H */ |