… | |
… | |
32 | static psiconv_all_tabs clone_all_tabs(psiconv_all_tabs all_tabs); |
32 | static psiconv_all_tabs clone_all_tabs(psiconv_all_tabs all_tabs); |
33 | static void psiconv_free_style_aux(void *style); |
33 | static void psiconv_free_style_aux(void *style); |
34 | static void psiconv_free_in_line_layout_aux(void * layout); |
34 | static void psiconv_free_in_line_layout_aux(void * layout); |
35 | static void psiconv_free_paragraph_aux(void * paragraph); |
35 | static void psiconv_free_paragraph_aux(void * paragraph); |
36 | static void psiconv_free_paint_data_section_aux(void * section); |
36 | static void psiconv_free_paint_data_section_aux(void * section); |
|
|
37 | static void psiconv_free_clipart_section_aux(void * section); |
37 | |
38 | |
38 | psiconv_character_layout psiconv_basic_character_layout(void) |
39 | psiconv_character_layout psiconv_basic_character_layout(void) |
39 | { |
40 | { |
40 | /* Make the structures static, to oblige IRIX */ |
41 | /* Make the structures static, to oblige IRIX */ |
41 | static struct psiconv_color black = |
42 | static struct psiconv_color black = |
… | |
… | |
63 | psiconv_bool_false, /* italic */ |
64 | psiconv_bool_false, /* italic */ |
64 | psiconv_bool_false, /* bold */ |
65 | psiconv_bool_false, /* bold */ |
65 | psiconv_normalscript, /* super_sub */ |
66 | psiconv_normalscript, /* super_sub */ |
66 | psiconv_bool_false, /* underline */ |
67 | psiconv_bool_false, /* underline */ |
67 | psiconv_bool_false, /* strike_out */ |
68 | psiconv_bool_false, /* strike_out */ |
68 | NULL, /* font */ |
69 | &font, /* font */ |
69 | }; |
70 | }; |
70 | |
71 | |
71 | return psiconv_clone_character_layout(&cl); |
72 | return psiconv_clone_character_layout(&cl); |
72 | } |
73 | } |
73 | |
74 | |
… | |
… | |
481 | { |
482 | { |
482 | if (section) |
483 | if (section) |
483 | psiconv_list_free_el(section,&psiconv_free_paint_data_section_aux); |
484 | psiconv_list_free_el(section,&psiconv_free_paint_data_section_aux); |
484 | } |
485 | } |
485 | |
486 | |
486 | void psiconv_free_mbm_jumptable_section (psiconv_mbm_jumptable_section section) |
487 | void psiconv_free_jumptable_section (psiconv_jumptable_section section) |
487 | { |
488 | { |
488 | if (section) |
489 | if (section) |
489 | psiconv_list_free(section); |
490 | psiconv_list_free(section); |
490 | } |
491 | } |
491 | |
492 | |
492 | void psiconv_free_mbm_f(psiconv_mbm_f file) |
493 | void psiconv_free_mbm_f(psiconv_mbm_f file) |
493 | { |
494 | { |
494 | if (file) { |
495 | if (file) { |
495 | psiconv_free_pictures(file->sections); |
496 | psiconv_free_pictures(file->sections); |
|
|
497 | free(file); |
|
|
498 | } |
|
|
499 | } |
|
|
500 | |
|
|
501 | void psiconv_free_sketch_section(psiconv_sketch_section sec) |
|
|
502 | { |
|
|
503 | if (sec) { |
|
|
504 | psiconv_free_paint_data_section(sec->picture); |
|
|
505 | free(sec); |
|
|
506 | } |
|
|
507 | } |
|
|
508 | |
|
|
509 | void psiconv_free_sketch_f(psiconv_sketch_f file) |
|
|
510 | { |
|
|
511 | if (file) { |
|
|
512 | psiconv_free_sketch_section(file->sketch_sec); |
|
|
513 | free(file); |
|
|
514 | } |
|
|
515 | } |
|
|
516 | |
|
|
517 | void psiconv_free_clipart_section_aux(void *section) |
|
|
518 | { |
|
|
519 | if (section) |
|
|
520 | free(((psiconv_clipart_section ) section)->picture); |
|
|
521 | } |
|
|
522 | |
|
|
523 | void psiconv_free_clipart_section(psiconv_clipart_section section) |
|
|
524 | { |
|
|
525 | if (section) { |
|
|
526 | psiconv_free_clipart_section_aux(section); |
|
|
527 | free(section); |
|
|
528 | } |
|
|
529 | } |
|
|
530 | |
|
|
531 | void psiconv_free_cliparts(psiconv_cliparts section) |
|
|
532 | { |
|
|
533 | if (section) |
|
|
534 | psiconv_list_free_el(section,&psiconv_free_clipart_section_aux); |
|
|
535 | } |
|
|
536 | |
|
|
537 | void psiconv_free_clipart_f(psiconv_clipart_f file) |
|
|
538 | { |
|
|
539 | if (file) { |
|
|
540 | psiconv_free_cliparts(file->sections); |
496 | free(file); |
541 | free(file); |
497 | } |
542 | } |
498 | } |
543 | } |
499 | |
544 | |
500 | void psiconv_free_file(psiconv_file file) |
545 | void psiconv_free_file(psiconv_file file) |
… | |
… | |
504 | psiconv_free_word_f((psiconv_word_f) file->file); |
549 | psiconv_free_word_f((psiconv_word_f) file->file); |
505 | else if (file->type == psiconv_texted_file) |
550 | else if (file->type == psiconv_texted_file) |
506 | psiconv_free_texted_f((psiconv_texted_f) file->file); |
551 | psiconv_free_texted_f((psiconv_texted_f) file->file); |
507 | else if (file->type == psiconv_mbm_file) |
552 | else if (file->type == psiconv_mbm_file) |
508 | psiconv_free_mbm_f((psiconv_mbm_f) file->file); |
553 | psiconv_free_mbm_f((psiconv_mbm_f) file->file); |
|
|
554 | else if (file->type == psiconv_sketch_file) |
|
|
555 | psiconv_free_sketch_f((psiconv_sketch_f) file->file); |
|
|
556 | else if (file->type == psiconv_clipart_file) |
|
|
557 | psiconv_free_clipart_f((psiconv_clipart_f) file->file); |
509 | free(file); |
558 | free(file); |
510 | } |
559 | } |
511 | } |
560 | } |