… | |
… | |
520 | |
520 | |
521 | psiconv_list_free(fonts); |
521 | psiconv_list_free(fonts); |
522 | psiconv_list_free(colors); |
522 | psiconv_list_free(colors); |
523 | } |
523 | } |
524 | |
524 | |
525 | static int psiconv_gen_rtf(FILE * of, const psiconv_file file, const char *dest) |
525 | static int psiconv_gen_rtf(const char *filename, const psiconv_file file, |
|
|
526 | const char *dest) |
526 | { |
527 | { |
|
|
528 | FILE *of = fopen(filename,"w"); |
|
|
529 | if (! of) |
|
|
530 | return -1; |
|
|
531 | |
527 | if (file->type == psiconv_word_file) { |
532 | if (file->type == psiconv_word_file) { |
528 | psiconv_gen_rtf_word(of,(psiconv_word_f) file->file); |
533 | psiconv_gen_rtf_word(of,(psiconv_word_f) file->file); |
529 | return 0; |
|
|
530 | } else if (file->type == psiconv_texted_file) { |
534 | } else if (file->type == psiconv_texted_file) { |
531 | psiconv_gen_rtf_texted(of,(psiconv_texted_f) file->file); |
535 | psiconv_gen_rtf_texted(of,(psiconv_texted_f) file->file); |
532 | return 0; |
|
|
533 | } else |
536 | } else { |
|
|
537 | fclose(of); |
534 | return -1; |
538 | return -1; |
|
|
539 | } |
|
|
540 | return fclose(of); |
535 | } |
541 | } |
536 | |
542 | |
537 | static struct psiconv_fileformat ff = |
543 | static struct psiconv_fileformat ff = |
538 | { |
544 | { |
539 | "RTF", |
545 | "RTF", |