… | |
… | |
23 | #include <stdlib.h> |
23 | #include <stdlib.h> |
24 | |
24 | |
25 | #include "error.h" |
25 | #include "error.h" |
26 | #include "generate_routines.h" |
26 | #include "generate_routines.h" |
27 | |
27 | |
|
|
28 | #ifdef DMALLOC |
|
|
29 | #include <dmalloc.h> |
|
|
30 | #endif |
28 | |
31 | |
29 | int psiconv_write(psiconv_buffer *buf,const psiconv_file value) |
32 | |
|
|
33 | int psiconv_write(const psiconv_config config, psiconv_buffer *buf, |
|
|
34 | const psiconv_file value) |
30 | { |
35 | { |
31 | int allocated = 0; |
|
|
32 | int res; |
36 | int res; |
33 | |
37 | |
34 | if (!value) { |
38 | if (!value) { |
35 | psiconv_warn(0,0,"Can't parse to an empty buffer!"); |
39 | psiconv_warn(config,0,0,"Can't parse to an empty buffer!"); |
36 | return -PSICONV_E_OTHER; |
40 | return -PSICONV_E_OTHER; |
37 | } |
41 | } |
38 | if (!*buf) { |
|
|
39 | if (!(*buf = psiconv_new_buffer())) |
42 | if (!(*buf = psiconv_buffer_new())) |
40 | return -PSICONV_E_NOMEM; |
43 | return -PSICONV_E_NOMEM; |
41 | allocated = 1; |
|
|
42 | } |
|
|
43 | |
44 | |
|
|
45 | if (value->type == psiconv_word_file) { |
|
|
46 | if ((res = psiconv_write_header_section(config,*buf,PSICONV_ID_PSION5, |
|
|
47 | PSICONV_ID_DATA_FILE, |
|
|
48 | PSICONV_ID_WORD))) |
|
|
49 | goto ERROR; |
|
|
50 | if ((res =psiconv_write_word_file(config,*buf,(psiconv_word_f) (value->file)))) |
|
|
51 | goto ERROR; |
|
|
52 | } else if (value->type == psiconv_texted_file) { |
|
|
53 | if ((res = psiconv_write_header_section(config,*buf,PSICONV_ID_PSION5, |
|
|
54 | PSICONV_ID_DATA_FILE, |
|
|
55 | PSICONV_ID_TEXTED))) |
|
|
56 | goto ERROR; |
|
|
57 | if ((res =psiconv_write_texted_file(config,*buf, |
|
|
58 | (psiconv_texted_f) (value->file)))) |
|
|
59 | goto ERROR; |
|
|
60 | } else if (value->type == psiconv_sketch_file) { |
|
|
61 | if ((res = psiconv_write_header_section(config,*buf,PSICONV_ID_PSION5, |
|
|
62 | PSICONV_ID_DATA_FILE, |
|
|
63 | PSICONV_ID_SKETCH))) |
|
|
64 | goto ERROR; |
|
|
65 | if ((res =psiconv_write_sketch_file(config,*buf, |
|
|
66 | (psiconv_sketch_f) (value->file)))) |
|
|
67 | goto ERROR; |
|
|
68 | } else if (value->type == psiconv_mbm_file) { |
|
|
69 | if ((res = psiconv_write_header_section(config,*buf,PSICONV_ID_PSION5, |
|
|
70 | PSICONV_ID_MBM_FILE, |
|
|
71 | 0x00000000))) |
|
|
72 | goto ERROR; |
|
|
73 | if ((res =psiconv_write_mbm_file(config,*buf, |
|
|
74 | (psiconv_mbm_f) (value->file)))) |
|
|
75 | goto ERROR; |
44 | #if 0 |
76 | #if 0 |
45 | if (value->type == psiconv_word_file) { |
|
|
46 | if ((res =psiconv_write_word_file(*buf,(psiconv_word_f) (value->file)))) |
|
|
47 | goto ERROR; |
|
|
48 | } else |
|
|
49 | #endif |
|
|
50 | if (value->type == psiconv_texted_file) { |
|
|
51 | if ((res =psiconv_write_texted_file(*buf, |
|
|
52 | (psiconv_texted_f) (value->file)))) |
|
|
53 | goto ERROR; |
|
|
54 | #if 0 |
|
|
55 | } else if (value->type == psiconv_sketch_file) { |
|
|
56 | if ((res =psiconv_write_texted_file(*buf, |
|
|
57 | (psiconv_sketch_f) (value->file)))) |
|
|
58 | goto ERROR; |
|
|
59 | } else if (value->type == psiconv_mbm_file) { |
|
|
60 | if ((res =psiconv_write_texted_file(*buf, |
|
|
61 | (psiconv_mbm_f) (value->file)))) |
|
|
62 | goto ERROR; |
|
|
63 | } else if (value->type == psiconv_clipart_file) { |
77 | } else if (value->type == psiconv_clipart_file) { |
64 | if ((res =psiconv_write_texted_file(*buf, |
78 | if ((res =psiconv_write_clipart_file(config,*buf, |
65 | (psiconv_clipart_f) (value->file)))) |
79 | (psiconv_clipart_f) (value->file)))) |
66 | goto ERROR; |
80 | goto ERROR; |
67 | #endif |
81 | #endif |
68 | } else { |
82 | } else { |
69 | psiconv_warn(0,0,"Unknown or unsupported file type"); |
83 | psiconv_warn(config,0,0,"Unknown or unsupported file type"); |
70 | res = -PSICONV_E_GENERATE; |
84 | res = -PSICONV_E_GENERATE; |
71 | goto ERROR; |
85 | goto ERROR; |
72 | } |
86 | } |
|
|
87 | if ((res = psiconv_buffer_resolve(*buf))) |
|
|
88 | goto ERROR; |
73 | return -PSICONV_E_OK; |
89 | return -PSICONV_E_OK; |
74 | |
90 | |
75 | ERROR: |
91 | ERROR: |
76 | if (allocated) |
|
|
77 | psiconv_free_buffer(*buf); |
92 | psiconv_buffer_free(*buf); |
78 | return res; |
93 | return res; |
79 | } |
94 | } |
80 | |
95 | |
81 | int psiconv_write_texted_file(psiconv_buffer buf,psiconv_texted_f value) |
96 | int psiconv_write_texted_file(const psiconv_config config, |
|
|
97 | psiconv_buffer buf,psiconv_texted_f value) |
82 | { |
98 | { |
83 | psiconv_character_layout base_char; |
99 | psiconv_character_layout base_char; |
84 | psiconv_paragraph_layout base_para; |
100 | psiconv_paragraph_layout base_para; |
85 | int res; |
101 | int res; |
86 | psiconv_buffer extra_buf; |
|
|
87 | psiconv_section_table_section section_table; |
102 | psiconv_section_table_section section_table; |
88 | psiconv_section_table_entry entry; |
103 | psiconv_section_table_entry entry; |
|
|
104 | psiconv_u32 section_table_id; |
|
|
105 | psiconv_buffer buf_texted; |
89 | |
106 | |
90 | if (!value) { |
107 | if (!value) { |
91 | psiconv_warn(0,0,"Null TextEd file"); |
108 | psiconv_warn(config,0,0,"Null TextEd file"); |
92 | return -PSICONV_E_GENERATE; |
109 | return -PSICONV_E_GENERATE; |
93 | } |
110 | } |
94 | |
111 | |
95 | if (!(section_table = psiconv_list_new(sizeof(*entry)))) { |
112 | if (!(section_table = psiconv_list_new(sizeof(*entry)))) { |
96 | res = -PSICONV_E_NOMEM; |
113 | res = -PSICONV_E_NOMEM; |
… | |
… | |
100 | if (!(entry = malloc(sizeof(*entry)))) { |
117 | if (!(entry = malloc(sizeof(*entry)))) { |
101 | res = -PSICONV_E_NOMEM; |
118 | res = -PSICONV_E_NOMEM; |
102 | goto ERROR2; |
119 | goto ERROR2; |
103 | } |
120 | } |
104 | |
121 | |
105 | if (!(extra_buf = psiconv_new_buffer())) { |
|
|
106 | res = -PSICONV_E_NOMEM; |
|
|
107 | goto ERROR3; |
|
|
108 | } |
|
|
109 | |
|
|
110 | if (!(base_char = psiconv_basic_character_layout())) { |
122 | if (!(base_char = psiconv_basic_character_layout())) { |
111 | res = -PSICONV_E_NOMEM; |
123 | res = -PSICONV_E_NOMEM; |
|
|
124 | goto ERROR3; |
|
|
125 | } |
|
|
126 | if (!(base_para = psiconv_basic_paragraph_layout())) { |
|
|
127 | res = -PSICONV_E_NOMEM; |
112 | goto ERROR4; |
128 | goto ERROR4; |
113 | } |
129 | } |
114 | if (!(base_para = psiconv_basic_paragraph_layout())) { |
|
|
115 | res = -PSICONV_E_NOMEM; |
|
|
116 | goto ERROR5; |
|
|
117 | } |
|
|
118 | |
130 | |
119 | if ((res = psiconv_write_header_section(buf,PSICONV_ID_PSION5, |
131 | section_table_id = psiconv_buffer_unique_id(); |
120 | PSICONV_ID_DATA_FILE, |
132 | if ((res = psiconv_write_offset(config,buf,section_table_id))) |
|
|
133 | goto ERROR5; |
|
|
134 | |
|
|
135 | entry->id = PSICONV_ID_APPL_ID_SECTION; |
|
|
136 | entry->offset = psiconv_buffer_unique_id(); |
|
|
137 | if ((res = psiconv_list_add(section_table,entry))) |
|
|
138 | goto ERROR5; |
|
|
139 | if ((res = psiconv_buffer_add_target(buf,entry->offset))) |
|
|
140 | goto ERROR5; |
|
|
141 | if ((res=psiconv_write_application_id_section(config,buf, |
121 | PSICONV_ID_TEXTED))) |
142 | PSICONV_ID_TEXTED,"TextEd.app"))) |
|
|
143 | goto ERROR5; |
|
|
144 | |
|
|
145 | entry->id = PSICONV_ID_PAGE_LAYOUT_SECTION; |
|
|
146 | entry->offset = psiconv_buffer_unique_id(); |
|
|
147 | if ((res = psiconv_list_add(section_table,entry))) |
|
|
148 | goto ERROR5; |
|
|
149 | if ((res = psiconv_buffer_add_target(buf,entry->offset))) |
|
|
150 | goto ERROR5; |
|
|
151 | if ((res = psiconv_write_page_layout_section(config,buf,value->page_sec))) |
|
|
152 | goto ERROR5; |
|
|
153 | |
|
|
154 | entry->id = PSICONV_ID_TEXTED; |
|
|
155 | entry->offset = psiconv_buffer_unique_id(); |
|
|
156 | if ((res = psiconv_list_add(section_table,entry))) |
|
|
157 | goto ERROR5; |
|
|
158 | if ((res = psiconv_buffer_add_target(buf,entry->offset))) |
|
|
159 | goto ERROR5; |
|
|
160 | if ((res = psiconv_write_texted_section(config,buf,value->texted_sec, |
|
|
161 | base_char,base_para,&buf_texted))) |
|
|
162 | goto ERROR5; |
|
|
163 | |
|
|
164 | if ((res = psiconv_buffer_concat(buf,buf_texted))) |
122 | goto ERROR6; |
165 | goto ERROR6; |
123 | |
166 | |
124 | |
167 | |
125 | entry->id = PSICONV_ID_APPL_ID_SECTION; |
168 | if ((res = psiconv_buffer_add_target(buf,section_table_id))) |
126 | entry->offset = psiconv_list_length(extra_buf) + 0x14; |
|
|
127 | if ((res = psiconv_list_add(section_table,&entry))) |
|
|
128 | goto ERROR6; |
169 | goto ERROR6; |
129 | if ((res=psiconv_write_application_id_section(extra_buf, |
|
|
130 | PSICONV_ID_TEXTED,"TextEd.app"))) |
|
|
131 | goto ERROR6; |
|
|
132 | |
|
|
133 | entry->id = PSICONV_ID_PAGE_LAYOUT_SECTION; |
|
|
134 | entry->offset = psiconv_list_length(extra_buf) + 0x14; |
|
|
135 | if ((res = psiconv_list_add(section_table,&entry))) |
|
|
136 | goto ERROR6; |
|
|
137 | if ((res = psiconv_write_page_layout_section(extra_buf,value->page_sec))) |
|
|
138 | goto ERROR6; |
|
|
139 | |
170 | |
140 | entry->id = PSICONV_ID_TEXTED; |
|
|
141 | entry->offset = psiconv_list_length(extra_buf) + 0x14; |
|
|
142 | if ((res = psiconv_list_add(section_table,&entry))) |
|
|
143 | goto ERROR6; |
|
|
144 | if ((res = psiconv_write_texted_section(extra_buf,value->texted_sec, |
|
|
145 | base_char,base_para))) |
|
|
146 | goto ERROR6; |
|
|
147 | |
|
|
148 | if ((res = psiconv_write_u32(buf,psiconv_list_length(extra_buf) + 0x14))) |
|
|
149 | goto ERROR6; |
|
|
150 | |
|
|
151 | if ((res = psiconv_list_concat(buf,extra_buf))) |
|
|
152 | goto ERROR6; |
|
|
153 | |
|
|
154 | res = psiconv_write_section_table_section(buf,section_table); |
171 | res = psiconv_write_section_table_section(config,buf,section_table); |
155 | |
172 | |
156 | ERROR6: |
173 | ERROR6: |
|
|
174 | psiconv_buffer_free(buf_texted); |
|
|
175 | ERROR5: |
157 | psiconv_free_paragraph_layout(base_para); |
176 | psiconv_free_paragraph_layout(base_para); |
158 | ERROR5: |
177 | ERROR4: |
159 | psiconv_free_character_layout(base_char); |
178 | psiconv_free_character_layout(base_char); |
160 | ERROR4: |
|
|
161 | psiconv_free_buffer(extra_buf); |
|
|
162 | ERROR3: |
179 | ERROR3: |
163 | free(entry); |
180 | free(entry); |
164 | ERROR2: |
181 | ERROR2: |
165 | psiconv_list_free(section_table); |
182 | psiconv_list_free(section_table); |
166 | ERROR1: |
183 | ERROR1: |
167 | return res; |
184 | return res; |
168 | } |
185 | } |
|
|
186 | |
|
|
187 | int psiconv_write_word_file(const psiconv_config config, |
|
|
188 | psiconv_buffer buf,psiconv_word_f value) |
|
|
189 | { |
|
|
190 | int res; |
|
|
191 | psiconv_section_table_section section_table; |
|
|
192 | psiconv_section_table_entry entry; |
|
|
193 | psiconv_u32 section_table_id; |
|
|
194 | |
|
|
195 | if (!value) { |
|
|
196 | psiconv_warn(config,0,0,"Null Word file"); |
|
|
197 | return -PSICONV_E_GENERATE; |
|
|
198 | } |
|
|
199 | |
|
|
200 | if (!(section_table = psiconv_list_new(sizeof(*entry)))) { |
|
|
201 | res = -PSICONV_E_NOMEM; |
|
|
202 | goto ERROR1; |
|
|
203 | } |
|
|
204 | |
|
|
205 | if (!(entry = malloc(sizeof(*entry)))) { |
|
|
206 | res = -PSICONV_E_NOMEM; |
|
|
207 | goto ERROR2; |
|
|
208 | } |
|
|
209 | |
|
|
210 | section_table_id = psiconv_buffer_unique_id(); |
|
|
211 | if ((res = psiconv_write_offset(config,buf,section_table_id))) |
|
|
212 | goto ERROR3; |
|
|
213 | |
|
|
214 | entry->id = PSICONV_ID_APPL_ID_SECTION; |
|
|
215 | entry->offset = psiconv_buffer_unique_id(); |
|
|
216 | if ((res = psiconv_list_add(section_table,entry))) |
|
|
217 | goto ERROR3; |
|
|
218 | if ((res = psiconv_buffer_add_target(buf,entry->offset))) |
|
|
219 | goto ERROR3; |
|
|
220 | if ((res=psiconv_write_application_id_section(config,buf, |
|
|
221 | PSICONV_ID_WORD,"Word.app"))) |
|
|
222 | goto ERROR3; |
|
|
223 | |
|
|
224 | entry->id = PSICONV_ID_WORD_STATUS_SECTION; |
|
|
225 | entry->offset = psiconv_buffer_unique_id(); |
|
|
226 | if ((res = psiconv_list_add(section_table,entry))) |
|
|
227 | goto ERROR3; |
|
|
228 | if ((res = psiconv_buffer_add_target(buf,entry->offset))) |
|
|
229 | goto ERROR3; |
|
|
230 | if ((res = psiconv_write_word_status_section(config,buf,value->status_sec))) |
|
|
231 | goto ERROR3; |
|
|
232 | |
|
|
233 | entry->id = PSICONV_ID_PAGE_LAYOUT_SECTION; |
|
|
234 | entry->offset = psiconv_buffer_unique_id(); |
|
|
235 | if ((res = psiconv_list_add(section_table,entry))) |
|
|
236 | goto ERROR3; |
|
|
237 | if ((res = psiconv_buffer_add_target(buf,entry->offset))) |
|
|
238 | goto ERROR3; |
|
|
239 | if ((res = psiconv_write_page_layout_section(config,buf,value->page_sec))) |
|
|
240 | goto ERROR3; |
|
|
241 | |
|
|
242 | entry->id = PSICONV_ID_WORD_STYLES_SECTION; |
|
|
243 | entry->offset = psiconv_buffer_unique_id(); |
|
|
244 | if ((res = psiconv_list_add(section_table,entry))) |
|
|
245 | goto ERROR3; |
|
|
246 | if ((res = psiconv_buffer_add_target(buf,entry->offset))) |
|
|
247 | goto ERROR3; |
|
|
248 | if ((res = psiconv_write_word_styles_section(config,buf,value->styles_sec))) |
|
|
249 | goto ERROR3; |
|
|
250 | |
|
|
251 | entry->id = PSICONV_ID_TEXT_SECTION; |
|
|
252 | entry->offset = psiconv_buffer_unique_id(); |
|
|
253 | if ((res = psiconv_list_add(section_table,entry))) |
|
|
254 | goto ERROR3; |
|
|
255 | if ((res = psiconv_buffer_add_target(buf,entry->offset))) |
|
|
256 | goto ERROR3; |
|
|
257 | if ((res = psiconv_write_text_section(config,buf,value->paragraphs))) |
|
|
258 | goto ERROR3; |
|
|
259 | |
|
|
260 | entry->id = PSICONV_ID_LAYOUT_SECTION; |
|
|
261 | entry->offset = psiconv_buffer_unique_id(); |
|
|
262 | if ((res = psiconv_list_add(section_table,entry))) |
|
|
263 | goto ERROR3; |
|
|
264 | if ((res = psiconv_buffer_add_target(buf,entry->offset))) |
|
|
265 | goto ERROR3; |
|
|
266 | if ((res = psiconv_write_styled_layout_section(config,buf,value->paragraphs, |
|
|
267 | value->styles_sec))) |
|
|
268 | goto ERROR3; |
|
|
269 | |
|
|
270 | if ((res = psiconv_buffer_add_target(buf,section_table_id))) |
|
|
271 | goto ERROR3; |
|
|
272 | |
|
|
273 | res = psiconv_write_section_table_section(config,buf,section_table); |
|
|
274 | |
|
|
275 | ERROR3: |
|
|
276 | free(entry); |
|
|
277 | ERROR2: |
|
|
278 | psiconv_list_free(section_table); |
|
|
279 | ERROR1: |
|
|
280 | return res; |
|
|
281 | } |
|
|
282 | |
|
|
283 | int psiconv_write_sketch_file(const psiconv_config config, |
|
|
284 | psiconv_buffer buf,psiconv_sketch_f value) |
|
|
285 | { |
|
|
286 | int res; |
|
|
287 | psiconv_section_table_section section_table; |
|
|
288 | psiconv_section_table_entry entry; |
|
|
289 | psiconv_u32 section_table_id; |
|
|
290 | |
|
|
291 | if (!value) { |
|
|
292 | psiconv_warn(config,0,0,"Null Sketch file"); |
|
|
293 | return -PSICONV_E_GENERATE; |
|
|
294 | } |
|
|
295 | |
|
|
296 | if (!(section_table = psiconv_list_new(sizeof(*entry)))) { |
|
|
297 | res = -PSICONV_E_NOMEM; |
|
|
298 | goto ERROR1; |
|
|
299 | } |
|
|
300 | |
|
|
301 | if (!(entry = malloc(sizeof(*entry)))) { |
|
|
302 | res = -PSICONV_E_NOMEM; |
|
|
303 | goto ERROR2; |
|
|
304 | } |
|
|
305 | |
|
|
306 | section_table_id = psiconv_buffer_unique_id(); |
|
|
307 | if ((res = psiconv_write_offset(config,buf,section_table_id))) |
|
|
308 | goto ERROR3; |
|
|
309 | |
|
|
310 | entry->id = PSICONV_ID_APPL_ID_SECTION; |
|
|
311 | entry->offset = psiconv_buffer_unique_id(); |
|
|
312 | if ((res = psiconv_list_add(section_table,entry))) |
|
|
313 | goto ERROR3; |
|
|
314 | if ((res = psiconv_buffer_add_target(buf,entry->offset))) |
|
|
315 | goto ERROR3; |
|
|
316 | if ((res=psiconv_write_application_id_section(config,buf, |
|
|
317 | PSICONV_ID_SKETCH,"Paint.app"))) |
|
|
318 | goto ERROR3; |
|
|
319 | |
|
|
320 | entry->id = PSICONV_ID_SKETCH_SECTION; |
|
|
321 | entry->offset = psiconv_buffer_unique_id(); |
|
|
322 | if ((res = psiconv_list_add(section_table,entry))) |
|
|
323 | goto ERROR3; |
|
|
324 | if ((res = psiconv_buffer_add_target(buf,entry->offset))) |
|
|
325 | goto ERROR3; |
|
|
326 | if ((res = psiconv_write_sketch_section(config,buf,value->sketch_sec))) |
|
|
327 | goto ERROR3; |
|
|
328 | |
|
|
329 | if ((res = psiconv_buffer_add_target(buf,section_table_id))) |
|
|
330 | goto ERROR3; |
|
|
331 | res = psiconv_write_section_table_section(config,buf,section_table); |
|
|
332 | |
|
|
333 | ERROR3: |
|
|
334 | free(entry); |
|
|
335 | ERROR2: |
|
|
336 | psiconv_list_free(section_table); |
|
|
337 | ERROR1: |
|
|
338 | return res; |
|
|
339 | } |
|
|
340 | |
|
|
341 | int psiconv_write_mbm_file(const psiconv_config config, |
|
|
342 | psiconv_buffer buf,psiconv_mbm_f value) |
|
|
343 | { |
|
|
344 | int res,i; |
|
|
345 | psiconv_jumptable_section jumptable; |
|
|
346 | psiconv_u32 *entry,id,table_id; |
|
|
347 | psiconv_paint_data_section section; |
|
|
348 | |
|
|
349 | if (!value) { |
|
|
350 | psiconv_warn(config,0,0,"Null MBM file"); |
|
|
351 | return -PSICONV_E_GENERATE; |
|
|
352 | } |
|
|
353 | |
|
|
354 | if (!(jumptable = psiconv_list_new(sizeof(*entry)))) { |
|
|
355 | res = -PSICONV_E_NOMEM; |
|
|
356 | goto ERROR1; |
|
|
357 | } |
|
|
358 | |
|
|
359 | table_id = psiconv_buffer_unique_id(); |
|
|
360 | if ((res = psiconv_buffer_add_reference(buf,table_id))) |
|
|
361 | goto ERROR2; |
|
|
362 | |
|
|
363 | for (i = 0; i < psiconv_list_length(value->sections); i++) { |
|
|
364 | if (!(section = psiconv_list_get(value->sections,i))) { |
|
|
365 | psiconv_warn(config,0,0,"Massive memory corruption"); |
|
|
366 | res = -PSICONV_E_NOMEM; |
|
|
367 | goto ERROR2; |
|
|
368 | } |
|
|
369 | id = psiconv_buffer_unique_id(); |
|
|
370 | psiconv_list_add(jumptable,&id); |
|
|
371 | if ((res = psiconv_buffer_add_target(buf,id))) |
|
|
372 | goto ERROR2; |
|
|
373 | if ((res = psiconv_write_paint_data_section(config,buf,section))) |
|
|
374 | goto ERROR2; |
|
|
375 | } |
|
|
376 | |
|
|
377 | if ((res = psiconv_buffer_add_target(buf,table_id))) |
|
|
378 | goto ERROR2; |
|
|
379 | if ((res = psiconv_write_jumptable_section(config,buf,jumptable))) |
|
|
380 | goto ERROR2; |
|
|
381 | |
|
|
382 | |
|
|
383 | ERROR2: |
|
|
384 | psiconv_list_free(jumptable); |
|
|
385 | ERROR1: |
|
|
386 | return res; |
|
|
387 | } |