/[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 196 Revision 351
1/* 1/*
2 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
3 Copyright (c) 1999-2004 Frodo Looijaard <frodol@dds.nl> 3 Copyright (c) 1999-2014 Frodo Looijaard <frodo@frodo.looijaard.name>
4 4
5 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
6 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
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
245 if (len) { 245 if (len) {
246 if (!(text = malloc(sizeof (*text) * (len + 1)))) { 246 if (!(text = malloc(sizeof (*text) * (len + 1)))) {
247 fputs("Out of memory error\n",stderr); 247 fputs("Out of memory error\n",stderr);
248 exit(1); 248 exit(1);
249 } 249 }
250 memcpy(text,para->text+charnr,len * sizeof(*text)); 250 memcpy(text,para->text+start,len * sizeof(*text));
251 text[len] = 0; 251 text[len] = 0;
252 characters(config,list,text,layout->layout,enc); 252 characters(config,list,text,layout->layout,enc);
253 free(text); 253 free(text);
254 } 254 }
255 charnr += layout->length; 255 charnr += layout->length;
315 } else 315 } else
316 return -1; 316 return -1;
317} 317}
318 318
319 319
320static struct fileformat_s ffs[] = 320static struct fileformat_s fileformats[] =
321 { 321 {
322 { 322 {
323 "HTML4", 323 "HTML4",
324 "HTML 4.01 Transitional, without CSS", 324 "HTML 4.01 Transitional, without CSS",
325 FORMAT_WORD | FORMAT_TEXTED, 325 FORMAT_WORD | FORMAT_TEXTED,
335 335
336 336
337void init_html4(void) 337void init_html4(void)
338{ 338{
339 int i; 339 int i;
340 for (i = 0; ffs[i].name; i++) 340 for (i = 0; fileformats[i].name; i++)
341 psiconv_list_add(fileformat_list,ffs+i); 341 psiconv_list_add(fileformat_list,fileformats+i);
342} 342}

Legend:
Removed from v.196  
changed lines
  Added in v.351

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