… | |
… | |
20 | #include "config.h" |
20 | #include "config.h" |
21 | #include "compat.h" |
21 | #include "compat.h" |
22 | #include <stdlib.h> |
22 | #include <stdlib.h> |
23 | #include <string.h> |
23 | #include <string.h> |
24 | |
24 | |
25 | #include "data.h" |
|
|
26 | #include "parse_routines.h" |
25 | #include "parse_routines.h" |
|
|
26 | #include "error.h" |
27 | |
27 | |
28 | static int psiconv_parse_layout_section(const psiconv_buffer buf, |
28 | static int psiconv_parse_layout_section(const psiconv_buffer buf, |
29 | int lev,psiconv_u32 off, |
29 | int lev,psiconv_u32 off, |
30 | int *length, |
30 | int *length, |
31 | psiconv_text_and_layout result, |
31 | psiconv_text_and_layout result, |
… | |
… | |
714 | psiconv_progress(lev+4,off+len,"Going to read the element type"); |
714 | psiconv_progress(lev+4,off+len,"Going to read the element type"); |
715 | temp = psiconv_read_u8(buf,lev+4,len+off,&res); |
715 | temp = psiconv_read_u8(buf,lev+4,len+off,&res); |
716 | if (res) |
716 | if (res) |
717 | goto ERROR4; |
717 | goto ERROR4; |
718 | len += 1; |
718 | len += 1; |
719 | psiconv_debug(lev+4,off,"Type: %02x",temp); |
719 | psiconv_debug(lev+4,off+len,"Type: %02x",temp); |
720 | psiconv_progress(lev+4,off, |
720 | psiconv_progress(lev+4,off+len, |
721 | "Going to read the number of characters it applies to"); |
721 | "Going to read the number of characters it applies to"); |
722 | in_line.length = psiconv_read_u32(buf,lev+4,len+off,&res); |
722 | in_line.length = psiconv_read_u32(buf,lev+4,len+off,&res); |
723 | if (res) |
723 | if (res) |
724 | goto ERROR4; |
724 | goto ERROR4; |
725 | psiconv_debug(lev+4,off+len,"Length: %02x",in_line.length); |
725 | psiconv_debug(lev+4,off+len,"Length: %02x",in_line.length); |
… | |
… | |
767 | psiconv_list_free(anon_styles); |
767 | psiconv_list_free(anon_styles); |
768 | |
768 | |
769 | if (length) |
769 | if (length) |
770 | *length = len; |
770 | *length = len; |
771 | |
771 | |
772 | psiconv_progress(lev+1,off+len-1,"End of layout section (total length: %08x", |
772 | psiconv_progress(lev+1,off+len-1,"End of layout section (total length: %08x)", |
773 | len); |
773 | len); |
774 | |
774 | |
775 | return 0; |
775 | return 0; |
776 | |
776 | |
777 | ERROR4_4: |
777 | ERROR4_4: |