--- branches/development/src/io/DumpReader.cpp 2013/02/20 15:39:39 1850 +++ branches/development/src/io/DumpReader.cpp 2013/05/17 14:41:42 1875 @@ -128,7 +128,7 @@ namespace OpenMD { } void DumpReader::scanFile(void) { - int lineNo = 0; + std::streampos prevPos; std::streampos currPos; @@ -142,6 +142,7 @@ namespace OpenMD { bool foundOpenSnapshotTag = false; bool foundClosedSnapshotTag = false; + int lineNo = 0; while(inFile_->getline(buffer, bufferSize)) { ++lineNo; @@ -527,7 +528,7 @@ namespace OpenMD { StringTokenizer tokenizer(line); int nTokens; - + nTokens = tokenizer.countTokens(); if (nTokens < 2) { @@ -647,14 +648,12 @@ namespace OpenMD { void DumpReader::readSiteData(std::istream& inputStream) { - inputStream.getline(buffer, bufferSize); std::string line(buffer); + + // We already found the starting tag or we wouldn't be + // here, so just start parsing until we get to the ending + // tag: - if (line.find("") == std::string::npos) { - // site data isn't required for a simulation, so skip - return; - } - while(inputStream.getline(buffer, bufferSize)) { line = buffer;