Implement GetLineFromStream that actually works and use it instead of getline

This commit is contained in:
Andy Cedilnik
2003-03-27 12:24:30 -05:00
parent b133b832fd
commit a9875aa62f
9 changed files with 109 additions and 93 deletions

View File

@@ -34,11 +34,10 @@ void cmLBDepend::DependWalk(cmDependInformation* info)
return;
}
char line[255];
while(!fin.eof() && !fin.fail())
std::string line;
while(cmSystemTools::GetLineFromStream(fin, line))
{
fin.getline(line, 255);
if(!strncmp(line, "#include", 8))
if(!strncmp(line.c_str(), "#include", 8))
{
// if it is an include line then create a string class
std::string currentline = line;