/[public]/psiconv/trunk/program/psiconv/gen_html4.c
ViewVC logotype

Diff of /psiconv/trunk/program/psiconv/gen_html4.c

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

Revision 195 Revision 339
1/*
1/* gen_html.c - Part of psiconv, a PSION 5 file formats converter 2 gen_html.c - Part of psiconv, a PSION 5 file formats converter
2 Copyright (c) 1999-2004 Frodo Looijaard <frodol@dds.nl> 3 Copyright (c) 1999-2005 Frodo Looijaard <frodo@frodo.looijaard.name>
3 4
4 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version. 8 (at your option) any later version.
244 if (len) { 245 if (len) {
245 if (!(text = malloc(sizeof (*text) * (len + 1)))) { 246 if (!(text = malloc(sizeof (*text) * (len + 1)))) {
246 fputs("Out of memory error\n",stderr); 247 fputs("Out of memory error\n",stderr);
247 exit(1); 248 exit(1);
248 } 249 }
249 memcpy(text,para->text+charnr,len * sizeof(*text)); 250 memcpy(text,para->text+start,len * sizeof(*text));
250 text[len] = 0; 251 text[len] = 0;
251 characters(config,list,text,layout->layout,enc); 252 characters(config,list,text,layout->layout,enc);
252 free(text); 253 free(text);
253 } 254 }
254 charnr += layout->length; 255 charnr += layout->length;
314 } else 315 } else
315 return -1; 316 return -1;
316} 317}
317 318
318 319
319static struct fileformat_s ffs[] = 320static struct fileformat_s fileformats[] =
320 { 321 {
321 { 322 {
322 "HTML4", 323 "HTML4",
323 "HTML 4.01 Transitional, without CSS", 324 "HTML 4.01 Transitional, without CSS",
324 FORMAT_WORD | FORMAT_TEXTED, 325 FORMAT_WORD | FORMAT_TEXTED,
334 335
335 336
336void init_html4(void) 337void init_html4(void)
337{ 338{
338 int i; 339 int i;
339 for (i = 0; ffs[i].name; i++) 340 for (i = 0; fileformats[i].name; i++)
340 psiconv_list_add(fileformat_list,ffs+i); 341 psiconv_list_add(fileformat_list,fileformats+i);
341} 342}

Legend:
Removed from v.195  
changed lines
  Added in v.339

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