… | |
… | |
145 | else if (temp == 0x02) |
145 | else if (temp == 0x02) |
146 | (*result)->kind = psiconv_border_double; |
146 | (*result)->kind = psiconv_border_double; |
147 | else if (temp == 0x03) |
147 | else if (temp == 0x03) |
148 | (*result)->kind = psiconv_border_dotted; |
148 | (*result)->kind = psiconv_border_dotted; |
149 | else if (temp == 0x04) |
149 | else if (temp == 0x04) |
150 | (*result)->kind = psiconv_border_striped; |
150 | (*result)->kind = psiconv_border_dashed; |
151 | else if (temp == 0x05) |
151 | else if (temp == 0x05) |
152 | (*result)->kind = psiconv_border_dotstripe; |
152 | (*result)->kind = psiconv_border_dotdashed; |
153 | else if (temp == 0x06) |
153 | else if (temp == 0x06) |
154 | (*result)->kind = psiconv_border_dotdotstripe; |
154 | (*result)->kind = psiconv_border_dotdotdashed; |
155 | else { |
155 | else { |
156 | psiconv_warn(lev+2,off,"Unknown border kind (defaults to `none')"); |
156 | psiconv_warn(lev+2,off,"Unknown border kind (defaults to `none')"); |
157 | (*result)->kind = psiconv_border_none; |
157 | (*result)->kind = psiconv_border_none; |
158 | } |
158 | } |
159 | psiconv_debug(lev+2,off+len,"Kind: %02x",temp); |
159 | psiconv_debug(lev+2,off+len,"Kind: %02x",temp); |
… | |
… | |
270 | psiconv_progress(lev+1,off + len - 1, |
270 | psiconv_progress(lev+1,off + len - 1, |
271 | "End of bullet data (total length: %08x)",len); |
271 | "End of bullet data (total length: %08x)",len); |
272 | |
272 | |
273 | if (length) |
273 | if (length) |
274 | *length = len; |
274 | *length = len; |
275 | return res; |
275 | return 0; |
276 | |
276 | |
277 | ERROR3: |
277 | ERROR3: |
278 | psiconv_free_color((*result)->color); |
278 | psiconv_free_color((*result)->color); |
279 | ERROR2: |
279 | ERROR2: |
280 | free (result); |
280 | free (result); |
… | |
… | |
445 | result->justify_ver = psiconv_justify_bottom; |
445 | result->justify_ver = psiconv_justify_bottom; |
446 | } |
446 | } |
447 | psiconv_debug(lev+3,off+len,"Justify: %02x",temp); |
447 | psiconv_debug(lev+3,off+len,"Justify: %02x",temp); |
448 | len ++; |
448 | len ++; |
449 | case 0x07: |
449 | case 0x07: |
450 | psiconv_progress(lev+3,off+len,"Going to read interline distance"); |
450 | psiconv_progress(lev+3,off+len,"Going to read linespacing distance"); |
451 | result->interline = psiconv_read_size(buf,lev+3,off+len,&leng,&res); |
451 | result->linespacing = psiconv_read_size(buf,lev+3,off+len,&leng,&res); |
452 | if (res) |
452 | if (res) |
453 | goto ERROR1; |
453 | goto ERROR1; |
454 | len += leng; |
454 | len += leng; |
455 | break; |
455 | break; |
456 | case 0x08: |
456 | case 0x08: |
457 | psiconv_progress(lev+3,off+len,"Going to read interline exact"); |
457 | psiconv_progress(lev+3,off+len,"Going to read linespacing exact"); |
458 | if ((res = psiconv_parse_bool(buf,lev+3,off+len,&leng, |
458 | if ((res = psiconv_parse_bool(buf,lev+3,off+len,&leng, |
459 | &result->interline_exact))) |
459 | &result->linespacing_exact))) |
460 | goto ERROR1; |
460 | goto ERROR1; |
461 | len += leng; |
461 | len += leng; |
462 | break; |
462 | break; |
463 | case 0x09: |
463 | case 0x09: |
464 | psiconv_progress(lev+3,off+len,"Going to read top space"); |
464 | psiconv_progress(lev+3,off+len,"Going to read top space"); |
465 | result->top_space = psiconv_read_size(buf,lev+3,off+len,&leng,&res); |
465 | result->space_above = psiconv_read_size(buf,lev+3,off+len,&leng,&res); |
466 | if (res) |
466 | if (res) |
467 | goto ERROR1; |
467 | goto ERROR1; |
468 | len += leng; |
468 | len += leng; |
469 | break; |
469 | break; |
470 | case 0x0a: |
470 | case 0x0a: |
471 | psiconv_progress(lev+3,off+len,"Going to read bottom space"); |
471 | psiconv_progress(lev+3,off+len,"Going to read bottom space"); |
472 | result->bottom_space = psiconv_read_size(buf,lev+3,off+len,&leng,&res); |
472 | result->space_below = psiconv_read_size(buf,lev+3,off+len,&leng,&res); |
473 | if (res) |
473 | if (res) |
474 | goto ERROR1; |
474 | goto ERROR1; |
475 | len += leng; |
475 | len += leng; |
476 | break; |
476 | break; |
477 | case 0x0b: |
477 | case 0x0b: |
478 | psiconv_progress(lev+3,off+len,"Going to read on one page"); |
478 | psiconv_progress(lev+3,off+len,"Going to read on one page"); |
479 | if ((res = psiconv_parse_bool(buf,lev+3,off+len,&leng, |
479 | if ((res = psiconv_parse_bool(buf,lev+3,off+len,&leng, |
480 | &result->on_one_page))) |
480 | &result->keep_together))) |
481 | goto ERROR1; |
481 | goto ERROR1; |
482 | len += leng; |
482 | len += leng; |
483 | break; |
483 | break; |
484 | case 0x0c: |
484 | case 0x0c: |
485 | psiconv_progress(lev+3,off+len,"Going to read together with"); |
485 | psiconv_progress(lev+3,off+len,"Going to read together with"); |
486 | if ((res = psiconv_parse_bool(buf,lev+3,off+len,&leng, |
486 | if ((res = psiconv_parse_bool(buf,lev+3,off+len,&leng, |
487 | &result->together_with))) |
487 | &result->keep_with_next))) |
488 | goto ERROR1; |
488 | goto ERROR1; |
489 | len += leng; |
489 | len += leng; |
490 | break; |
490 | break; |
491 | case 0x0d: |
491 | case 0x0d: |
492 | psiconv_progress(lev+3,off+len,"Going to read on next page"); |
492 | psiconv_progress(lev+3,off+len,"Going to read on next page"); |
… | |
… | |
542 | result->right_border = temp_border; |
542 | result->right_border = temp_border; |
543 | len += leng; |
543 | len += leng; |
544 | break; |
544 | break; |
545 | case 0x15: |
545 | case 0x15: |
546 | psiconv_progress(lev+3,off+len,"Going to read bullet"); |
546 | psiconv_progress(lev+3,off+len,"Going to read bullet"); |
547 | if ((res = psiconv_parse_bullet(buf,lev+3,off+len,&leng,&temp_bullet))); |
547 | if ((res = psiconv_parse_bullet(buf,lev+3,off+len,&leng,&temp_bullet))) |
548 | goto ERROR1; |
548 | goto ERROR1; |
549 | psiconv_free_bullet(result->bullet); |
549 | psiconv_free_bullet(result->bullet); |
550 | result->bullet = temp_bullet; |
550 | result->bullet = temp_bullet; |
551 | len += leng; |
551 | len += leng; |
552 | break; |
552 | break; |
… | |
… | |
697 | &result->underline))) |
697 | &result->underline))) |
698 | goto ERROR1; |
698 | goto ERROR1; |
699 | len += leng; |
699 | len += leng; |
700 | break; |
700 | break; |
701 | case 0x21: |
701 | case 0x21: |
702 | psiconv_progress(lev+3,off+len,"Going to read strike_out"); |
702 | psiconv_progress(lev+3,off+len,"Going to read strikethrough"); |
703 | if ((res = psiconv_parse_bool(buf,lev+3,off+len,&leng, |
703 | if ((res = psiconv_parse_bool(buf,lev+3,off+len,&leng, |
704 | &result->strike_out))) |
704 | &result->strikethrough))) |
705 | goto ERROR1; |
705 | goto ERROR1; |
706 | len += leng; |
706 | len += leng; |
707 | break; |
707 | break; |
708 | case 0x22: |
708 | case 0x22: |
709 | psiconv_progress(lev+3,off+len,"Going to read font"); |
709 | psiconv_progress(lev+3,off+len,"Going to read font"); |