… | |
… | |
137 | psiconv_debug(lev+2,off+len,"Cursor position: %08x", |
137 | psiconv_debug(lev+2,off+len,"Cursor position: %08x", |
138 | (*result)->cursor_position); |
138 | (*result)->cursor_position); |
139 | len += 0x04; |
139 | len += 0x04; |
140 | |
140 | |
141 | psiconv_progress(lev+2,off+len,"Going to read display size"); |
141 | psiconv_progress(lev+2,off+len,"Going to read display size"); |
142 | (*result)->cursor_position = psiconv_read_u32(buf,lev+2,off + len,&res); |
142 | (*result)->display_size = psiconv_read_u32(buf,lev+2,off + len,&res); |
143 | if (res) |
143 | if (res) |
144 | goto ERROR2; |
144 | goto ERROR2; |
145 | psiconv_debug(lev+2,off+len,"Display size: %08x", |
145 | psiconv_debug(lev+2,off+len,"Display size: %08x", |
146 | (*result)->cursor_position); |
146 | (*result)->display_size); |
147 | len += 0x04; |
147 | len += 0x04; |
148 | |
148 | |
149 | if (length) |
149 | if (length) |
150 | *length = len; |
150 | *length = len; |
151 | |
151 | |
… | |
… | |
323 | style->paragraph))) |
323 | style->paragraph))) |
324 | goto ERROR8; |
324 | goto ERROR8; |
325 | len += leng; |
325 | len += leng; |
326 | } |
326 | } |
327 | |
327 | |
|
|
328 | psiconv_progress(lev+2,off+len,"Reading trailing bytes"); |
|
|
329 | for (i = 0; i < 3; i++) { |
|
|
330 | temp = psiconv_read_u8(buf,lev+3,off+len,&res); |
|
|
331 | if (res) |
|
|
332 | goto ERROR4; |
|
|
333 | if (temp != 0xff) { |
|
|
334 | psiconv_warn(lev+3,off+len,"Unknown trailing style byte"); |
|
|
335 | psiconv_debug(lev+3,off+len,"Trailing byte: %02x expected, read %02x", |
|
|
336 | 0xff,temp); |
|
|
337 | } else |
|
|
338 | psiconv_debug(lev+3,off+len,"Read trailing byte 0xff"); |
|
|
339 | len++; |
|
|
340 | } |
|
|
341 | |
328 | if (length) |
342 | if (length) |
329 | *length = len; |
343 | *length = len; |
330 | |
344 | |
331 | psiconv_progress(lev,off+len-1, |
345 | psiconv_progress(lev,off+len-1, |
332 | "End of word styles section (total length: %08x)", len); |
346 | "End of word styles section (total length: %08x)", len); |