… | |
… | |
22 | #include <stdio.h> |
22 | #include <stdio.h> |
23 | #include <string.h> |
23 | #include <string.h> |
24 | #include "data.h" |
24 | #include "data.h" |
25 | #include "list.h" |
25 | #include "list.h" |
26 | #include "gen.h" |
26 | #include "gen.h" |
|
|
27 | #include "psiconv.h" |
27 | |
28 | |
28 | |
29 | |
29 | /* |
30 | /* |
30 | * Various string tables for HTML4 settings |
31 | * Various string tables for HTML4 settings |
31 | */ |
32 | */ |
… | |
… | |
142 | fput_text(of, para->text, strlen(para->text)); |
143 | fput_text(of, para->text, strlen(para->text)); |
143 | fputs("\n\n", of); |
144 | fputs("\n\n", of); |
144 | } |
145 | } |
145 | } |
146 | } |
146 | |
147 | |
147 | void psiconv_gen_txt(FILE * of, psiconv_file file) |
148 | static int psiconv_gen_txt(FILE * of, const psiconv_file file, |
|
|
149 | const char *dest) |
148 | { |
150 | { |
149 | if (file->type == psiconv_word_file) |
151 | if (file->type == psiconv_word_file) { |
150 | psiconv_gen_txt_word(of,(psiconv_word_f) file->file); |
152 | psiconv_gen_txt_word(of,(psiconv_word_f) file->file); |
|
|
153 | return 0; |
151 | else if (file->type == psiconv_texted_file) |
154 | } else if (file->type == psiconv_texted_file) { |
152 | psiconv_gen_txt_texted(of,(psiconv_texted_f) file->file); |
155 | psiconv_gen_txt_texted(of,(psiconv_texted_f) file->file); |
153 | else |
|
|
154 | return; |
156 | return 0; |
|
|
157 | } else |
|
|
158 | return 1; |
155 | } |
159 | } |
156 | |
160 | |
|
|
161 | static struct psiconv_fileformat ff = |
|
|
162 | { |
|
|
163 | "ASCII", |
|
|
164 | "Plain text without much layout", |
|
|
165 | psiconv_gen_txt |
|
|
166 | }; |
|
|
167 | |
|
|
168 | void init_txt(void) |
|
|
169 | { |
|
|
170 | psiconv_list_add(fileformat_list,&ff); |
|
|
171 | } |
|
|
172 | |