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

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

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

Revision 183 Revision 184
107 return 0; 107 return 0;
108 108
109ERROR2: 109ERROR2:
110 psiconv_list_free(*result); 110 psiconv_list_free(*result);
111ERROR1: 111ERROR1:
112 psiconv_warn(config,lev+1,off,"Reading of Jumptable Section failed"); 112 psiconv_error(config,lev+1,off,"Reading of Jumptable Section failed");
113 if (length) 113 if (length)
114 *length = 0; 114 *length = 0;
115 if (!res) 115 if (!res)
116 return -PSICONV_E_NOMEM; 116 return -PSICONV_E_NOMEM;
117 else 117 else
151 psiconv_progress(config,lev+2,off+len,"Going to read pixel data offset"); 151 psiconv_progress(config,lev+2,off+len,"Going to read pixel data offset");
152 offset = psiconv_read_u32(config,buf,lev+2,off+len,&res); 152 offset = psiconv_read_u32(config,buf,lev+2,off+len,&res);
153 if (res) 153 if (res)
154 goto ERROR3; 154 goto ERROR3;
155 if (offset != 0x28) { 155 if (offset != 0x28) {
156 psiconv_warn(config,lev+2,off+len, 156 psiconv_error(config,lev+2,off+len,
157 "Paint data section data offset has unexpected value"); 157 "Paint data section data offset has unexpected value");
158 psiconv_debug(config,lev+2,off+len, 158 psiconv_debug(config,lev+2,off+len,
159 "Data offset: read %08x, expected %08x",offset,0x28); 159 "Data offset: read %08x, expected %08x",offset,0x28);
160 res = -1; 160 res = -1;
161 } 161 }
360ERROR3: 360ERROR3:
361 psiconv_list_free(bytes); 361 psiconv_list_free(bytes);
362ERROR2: 362ERROR2:
363 free(*result); 363 free(*result);
364ERROR1: 364ERROR1:
365 psiconv_warn(config,lev+1,off,"Reading of Paint Data Section failed"); 365 psiconv_error(config,lev+1,off,"Reading of Paint Data Section failed");
366 if (length) 366 if (length)
367 *length = 0; 367 *length = 0;
368 if (!res) 368 if (!res)
369 return -PSICONV_E_NOMEM; 369 return -PSICONV_E_NOMEM;
370 else 370 else
525ERROR3: 525ERROR3:
526 psiconv_free_paint_data_section((*result)->picture); 526 psiconv_free_paint_data_section((*result)->picture);
527ERROR2: 527ERROR2:
528 free (*result); 528 free (*result);
529ERROR1: 529ERROR1:
530 psiconv_warn(config,lev+1,off,"Reading of Sketch Section failed"); 530 psiconv_error(config,lev+1,off,"Reading of Sketch Section failed");
531 if (length) 531 if (length)
532 *length = 0; 532 *length = 0;
533 if (!res) 533 if (!res)
534 return -PSICONV_E_NOMEM; 534 return -PSICONV_E_NOMEM;
535 else 535 else
628 return 0; 628 return 0;
629 629
630ERROR2: 630ERROR2:
631 free (*result); 631 free (*result);
632ERROR1: 632ERROR1:
633 psiconv_warn(config,lev+1,off,"Reading of Font failed"); 633 psiconv_error(config,lev+1,off,"Reading of Font failed");
634 if (length) 634 if (length)
635 *length = 0; 635 *length = 0;
636 if (!res) 636 if (!res)
637 return -PSICONV_E_NOMEM; 637 return -PSICONV_E_NOMEM;
638 else 638 else
689 return 0; 689 return 0;
690 690
691ERROR2: 691ERROR2:
692 psiconv_list_free(*decoded); 692 psiconv_list_free(*decoded);
693ERROR1: 693ERROR1:
694 psiconv_warn(config,lev+1,off,"Decoding of RLE8 failed"); 694 psiconv_error(config,lev+1,off,"Decoding of RLE8 failed");
695 if (!res) 695 if (!res)
696 return -PSICONV_E_NOMEM; 696 return -PSICONV_E_NOMEM;
697 else 697 else
698 return res; 698 return res;
699} 699}
732 return 0; 732 return 0;
733 733
734ERROR2: 734ERROR2:
735 psiconv_list_free(*decoded); 735 psiconv_list_free(*decoded);
736ERROR1: 736ERROR1:
737 psiconv_warn(config,lev+1,off,"Decoding of RLE12 failed"); 737 psiconv_error(config,lev+1,off,"Decoding of RLE12 failed");
738 if (!res) 738 if (!res)
739 return -PSICONV_E_NOMEM; 739 return -PSICONV_E_NOMEM;
740 else 740 else
741 return res; 741 return res;
742} 742}
798 return 0; 798 return 0;
799 799
800ERROR2: 800ERROR2:
801 psiconv_list_free(*decoded); 801 psiconv_list_free(*decoded);
802ERROR1: 802ERROR1:
803 psiconv_warn(config,lev+1,off,"Decoding of RLE16 failed"); 803 psiconv_error(config,lev+1,off,"Decoding of RLE16 failed");
804 if (!res) 804 if (!res)
805 return -PSICONV_E_NOMEM; 805 return -PSICONV_E_NOMEM;
806 else 806 else
807 return res; 807 return res;
808} 808}
868 return 0; 868 return 0;
869 869
870ERROR2: 870ERROR2:
871 psiconv_list_free(*decoded); 871 psiconv_list_free(*decoded);
872ERROR1: 872ERROR1:
873 psiconv_warn(config,lev+1,off,"Decoding of RLE24 failed"); 873 psiconv_error(config,lev+1,off,"Decoding of RLE24 failed");
874 if (!res) 874 if (!res)
875 return -PSICONV_E_NOMEM; 875 return -PSICONV_E_NOMEM;
876 else 876 else
877 return res; 877 return res;
878} 878}
935 935
936 936
937ERROR2: 937ERROR2:
938 psiconv_list_free(*pixels); 938 psiconv_list_free(*pixels);
939ERROR1: 939ERROR1:
940 psiconv_warn(config,lev+1,off,"Converting bytes to pixels failed"); 940 psiconv_error(config,lev+1,off,"Converting bytes to pixels failed");
941 if (!res) 941 if (!res)
942 return -PSICONV_E_NOMEM; 942 return -PSICONV_E_NOMEM;
943 else 943 else
944 return res; 944 return res;
945} 945}
1009ERROR3: 1009ERROR3:
1010 free((*floats).green); 1010 free((*floats).green);
1011ERROR2: 1011ERROR2:
1012 free((*floats).red); 1012 free((*floats).red);
1013ERROR1: 1013ERROR1:
1014 psiconv_warn(config,lev+1,off,"Converting pixels to floats failed"); 1014 psiconv_error(config,lev+1,off,"Converting pixels to floats failed");
1015 if (!res) 1015 if (!res)
1016 return -PSICONV_E_NOMEM; 1016 return -PSICONV_E_NOMEM;
1017 else 1017 else
1018 return res; 1018 return res;
1019} 1019}

Legend:
Removed from v.183  
changed lines
  Added in v.184

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