/[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 232 Revision 233
317 if (!(para->text = malloc(sizeof(*(para->text)) * 317 if (!(para->text = malloc(sizeof(*(para->text)) *
318 (psiconv_list_length(line) + 1)))) 318 (psiconv_list_length(line) + 1))))
319 goto ERROR4; 319 goto ERROR4;
320 for (j = 0; j < psiconv_list_length(line); j++) { 320 for (j = 0; j < psiconv_list_length(line); j++) {
321 if (!(nextcharptr = psiconv_list_get(line,j))) { 321 if (!(nextcharptr = psiconv_list_get(line,j))) {
322 psiconv_error(config,lev+2,off+i+len,"Internal data corruption"); 322 psiconv_error(config,lev+2,off+i+len,"Data structure corruption");
323 goto ERROR5; 323 goto ERROR5;
324 } 324 }
325 para->text[j] = *nextcharptr; 325 para->text[j] = *nextcharptr;
326 } 326 }
327 para->text[j] = 0; 327 para->text[j] = 0;
578 goto ERROR4; 578 goto ERROR4;
579 if (temp != 0x00) { 579 if (temp != 0x00) {
580 psiconv_debug(config,lev+4,off+len,"Type: %02x",temp); 580 psiconv_debug(config,lev+4,off+len,"Type: %02x",temp);
581 for (j = 0; j < psiconv_list_length(anon_styles); j++) { 581 for (j = 0; j < psiconv_list_length(anon_styles); j++) {
582 if (!(anon_ptr = psiconv_list_get(anon_styles,j))) { 582 if (!(anon_ptr = psiconv_list_get(anon_styles,j))) {
583 psiconv_error(config,lev+4,off+len,"Massive memory curruption"); 583 psiconv_error(config,lev+4,off+len,"Data structure corruption");
584 goto ERROR4; 584 goto ERROR4;
585 } 585 }
586 if (temp == anon_ptr->nr) 586 if (temp == anon_ptr->nr)
587 break; 587 break;
588 } 588 }
684 psiconv_progress(config,lev+3,off+len, 684 psiconv_progress(config,lev+3,off+len,
685 "Going to read the text layout inline elements"); 685 "Going to read the text layout inline elements");
686 total = 0; 686 total = 0;
687 for (i = 0; i < psiconv_list_length(result); i++) { 687 for (i = 0; i < psiconv_list_length(result); i++) {
688 if (!(para = psiconv_list_get(result,i))) { 688 if (!(para = psiconv_list_get(result,i))) {
689 psiconv_error(config,lev+3,off+len,"Massive memory corruption"); 689 psiconv_error(config,lev+3,off+len,"Data structure corruption");
690 goto ERROR4; 690 goto ERROR4;
691 } 691 }
692 line_length = -1; 692 line_length = -1;
693 for (j = 0; j < inline_count[i]; j++) { 693 for (j = 0; j < inline_count[i]; j++) {
694 psiconv_progress(config,lev+3,off+len,"Element %d: Paragraph %d, element %d", 694 psiconv_progress(config,lev+3,off+len,"Element %d: Paragraph %d, element %d",
789 789
790 free(inline_count); 790 free(inline_count);
791 791
792 for (i = 0 ; i < psiconv_list_length(anon_styles); i ++) { 792 for (i = 0 ; i < psiconv_list_length(anon_styles); i ++) {
793 if (!(anon_ptr = psiconv_list_get(anon_styles,i))) { 793 if (!(anon_ptr = psiconv_list_get(anon_styles,i))) {
794 psiconv_error(config,lev+4,off+len,"Massive memory corruption"); 794 psiconv_error(config,lev+4,off+len,"Data structure corruption");
795 goto ERROR2; 795 goto ERROR2;
796 } 796 }
797 psiconv_free_character_layout(anon_ptr->character); 797 psiconv_free_character_layout(anon_ptr->character);
798 psiconv_free_paragraph_layout(anon_ptr->paragraph); 798 psiconv_free_paragraph_layout(anon_ptr->paragraph);
799 } 799 }
831ERROR4: 831ERROR4:
832 free(inline_count); 832 free(inline_count);
833ERROR3: 833ERROR3:
834 for (i = 0; i < psiconv_list_length(anon_styles); i++) { 834 for (i = 0; i < psiconv_list_length(anon_styles); i++) {
835 if (!(anon_ptr = psiconv_list_get(anon_styles,i))) { 835 if (!(anon_ptr = psiconv_list_get(anon_styles,i))) {
836 psiconv_error(config,lev+1,off,"Massive memory corruption"); 836 psiconv_error(config,lev+1,off,"Data structure corruption");
837 break; 837 break;
838 } 838 }
839 psiconv_free_paragraph_layout(anon_ptr->paragraph); 839 psiconv_free_paragraph_layout(anon_ptr->paragraph);
840 psiconv_free_character_layout(anon_ptr->character); 840 psiconv_free_character_layout(anon_ptr->character);
841 } 841 }

Legend:
Removed from v.232  
changed lines
  Added in v.233

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