MCPcopy Create free account
hub / github.com/Kitware/VTK / SkipByteCount

Method SkipByteCount

IO/Parallel/vtkMultiBlockPLOT3DReader.cxx:2677–2702  ·  view source on GitHub ↗

Skip Fortran style byte count.

Source from the content-addressed store, hash-verified

2675
2676// Skip Fortran style byte count.
2677int 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.
2705int vtkMultiBlockPLOT3DReader::ReadIntBlock(FILE* fp, int n, int* block)

Callers 6

GetTimeValueMethod · 0.95
ReadArraysMethod · 0.95
ReadGeometryHeaderMethod · 0.95
ReadQHeaderMethod · 0.95
ReadFunctionHeaderMethod · 0.95

Calls 1

GetByteCountSizeMethod · 0.95

Tested by

no test coverage detected