/[public]/psiconv/trunk/lib/psiconv/data.c
ViewVC logotype

Diff of /psiconv/trunk/lib/psiconv/data.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 11 Revision 12
30static psiconv_bullet clone_bullet(psiconv_bullet bullet); 30static psiconv_bullet clone_bullet(psiconv_bullet bullet);
31static psiconv_all_tabs clone_all_tabs(psiconv_all_tabs all_tabs); 31static psiconv_all_tabs clone_all_tabs(psiconv_all_tabs all_tabs);
32static void psiconv_free_style_aux(void *style); 32static void psiconv_free_style_aux(void *style);
33static void psiconv_free_in_line_layout_aux(void * layout); 33static void psiconv_free_in_line_layout_aux(void * layout);
34static void psiconv_free_paragraph_aux(void * paragraph); 34static void psiconv_free_paragraph_aux(void * paragraph);
35static void psiconv_free_paint_data_section_aux(void * section);
35 36
36psiconv_character_layout psiconv_basic_character_layout(void) 37psiconv_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
459void 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
468void 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
478void 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
486void psiconv_free_pictures(psiconv_pictures section)
487{
488 if (section)
489 psiconv_list_free_el(section,&psiconv_free_paint_data_section_aux);
490}
491
492void psiconv_free_mbm_f(psiconv_mbm_f file)
493{
494 if (file) {
495 psiconv_free_pictures(file->sections);
496 free(file);
497 }
498}
499
500void psiconv_free_mbm_jumptable_section (psiconv_mbm_jumptable_section section)
501{
502 if (section)
503 psiconv_list_free(section);
504}
505
458void psiconv_free_file(psiconv_file file) 506void 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}

Legend:
Removed from v.11  
changed lines
  Added in v.12

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