| 140 | } |
| 141 | |
| 142 | int vtkMultiBlockPLOT3DReaderInternals::Check2DGeom(FILE* fp) |
| 143 | { |
| 144 | if (this->Settings.HasByteCount) |
| 145 | { |
| 146 | clearerr(fp); // clear error and EOF flags |
| 147 | fseek(fp, 0, SEEK_SET); // move to beginning |
| 148 | int recMarkBeg, recMarkEnd; |
| 149 | int numGrids = 1; |
| 150 | if (this->Settings.MultiGrid) |
| 151 | { |
| 152 | if (!this->ReadInts(fp, 1, &recMarkBeg) || !this->ReadInts(fp, 1, &numGrids) || |
| 153 | !this->ReadInts(fp, 1, &recMarkEnd)) |
| 154 | { |
| 155 | return 0; |
| 156 | } |
| 157 | } |
| 158 | if (!this->ReadInts(fp, 1, &recMarkBeg)) |
| 159 | { |
| 160 | return 0; |
| 161 | } |
| 162 | int nMax = 3 * numGrids; |
| 163 | int ndims; |
| 164 | if (recMarkBeg == static_cast<int>(nMax * sizeof(int) + 2 * sizeof(int))) |
| 165 | { |
| 166 | ndims = 3; |
| 167 | } |
| 168 | else |
| 169 | { |
| 170 | if (recMarkBeg == static_cast<int>(nMax * sizeof(int))) |
| 171 | { |
| 172 | ndims = 3; |
| 173 | } |
| 174 | else |
| 175 | { |
| 176 | ndims = 2; |
| 177 | } |
| 178 | } |
| 179 | this->Settings.NumberOfDimensions = ndims; |
| 180 | return 1; |
| 181 | } |
| 182 | return 0; |
| 183 | } |
| 184 | |
| 185 | int vtkMultiBlockPLOT3DReaderInternals::CheckBlankingAndPrecision(FILE* fp) |
| 186 | { |
no test coverage detected