… | |
… | |
30 | static psiconv_bullet clone_bullet(psiconv_bullet bullet); |
30 | static psiconv_bullet clone_bullet(psiconv_bullet bullet); |
31 | static psiconv_all_tabs clone_all_tabs(psiconv_all_tabs all_tabs); |
31 | static psiconv_all_tabs clone_all_tabs(psiconv_all_tabs all_tabs); |
32 | static void psiconv_free_style_aux(void *style); |
32 | static void psiconv_free_style_aux(void *style); |
33 | static void psiconv_free_in_line_layout_aux(void * layout); |
33 | static void psiconv_free_in_line_layout_aux(void * layout); |
34 | static void psiconv_free_paragraph_aux(void * paragraph); |
34 | static void psiconv_free_paragraph_aux(void * paragraph); |
|
|
35 | static void psiconv_free_paint_data_section_aux(void * section); |
35 | |
36 | |
36 | psiconv_character_layout psiconv_basic_character_layout(void) |
37 | psiconv_character_layout psiconv_basic_character_layout(void) |
37 | { |
38 | { |
38 | struct psiconv_color black = |
39 | struct psiconv_color black = |
39 | { |
40 | { |
… | |
… | |
453 | psiconv_free_word_styles_section(file->styles_sec); |
454 | psiconv_free_word_styles_section(file->styles_sec); |
454 | free(file); |
455 | free(file); |
455 | } |
456 | } |
456 | } |
457 | } |
457 | |
458 | |
|
|
459 | void psiconv_free_texted_f(psiconv_texted_f file) |
|
|
460 | { |
|
|
461 | if (file) { |
|
|
462 | psiconv_free_page_layout_section(file->page_sec); |
|
|
463 | psiconv_free_texted_section(file->texted_sec); |
|
|
464 | free(file); |
|
|
465 | } |
|
|
466 | } |
|
|
467 | |
|
|
468 | void psiconv_free_paint_data_section_aux(void * section) |
|
|
469 | { |
|
|
470 | if (((psiconv_paint_data_section) section)->red) |
|
|
471 | free(((psiconv_paint_data_section)section) -> red); |
|
|
472 | if (((psiconv_paint_data_section) section)->green) |
|
|
473 | free(((psiconv_paint_data_section)section) -> green); |
|
|
474 | if (((psiconv_paint_data_section) section)->blue) |
|
|
475 | free(((psiconv_paint_data_section)section) -> blue); |
|
|
476 | } |
|
|
477 | |
|
|
478 | void psiconv_free_paint_data_section(psiconv_paint_data_section section) |
|
|
479 | { |
|
|
480 | if (section) { |
|
|
481 | psiconv_free_paint_data_section_aux(section); |
|
|
482 | free(section); |
|
|
483 | } |
|
|
484 | } |
|
|
485 | |
|
|
486 | void psiconv_free_pictures(psiconv_pictures section) |
|
|
487 | { |
|
|
488 | if (section) |
|
|
489 | psiconv_list_free_el(section,&psiconv_free_paint_data_section_aux); |
|
|
490 | } |
|
|
491 | |
|
|
492 | void psiconv_free_mbm_f(psiconv_mbm_f file) |
|
|
493 | { |
|
|
494 | if (file) { |
|
|
495 | psiconv_free_pictures(file->sections); |
|
|
496 | free(file); |
|
|
497 | } |
|
|
498 | } |
|
|
499 | |
|
|
500 | void psiconv_free_mbm_jumptable_section (psiconv_mbm_jumptable_section section) |
|
|
501 | { |
|
|
502 | if (section) |
|
|
503 | psiconv_list_free(section); |
|
|
504 | } |
|
|
505 | |
458 | void psiconv_free_file(psiconv_file file) |
506 | void psiconv_free_file(psiconv_file file) |
459 | { |
507 | { |
460 | if (file) { |
508 | if (file) { |
461 | if (file->type == psiconv_word_file) |
509 | if (file->type == psiconv_word_file) |
462 | psiconv_free_word_f((psiconv_word_f) file->file); |
510 | psiconv_free_word_f((psiconv_word_f) file->file); |
|
|
511 | else if (file->type == psiconv_texted_file) |
|
|
512 | psiconv_free_texted_f((psiconv_texted_f) file->file); |
|
|
513 | else if (file->type == psiconv_mbm_file) |
|
|
514 | psiconv_free_mbm_f((psiconv_mbm_f) file->file); |
463 | free(file); |
515 | free(file); |
464 | } |
516 | } |
465 | } |
517 | } |