/[public]/psiconv/trunk/lib/psiconv/parse_common.c
ViewVC logotype

Diff of /psiconv/trunk/lib/psiconv/parse_common.c

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

Revision 64 Revision 65
44 if (!((*result) = malloc(sizeof(**result)))) 44 if (!((*result) = malloc(sizeof(**result))))
45 goto ERROR1; 45 goto ERROR1;
46 46
47 psiconv_progress(lev+2,off+len,"Going to read UID1 to UID3"); 47 psiconv_progress(lev+2,off+len,"Going to read UID1 to UID3");
48 (*result)->uid1 = psiconv_read_u32(buf,lev+2,off+len,&res); 48 (*result)->uid1 = psiconv_read_u32(buf,lev+2,off+len,&res);
49 if (!res) 49 if (res)
50 goto ERROR2; 50 goto ERROR2;
51 psiconv_debug(lev+2,off+len,"UID1: %08x",(*result)->uid1); 51 psiconv_debug(lev+2,off+len,"UID1: %08x",(*result)->uid1);
52 if ((*result)->uid1 == PSICONV_ID_CLIPART) { 52 if ((*result)->uid1 == PSICONV_ID_CLIPART) {
53 /* That's all folks... */ 53 /* That's all folks... */
54 (*result)->file = psiconv_clipart_file; 54 (*result)->file = psiconv_clipart_file;
271 goto ERROR1; 271 goto ERROR1;
272 if (!(para = malloc(sizeof(*para)))) 272 if (!(para = malloc(sizeof(*para))))
273 goto ERROR2; 273 goto ERROR2;
274 274
275 text_len = psiconv_read_X(buf,lev+2,off,&leng,&res); 275 text_len = psiconv_read_X(buf,lev+2,off,&leng,&res);
276 if (!res) 276 if (res)
277 goto ERROR3; 277 goto ERROR3;
278 psiconv_debug(lev+2,off,"Length: %08x",text_len); 278 psiconv_debug(lev+2,off,"Length: %08x",text_len);
279 len += leng; 279 len += leng;
280 280
281 psiconv_progress(lev+2,off+len,"Going to read all paragraph text"); 281 psiconv_progress(lev+2,off+len,"Going to read all paragraph text");
567 if (!(para = psiconv_list_get(result,i))) 567 if (!(para = psiconv_list_get(result,i)))
568 goto ERROR4; 568 goto ERROR4;
569 569
570 psiconv_progress(lev+4,off+len,"Going to read the paragraph length"); 570 psiconv_progress(lev+4,off+len,"Going to read the paragraph length");
571 temp = psiconv_read_u32(buf,lev+4,off+len,&res); 571 temp = psiconv_read_u32(buf,lev+4,off+len,&res);
572 if (!res) 572 if (res)
573 goto ERROR4; 573 goto ERROR4;
574 if (temp != strlen(para->text)+1) { 574 if (temp != strlen(para->text)+1) {
575 psiconv_warn(lev+4,off+len, 575 psiconv_warn(lev+4,off+len,
576 "Disagreement of the length of paragraph in layout section"); 576 "Disagreement of the length of paragraph in layout section");
577 psiconv_debug(lev+4,off+len, 577 psiconv_debug(lev+4,off+len,
581 psiconv_debug(lev+4,off+len,"Paragraph length: %d",temp); 581 psiconv_debug(lev+4,off+len,"Paragraph length: %d",temp);
582 len += 4; 582 len += 4;
583 583
584 psiconv_progress(lev+4,off+len,"Going to read the paragraph type"); 584 psiconv_progress(lev+4,off+len,"Going to read the paragraph type");
585 temp = psiconv_read_u8(buf,lev+4,off+len,&res); 585 temp = psiconv_read_u8(buf,lev+4,off+len,&res);
586 if (!res) 586 if (res)
587 goto ERROR4; 587 goto ERROR4;
588 if (temp != 0x00) { 588 if (temp != 0x00) {
589 psiconv_debug(lev+4,off+len,"Type: %02x",temp); 589 psiconv_debug(lev+4,off+len,"Type: %02x",temp);
590 for (j = 0; j < psiconv_list_length(anon_styles); j++) { 590 for (j = 0; j < psiconv_list_length(anon_styles); j++) {
591 if (!(anon_ptr = psiconv_list_get(anon_styles,j))) { 591 if (!(anon_ptr = psiconv_list_get(anon_styles,j))) {
663 psiconv_free_character_layout(para->base_character); 663 psiconv_free_character_layout(para->base_character);
664 para->base_character = temp_char; 664 para->base_character = temp_char;
665 665
666 para->base_style = temp; 666 para->base_style = temp;
667 psiconv_progress(lev+4,off+len,"Going to read paragraph layout"); 667 psiconv_progress(lev+4,off+len,"Going to read paragraph layout");
668 if (!(psiconv_parse_paragraph_layout_list(buf,lev+4,off+len,&leng, 668 if ((res = psiconv_parse_paragraph_layout_list(buf,lev+4,off+len,&leng,
669 para->base_paragraph))) 669 para->base_paragraph)))
670 goto ERROR4; 670 goto ERROR4;
671 len += leng; 671 len += leng;
672 if (parse_styles) 672 if (parse_styles)
673 len += 1; 673 len += 1;
685 685
686 psiconv_progress(lev+3,off+len,"Going to read the number of elements"); 686 psiconv_progress(lev+3,off+len,"Going to read the number of elements");
687 nr = psiconv_read_u32(buf,lev+3,off+len,&res); 687 nr = psiconv_read_u32(buf,lev+3,off+len,&res);
688 if (res) 688 if (res)
689 goto ERROR4; 689 goto ERROR4;
690 psiconv_debug(lev+3,off,"Elements: %08x",nr); 690 psiconv_debug(lev+3,off+len,"Elements: %08x",nr);
691 len += 0x04; 691 len += 0x04;
692 692
693 psiconv_progress(lev+3,off+len, 693 psiconv_progress(lev+3,off+len,
694 "Going to read the text layout inline elements"); 694 "Going to read the text layout inline elements");
695 total = 0; 695 total = 0;

Legend:
Removed from v.64  
changed lines
  Added in v.65

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