… | |
… | |
506 | psiconv_progress(lev+1,off,"Going to read the sheet workbook section"); |
506 | psiconv_progress(lev+1,off,"Going to read the sheet workbook section"); |
507 | if (!(*result = malloc(sizeof(**result)))) |
507 | if (!(*result = malloc(sizeof(**result)))) |
508 | goto ERROR1; |
508 | goto ERROR1; |
509 | |
509 | |
510 | psiconv_progress(lev+2,off+len, |
510 | psiconv_progress(lev+2,off+len, |
511 | "Going to read the initial byte (%02x or $02xexpected)", |
511 | "Going to read the initial byte (%02x or %02x expected)", |
512 | 0x02,0x04); |
512 | 0x02,0x04); |
513 | temp = psiconv_read_u8(buf,lev+2,off+len,&res); |
513 | temp = psiconv_read_u8(buf,lev+2,off+len,&res); |
514 | if (res) |
514 | if (res) |
515 | goto ERROR2; |
515 | goto ERROR2; |
516 | if ((temp != 0x04) && temp !=0x02) { |
516 | if ((temp != 0x04) && temp !=0x02) { |
… | |
… | |
584 | NULL,&(*result)->worksheets))) |
584 | NULL,&(*result)->worksheets))) |
585 | goto ERROR5; |
585 | goto ERROR5; |
586 | |
586 | |
587 | if (with_name) { |
587 | if (with_name) { |
588 | psiconv_progress(lev+2,off+len,"Going to read the name section"); |
588 | psiconv_progress(lev+2,off+len,"Going to read the name section"); |
589 | |
|
|
590 | if ((res = psiconv_parse_sheet_name_section(buf,lev+2,name_off,NULL, |
589 | if ((res = psiconv_parse_sheet_name_section(buf,lev+2,name_off,NULL, |
591 | &(*result)->name))) |
590 | &(*result)->name))) |
592 | goto ERROR6; |
591 | goto ERROR6; |
593 | } else |
592 | } else |
594 | (*result)->name = NULL; |
593 | (*result)->name = NULL; |
… | |
… | |
673 | psiconv_u32 off, int *length, |
672 | psiconv_u32 off, int *length, |
674 | psiconv_sheet_info_section *result) |
673 | psiconv_sheet_info_section *result) |
675 | { |
674 | { |
676 | int res=0; |
675 | int res=0; |
677 | psiconv_u32 temp; |
676 | psiconv_u32 temp; |
678 | int len=0; |
677 | int len=0,leng; |
679 | |
678 | |
680 | psiconv_progress(lev+1,off,"Going to read the sheet info section"); |
679 | psiconv_progress(lev+1,off,"Going to read the sheet info section"); |
681 | if (!(*result = malloc(sizeof(**result)))) |
680 | if (!(*result = malloc(sizeof(**result)))) |
682 | goto ERROR1; |
681 | goto ERROR1; |
683 | |
682 | |
… | |
… | |
690 | psiconv_warn(lev+2,off+len, |
689 | psiconv_warn(lev+2,off+len, |
691 | "Sheet info section initial byte unknown value (ignored)"); |
690 | "Sheet info section initial byte unknown value (ignored)"); |
692 | psiconv_debug(lev+2,off+len,"Initial byte: %02x",temp); |
691 | psiconv_debug(lev+2,off+len,"Initial byte: %02x",temp); |
693 | } |
692 | } |
694 | len ++; |
693 | len ++; |
|
|
694 | |
|
|
695 | psiconv_progress(lev+2,off+len, "Going to read an unknown Xint"); |
|
|
696 | temp = psiconv_read_X(buf,lev+2,off+len,&leng,&res); |
|
|
697 | if (res) |
|
|
698 | goto ERROR2; |
|
|
699 | psiconv_debug(lev+2,off+len,"Value: %d\n",temp); |
|
|
700 | len += leng; |
695 | |
701 | |
696 | psiconv_progress(lev+2,off+len, "Going to read the flags byte"); |
702 | psiconv_progress(lev+2,off+len, "Going to read the flags byte"); |
697 | temp = psiconv_read_u8(buf,lev+2,off+len,&res); |
703 | temp = psiconv_read_u8(buf,lev+2,off+len,&res); |
698 | if (res) |
704 | if (res) |
699 | goto ERROR2; |
705 | goto ERROR2; |