--- psiconv/trunk/lib/psiconv/data.c 1999/10/27 15:30:34 21 +++ psiconv/trunk/lib/psiconv/data.c 1999/12/03 00:59:12 41 @@ -34,6 +34,7 @@ static void psiconv_free_in_line_layout_aux(void * layout); static void psiconv_free_paragraph_aux(void * paragraph); static void psiconv_free_paint_data_section_aux(void * section); +static void psiconv_free_clipart_section_aux(psiconv_clipart_section section); psiconv_character_layout psiconv_basic_character_layout(void) { @@ -65,7 +66,7 @@ psiconv_normalscript, /* super_sub */ psiconv_bool_false, /* underline */ psiconv_bool_false, /* strike_out */ - font, /* font */ + &font, /* font */ }; return psiconv_clone_character_layout(&cl); @@ -497,6 +498,50 @@ } } +void psiconv_free_sketch_section(psiconv_sketch_section sec) +{ + if (sec) { + psiconv_free_paint_data_section(sec->picture); + free(sec); + } +} + +void psiconv_free_sketch_f(psiconv_sketch_f file) +{ + if (file) { + psiconv_free_sketch_section(file->sketch_sec); + free(file); + } +} + +void psiconv_free_clipart_section_aux(psiconv_clipart_section section) +{ + if (section) + free(section->picture); +} + +void psiconv_free_clipart_section(psiconv_clipart_section section) +{ + if (section) { + psiconv_free_clipart_section_aux(section); + free(section); + } +} + +void psiconv_free_cliparts(psiconv_cliparts section) +{ + if (section) + psiconv_list_free_el(section,&psiconv_free_clipart_section_aux); +} + +void psiconv_free_clipart_f(psiconv_clipart_f file) +{ + if (file) { + psiconv_free_cliparts(file->sections); + free(file); + } +} + void psiconv_free_file(psiconv_file file) { if (file) { @@ -506,6 +551,10 @@ psiconv_free_texted_f((psiconv_texted_f) file->file); else if (file->type == psiconv_mbm_file) psiconv_free_mbm_f((psiconv_mbm_f) file->file); + else if (file->type == psiconv_sketch_file) + psiconv_free_sketch_f((psiconv_sketch_f) file->file); + else if (file->type == psiconv_clipart_file) + psiconv_free_sketch_f((psiconv_clipart_f) file->file); free(file); } }