… | |
… | |
37 | goto ERROR1; |
37 | goto ERROR1; |
38 | |
38 | |
39 | psiconv_progress(lev+2,off+len, |
39 | psiconv_progress(lev+2,off+len, |
40 | "Going to read the first byte (0x01 expected)"); |
40 | "Going to read the first byte (0x01 expected)"); |
41 | temp = psiconv_read_u8(buf,lev+2,off+len,&res); |
41 | temp = psiconv_read_u8(buf,lev+2,off+len,&res); |
42 | if (!res) |
42 | if (res) |
43 | goto ERROR2; |
43 | goto ERROR2; |
44 | if (temp != 0x01) { |
44 | if (temp != 0x01) { |
45 | psiconv_warn(lev+2,off+len,"Page header first byte mismatch"); |
45 | psiconv_warn(lev+2,off+len,"Page header first byte mismatch"); |
46 | psiconv_debug(lev+2,off+len,"First byte: read %02x, expected %02x", |
46 | psiconv_debug(lev+2,off+len,"First byte: read %02x, expected %02x", |
47 | temp,0x01); |
47 | temp,0x01); |
… | |
… | |
199 | "Page layout section page dimensions marker not found"); |
199 | "Page layout section page dimensions marker not found"); |
200 | psiconv_debug(lev+2,off+len, |
200 | psiconv_debug(lev+2,off+len, |
201 | "Page dimensions marker: read %08x, expected %08x",temp, |
201 | "Page dimensions marker: read %08x, expected %08x",temp, |
202 | PSICONV_ID_PAGE_DIMENSIONS); |
202 | PSICONV_ID_PAGE_DIMENSIONS); |
203 | } |
203 | } |
|
|
204 | len += 4; |
204 | |
205 | |
205 | psiconv_progress(lev+2,off+len,"Going to read the page width"); |
206 | psiconv_progress(lev+2,off+len,"Going to read the page width"); |
206 | (*result)->page_width = psiconv_read_length(buf,lev+2,off+len,&leng,&res); |
207 | (*result)->page_width = psiconv_read_length(buf,lev+2,off+len,&leng,&res); |
207 | if (!res) |
208 | if (res) |
208 | goto ERROR4; |
209 | goto ERROR4; |
209 | psiconv_debug(lev+2,off+len,"Page width: %6.3f",(*result)->page_width); |
210 | psiconv_debug(lev+2,off+len,"Page width: %6.3f",(*result)->page_width); |
210 | len += leng; |
211 | len += leng; |
211 | |
212 | |
212 | psiconv_progress(lev+2,off+len,"Going to read the page height"); |
213 | psiconv_progress(lev+2,off+len,"Going to read the page height"); |
213 | (*result)->page_height = psiconv_read_length(buf,lev+2,off+len,&leng,&res); |
214 | (*result)->page_height = psiconv_read_length(buf,lev+2,off+len,&leng,&res); |
214 | if (!res) |
215 | if (res) |
215 | goto ERROR4; |
216 | goto ERROR4; |
216 | psiconv_debug(lev+2,off+len,"Page height: %6.3f",(*result)->page_height); |
217 | psiconv_debug(lev+2,off+len,"Page height: %6.3f",(*result)->page_height); |
217 | len += leng; |
218 | len += leng; |
218 | |
219 | |
219 | if (length) |
220 | if (length) |