Changeset 13778
- Timestamp:
- 02/13/08 18:04:13 (3 months ago)
- Files:
-
- trunk/gdal/frmts/gsg/gsagdataset.cpp (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/gdal/frmts/gsg/gsagdataset.cpp
r13776 r13778 311 311 if( panLineOffset[nBlockYOff] == 0 ) 312 312 { 313 // Discover the last read block314 for ( int iFoundLine = nLastReadLine - 1; iFoundLine > nBlockYOff; iFoundLine--)315 {316 IReadBlock( nBlockXOff, iFoundLine, NULL);317 }313 // Discover the last read block 314 for ( int iFoundLine = nLastReadLine - 1; iFoundLine > nBlockYOff; iFoundLine--) 315 { 316 IReadBlock( nBlockXOff, iFoundLine, NULL); 317 } 318 318 } 319 319 … … 323 323 { 324 324 CPLError( CE_Failure, CPLE_FileIO, 325 "Can't seek to offset %ld to read grid row %d.",326 panLineOffset[nBlockYOff], nBlockYOff );325 "Can't seek to offset %ld to read grid row %d.", 326 panLineOffset[nBlockYOff], nBlockYOff ); 327 327 return CE_Failure; 328 328 } … … 337 337 assert(panLineOffset[nBlockYOff-1] > panLineOffset[nBlockYOff]); 338 338 nLineBufSize = panLineOffset[nBlockYOff-1] 339 - panLineOffset[nBlockYOff] + 1;339 - panLineOffset[nBlockYOff] + 1; 340 340 } 341 341 else … … 421 421 422 422 while( *szStart == '\0' && 423 static_cast<size_t>(szStart - szLineBuf) < nCharsRead )423 static_cast<size_t>(szStart - szLineBuf) < nCharsRead ) 424 424 szStart++; 425 425 … … 443 443 } 444 444 else if( *szEnd == '\0' 445 || (*szEnd == '.' && *(szEnd+1) == '\0')446 || (*szEnd == '-' && *(szEnd+1) == '\0')447 || (*szEnd == '+' && *(szEnd+1) == '\0')448 || (*szEnd == 'E' && *(szEnd+1) == '\0')449 || (*szEnd == 'E' && *(szEnd+1) == '-' && *(szEnd+2) == '\0')450 || (*szEnd == 'E' && *(szEnd+1) == '+' && *(szEnd+2) == '\0')451 || (*szEnd == 'e' && *(szEnd+1) == '\0')452 || (*szEnd == 'e' && *(szEnd+1) == '-' && *(szEnd+2) == '\0')453 || (*szEnd == 'e' && *(szEnd+1) == '+' && *(szEnd+2) == '\0'))445 || (*szEnd == '.' && *(szEnd+1) == '\0') 446 || (*szEnd == '-' && *(szEnd+1) == '\0') 447 || (*szEnd == '+' && *(szEnd+1) == '\0') 448 || (*szEnd == 'E' && *(szEnd+1) == '\0') 449 || (*szEnd == 'E' && *(szEnd+1) == '-' && *(szEnd+2) == '\0') 450 || (*szEnd == 'E' && *(szEnd+1) == '+' && *(szEnd+2) == '\0') 451 || (*szEnd == 'e' && *(szEnd+1) == '\0') 452 || (*szEnd == 'e' && *(szEnd+1) == '-' && *(szEnd+2) == '\0') 453 || (*szEnd == 'e' && *(szEnd+1) == '+' && *(szEnd+2) == '\0')) 454 454 { 455 455 /* Number was interrupted by a nul character */ … … 518 518 if( *szEnd != '\0' && *szEnd != poGDS->szEOL[0] ) 519 519 CPLDebug( "GSAG", "Grid row %d does not end with a newline. " 520 "Possible skew.\n", nBlockYOff );520 "Possible skew.\n", nBlockYOff ); 521 521 522 522 while( isspace( *szEnd ) ) … … 528 528 nMaxLineSize = nCharsExamined + 1; 529 529 530 panLineOffset[nBlockYOff - 1] = panLineOffset[nBlockYOff] + nCharsExamined; 531 nLastReadLine = nBlockYOff; 530 if( nBlockYOff > 0 ) 531 panLineOffset[nBlockYOff - 1] = 532 panLineOffset[nBlockYOff] + nCharsExamined; 533 534 nLastReadLine = nBlockYOff; 532 535 533 536 VSIFree( szLineBuf );
