Skip Fortran style byte count.
| 2675 | |
| 2676 | // Skip Fortran style byte count. |
| 2677 | int vtkMultiBlockPLOT3DReader::SkipByteCount(FILE* fp) |
| 2678 | { |
| 2679 | int byteCountSize = this->GetByteCountSize(); |
| 2680 | if (byteCountSize > 0) |
| 2681 | { |
| 2682 | int tmp; |
| 2683 | if (fread(&tmp, byteCountSize, 1, fp) != 1) |
| 2684 | { |
| 2685 | vtkErrorMacro("MultiBlockPLOT3DReader error reading file: " |
| 2686 | << this->XYZFileName << " Premature EOF while reading skipping byte count."); |
| 2687 | fclose(fp); |
| 2688 | return 0; |
| 2689 | } |
| 2690 | if (this->Internal->Settings.ByteOrder == vtkMultiBlockPLOT3DReader::FILE_LITTLE_ENDIAN) |
| 2691 | { |
| 2692 | vtkByteSwap::Swap4LERange(&tmp, 1); |
| 2693 | } |
| 2694 | else |
| 2695 | { |
| 2696 | vtkByteSwap::Swap4BERange(&tmp, 1); |
| 2697 | } |
| 2698 | |
| 2699 | return tmp; |
| 2700 | } |
| 2701 | return 0; |
| 2702 | } |
| 2703 | |
| 2704 | // Read a block of ints (ascii or binary) and return number read. |
| 2705 | int vtkMultiBlockPLOT3DReader::ReadIntBlock(FILE* fp, int n, int* block) |
no test coverage detected