Changeset 16443 for trunk/Mars/mcore/fits.h
- Timestamp:
- 05/29/13 22:02:43 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/mcore/fits.h
r16426 r16443 612 612 peek(); 613 613 if (eof() && !bad() && !tableName.empty()) 614 { 615 cout << "END OF FILE !" << endl; 614 616 break; 615 617 } 616 618 // FIXME: Set limit on memory consumption 617 619 const int rc = ReadBlock(block); … … 741 743 } 742 744 745 virtual void WriteRowToCopyFile(size_t row) 746 { 747 if (row==fRow+1 && !fTable.isCompressed) 748 { 749 const uint8_t offset = (row*fTable.bytes_per_row)%4; 750 751 fChkData.add(fBufferRow); 752 if (fCopy.is_open() && fCopy.good()) 753 fCopy.write(fBufferRow.data()+offset, fTable.bytes_per_row); 754 if (!fCopy) 755 clear(rdstate()|ios::badbit); 756 } 757 else 758 if (fCopy.is_open()) 759 clear(rdstate()|ios::badbit); 760 } 743 761 uint8_t ReadRow(size_t row) 744 762 { … … 764 782 StageRow(row, fBufferRow.data()+offset); 765 783 766 if (row==fRow+1) 767 { 768 fChkData.add(fBufferRow); 769 if (fCopy.is_open() && fCopy.good()) 770 fCopy.write(fBufferRow.data()+offset, fTable.bytes_per_row); 771 if (!fCopy) 772 clear(rdstate()|ios::badbit); 773 } 774 else 775 if (fCopy.is_open()) 776 clear(rdstate()|ios::badbit); 784 WriteRowToCopyFile(row); 777 785 778 786 fRow = row;
Note:
See TracChangeset
for help on using the changeset viewer.